Page MenuHomeFreeBSD

Include the EFI Runtime Code in the DMAP
ClosedPublic

Authored by andrew on Apr 9 2022, 8:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 8:17 AM
Unknown Object (File)
Wed, Nov 13, 6:45 AM
Unknown Object (File)
Wed, Nov 13, 4:57 AM
Unknown Object (File)
Wed, Nov 13, 4:24 AM
Unknown Object (File)
Wed, Nov 13, 4:10 AM
Unknown Object (File)
Oct 22 2024, 10:37 PM
Unknown Object (File)
Oct 5 2024, 8:56 AM
Unknown Object (File)
Oct 5 2024, 7:23 AM
Subscribers

Details

Summary

Some UEFI implementations place the system table in a runtime code
memory region. Include it in the DMAP so we can read it later.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45098
Build 41986: arc lint + arc unit

Event Timeline

andrew requested review of this revision.Apr 9 2022, 8:20 PM

The way U-Boot does this feels a little sloppy, but nothing in the spec seems to forbid it and the alternative is probably way messier...

The relevant part being here: https://elixir.bootlin.com/u-boot/latest/source/lib/efi_loader/efi_memory.c#L836 -- they end up grouping efi runtime code/data together to minimize padding:

.efi_runtime : {                                                               
               __efi_runtime_start = .;                                        
 *(.text.efi_runtime*)                                                         
 *(.rodata.efi_runtime*)                                                       
 *(.data.efi_runtime*)                                                         
               __efi_runtime_stop = .;                                         
}
This revision is now accepted and ready to land.Apr 10 2022, 1:51 AM
This revision was automatically updated to reflect the committed changes.