Changeset 72500 in vbox
- Timestamp:
- Jun 11, 2018 11:05:32 AM (6 years ago)
- Location:
- trunk/src/VBox/Devices/EFI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r71777 r72500 1246 1246 case EFI_IMAGE_EVT_CMD_START_UNLOAD32: 1247 1247 case EFI_IMAGE_EVT_CMD_START_UNLOAD64: 1248 case EFI_IMAGE_EVT_CMD_START_RELOC32: 1249 case EFI_IMAGE_EVT_CMD_START_RELOC64: 1248 1250 AssertBreak(EFI_IMAGE_EVT_GET_PAYLOAD(u32) == 0); 1249 1251 … … 1293 1295 break; 1294 1296 } 1297 case EFI_IMAGE_EVT_CMD_START_RELOC32: 1298 case EFI_IMAGE_EVT_CMD_START_RELOC64: 1299 { 1300 LogRel(("EFI: relocate module to %#llx from %#llx\n", 1301 pThis->ImageEvt.uAddr0, pThis->ImageEvt.uAddr1)); 1302 break; 1303 } 1295 1304 } 1296 1305 } … … 1309 1318 case EFI_IMAGE_EVT_CMD_ADDR1: 1310 1319 AssertBreak(EFI_IMAGE_EVT_GET_PAYLOAD(u32) <= UINT16_MAX); 1311 pThis->ImageEvt.uAddr 0<<= 16;1312 pThis->ImageEvt.uAddr 0|= EFI_IMAGE_EVT_GET_PAYLOAD_U16(u32);1320 pThis->ImageEvt.uAddr1 <<= 16; 1321 pThis->ImageEvt.uAddr1 |= EFI_IMAGE_EVT_GET_PAYLOAD_U16(u32); 1313 1322 return VINF_SUCCESS; 1314 1323 -
trunk/src/VBox/Devices/EFI/DevEFI.h
r69500 r72500 224 224 /** Starts a 64-bit unload event. Requires name and address. */ 225 225 #define EFI_IMAGE_EVT_CMD_START_UNLOAD64 UINT32_C(0x00000005) 226 /** Starts a 32-bit relocation event. RRequires new and old base address. */ 227 #define EFI_IMAGE_EVT_CMD_START_RELOC32 UINT32_C(0x0000000A) 228 /** Starts a 64-bit relocation event. Requires new and old base address. */ 229 #define EFI_IMAGE_EVT_CMD_START_RELOC64 UINT32_C(0x0000000B) 226 230 227 231 /** The command for writing to the second address register (64-bit). -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.c
r69500 r72500 101 101 } 102 102 103 VOID 104 EFIAPI 105 VBoxPeCoffLoaderMoveImageExtraAction( 106 IN PHYSICAL_ADDRESS OldBase, 107 IN PHYSICAL_ADDRESS NewBase 108 ) 109 { 110 ASSERT(ImageContext != NULL); 111 #if ARCH_BITS == 32 112 ASMOutU32(EFI_PORT_IMAGE_EVENT, EFI_IMAGE_EVT_CMD_START_RELOC32); 113 #else 114 ASMOutU32(EFI_PORT_IMAGE_EVENT, EFI_IMAGE_EVT_CMD_START_RELOC64); 115 #endif 116 vboxImageEvtU64(EFI_IMAGE_EVT_CMD_ADDR0, NewBase); 117 vboxImageEvtU64(EFI_IMAGE_EVT_CMD_ADDR1, OldBase); 118 ASMOutU32(EFI_PORT_IMAGE_EVENT, EFI_IMAGE_EVT_CMD_COMPLETE); 119 } -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxPeCoffLib/BasePeCoff.c
r69500 r72500 1332 1332 } 1333 1333 1334 extern VOID EFIAPI VBoxPeCoffLoaderMoveImageExtraAction(IN PHYSICAL_ADDRESS OldBase, IN PHYSICAL_ADDRESS NewBase); 1334 1335 1335 1336 /** … … 1388 1389 EFI_FAT_IMAGE_HEADER *Fat; 1389 1390 1391 VBoxPeCoffLoaderMoveImageExtraAction(ImageBase, VirtImageBase); 1392 1390 1393 OldBase = (CHAR8 *)((UINTN)ImageBase); 1391 1394 NewBase = (CHAR8 *)((UINTN)VirtImageBase);
Note:
See TracChangeset
for help on using the changeset viewer.