- Timestamp:
- Dec 7, 2023 9:02:42 AM (14 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/platforms/vbox-armv8.h
r101435 r102514 78 78 /** Size of the MMIO region in bytes, 0 if not available. */ 79 79 uint64_t cbMmio; 80 /** Offset backwards to the start of the MMIO32 region from the start of this descriptor, 0 if not available. */ 81 uint64_t u64OffBackMmio32; 82 /** Size of the MMIO32 region in bytes, 0 if not available. */ 83 uint64_t cbMmio32; 80 84 /** Padding to 64KiB. */ 81 uint8_t abPadding[_64K - 4 * sizeof(uint32_t) - 1 0* sizeof(uint64_t)];85 uint8_t abPadding[_64K - 4 * sizeof(uint32_t) - 12 * sizeof(uint64_t)]; 82 86 } VBOXPLATFORMARMV8; 83 87 AssertCompileSize(VBOXPLATFORMARMV8, _64K); -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Include/Library/VBoxArmPlatformLib.h
r101432 r102514 127 127 UINTN EFIAPI VBoxArmPlatformMmioSizeGet(VOID); 128 128 129 130 /** 131 * Returns the physical address of the start of the MMIO32 region. 132 * 133 * @returns Physical address of the MMIO32 region start. 134 */ 135 EFI_PHYSICAL_ADDRESS EFIAPI VBoxArmPlatformMmio32StartGetPhysAddr(VOID); 136 137 138 /** 139 * Returns the size of the MMIO32 region. 140 * 141 * @returns Size of the MMIO32 region. 142 */ 143 UINTN EFIAPI VBoxArmPlatformMmio32SizeGet(VOID); 144 129 145 #endif 130 146 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxArmPlatformLib/VBoxArmPlatformLib.c
r101434 r102514 148 148 return pDesc->cbMmio; 149 149 } 150 151 152 EFI_PHYSICAL_ADDRESS EFIAPI VBoxArmPlatformMmio32StartGetPhysAddr(VOID) 153 { 154 PCVBOXPLATFORMARMV8 pDesc = (PCVBOXPLATFORMARMV8)VBoxArmPlatformDescGet(); 155 ASSERT(pDesc->u32Magic == VBOXPLATFORMARMV8_MAGIC); 156 157 if (!pDesc->cbMmio) 158 return 0; 159 160 return (EFI_PHYSICAL_ADDRESS)((UINTN)pDesc - pDesc->u64OffBackMmio32); 161 } 162 163 164 UINTN EFIAPI VBoxArmPlatformMmio32SizeGet(VOID) 165 { 166 PCVBOXPLATFORMARMV8 pDesc = (PCVBOXPLATFORMARMV8)VBoxArmPlatformDescGet(); 167 ASSERT(pDesc->u32Magic == VBOXPLATFORMARMV8_MAGIC); 168 169 return pDesc->cbMmio32; 170 } -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxVirtMemInfoLib/VBoxVirtMemInfoLib.c
r101434 r102514 46 46 47 47 // Number of Virtual Memory Map Descriptors 48 #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 648 #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 7 49 49 50 50 /** … … 126 126 VirtualMemoryTable[3].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK_RO; 127 127 128 // Map the VBox descriptor region readon nly.128 // Map the VBox descriptor region readonly. 129 129 VirtualMemoryTable[4].PhysicalBase = VBoxArmPlatformDescGetPhysAddr(); 130 130 VirtualMemoryTable[4].VirtualBase = VirtualMemoryTable[4].PhysicalBase; … … 132 132 VirtualMemoryTable[4].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK_RO; 133 133 134 // Map the MMIO32 region if it exists. 135 if (VBoxArmPlatformMmio32SizeGet() != 0) 136 { 137 VirtualMemoryTable[5].PhysicalBase = VBoxArmPlatformMmio32StartGetPhysAddr(); 138 VirtualMemoryTable[5].VirtualBase = VirtualMemoryTable[5].PhysicalBase; 139 VirtualMemoryTable[5].Length = VBoxArmPlatformMmio32SizeGet(); 140 VirtualMemoryTable[5].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; 141 } 142 134 143 // End of Table 135 ZeroMem (&VirtualMemoryTable[ 5], sizeof (ARM_MEMORY_REGION_DESCRIPTOR));144 ZeroMem (&VirtualMemoryTable[6], sizeof (ARM_MEMORY_REGION_DESCRIPTOR)); 136 145 137 146 for (UINTN i = 0; i < MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS; i++)
Note:
See TracChangeset
for help on using the changeset viewer.