VirtualBox

Ignore:
Timestamp:
Jun 11, 2018 11:05:32 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
122985
Message:

EFI: Log EFI module relocations, such as when an OS switches to its own virtual memory map. Needed to know where run-time EFI modules end up.

Location:
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library
Files:
2 edited

Legend:

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

    r69500 r72500  
    101101}
    102102
     103VOID
     104EFIAPI
     105VBoxPeCoffLoaderMoveImageExtraAction(
     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  
    13321332}
    13331333
     1334extern VOID EFIAPI VBoxPeCoffLoaderMoveImageExtraAction(IN PHYSICAL_ADDRESS OldBase, IN PHYSICAL_ADDRESS NewBase);
    13341335
    13351336/**
     
    13881389  EFI_FAT_IMAGE_HEADER                *Fat;
    13891390
     1391  VBoxPeCoffLoaderMoveImageExtraAction(ImageBase, VirtImageBase);
     1392
    13901393  OldBase = (CHAR8 *)((UINTN)ImageBase);
    13911394  NewBase = (CHAR8 *)((UINTN)VirtImageBase);
Note: See TracChangeset for help on using the changeset viewer.

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