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)
Sat, Mar 21, 12:49 PM
Unknown Object (File)
Fri, Mar 20, 6:25 AM
Unknown Object (File)
Thu, Mar 19, 9:08 PM
Unknown Object (File)
Tue, Mar 17, 11:38 AM
Unknown Object (File)
Mon, Mar 16, 3:06 PM
Unknown Object (File)
Sun, Mar 15, 9:14 PM
Unknown Object (File)
Mar 5 2026, 8:16 AM
Unknown Object (File)
Mar 5 2026, 12:03 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.