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, Dec 20, 2:52 PM
Unknown Object (File)
Nov 18 2025, 9:33 AM
Unknown Object (File)
Nov 18 2025, 8:14 AM
Unknown Object (File)
Nov 17 2025, 12:32 PM
Unknown Object (File)
Nov 17 2025, 8:08 AM
Unknown Object (File)
Nov 17 2025, 5:31 AM
Unknown Object (File)
Nov 8 2025, 9:27 PM
Unknown Object (File)
Nov 4 2025, 5:57 PM
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.