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
F87206587: D34861.diff
Sun, Jun 30, 6:28 AM
Unknown Object (File)
May 3 2024, 8:19 AM
Unknown Object (File)
Apr 5 2024, 5:10 PM
Unknown Object (File)
Jan 24 2024, 8:43 AM
Unknown Object (File)
Jan 14 2024, 8:26 AM
Unknown Object (File)
Dec 23 2023, 2:32 AM
Unknown Object (File)
Sep 10 2023, 10:50 AM
Unknown Object (File)
Sep 2 2023, 5:48 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.