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)
Thu, Aug 13, 9:11 PM
Unknown Object (File)
Wed, Aug 12, 3:56 PM
Unknown Object (File)
Wed, Aug 12, 2:56 PM
Unknown Object (File)
Wed, Aug 12, 7:41 AM
Unknown Object (File)
Mon, Aug 10, 9:06 PM
Unknown Object (File)
Mon, Aug 10, 6:58 PM
Unknown Object (File)
Sun, Aug 9, 8:31 AM
Unknown Object (File)
Sat, Aug 8, 7: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.