VirtualBox

Changeset 107124 in vbox


Ignore:
Timestamp:
Nov 22, 2024 3:47:28 PM (8 weeks ago)
Author:
vboxsync
Message:

Devices/EFI/Firmware: Precaution to not add an entry for the MMIO region if it has a 0 length, bugref:10732

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxVirtMemInfoLib/VBoxVirtMemInfoLib.c

    r106352 r107124  
    111111
    112112  // Memory mapped peripherals
    113   VirtualMemoryTable[idxMemDesc].PhysicalBase = VBoxArmPlatformMmioStartGetPhysAddr();
    114   VirtualMemoryTable[idxMemDesc].VirtualBase  = VirtualMemoryTable[idxMemDesc].PhysicalBase;
    115   VirtualMemoryTable[idxMemDesc].Length       = VBoxArmPlatformMmioSizeGet();
    116   VirtualMemoryTable[idxMemDesc].Attributes   = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
    117   idxMemDesc++;
     113  if (VBoxArmPlatformMmioSizeGet() != 0)
     114  {
     115    VirtualMemoryTable[idxMemDesc].PhysicalBase = VBoxArmPlatformMmioStartGetPhysAddr();
     116    VirtualMemoryTable[idxMemDesc].VirtualBase  = VirtualMemoryTable[idxMemDesc].PhysicalBase;
     117    VirtualMemoryTable[idxMemDesc].Length       = VBoxArmPlatformMmioSizeGet();
     118    VirtualMemoryTable[idxMemDesc].Attributes   = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
     119    idxMemDesc++;
     120  }
    118121
    119122  // Map the FV region as normal executable memory
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette