Page MenuHomeFreeBSD

stand/efi: Use EFI_PAGE_SIZE here, it's more appropriate
ClosedPublic

Authored by imp on May 28 2025, 9:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 7, 12:15 PM
Unknown Object (File)
Fri, Jul 4, 9:04 AM
Unknown Object (File)
Tue, Jul 1, 3:54 PM
Unknown Object (File)
Sun, Jun 29, 8:18 PM
Unknown Object (File)
Sat, Jun 28, 9:09 AM
Unknown Object (File)
Fri, Jun 27, 9:45 AM
Unknown Object (File)
Thu, Jun 26, 3:03 AM
Unknown Object (File)
Wed, Jun 25, 4:13 AM
Subscribers

Details

Summary

No functional change: We're allocating a page from EFI, which is always
4k on amd64. So, this should always be 4k. PAGE_SIZE usually is this,
but might not be in some cases. For the end of the stack pointer in the
ist1, it should point the architecture's phyiscal page past where we've
allocated. EFI_PAGE_SIZE more faithfully reflects that here since
PAGE_SIZE might not be exactly that in the future (if we had a larger
logical page than physical page). Since the AllocPage interface is in
EFI_PAGE_SIZE pages always, this seems safer. No functional change since
they are both 2096 today.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.May 28 2025, 9:49 PM
This revision is now accepted and ready to land.May 28 2025, 9:53 PM

The code change is fine, but the commit comment has several typos (appropraite vs. appropriate, phyiscal vs. physical, 2096 vs. 4096).

imp retitled this revision from stand/efi: Use EFI_PAGE_SIZE here, it's more appropraite to stand/efi: Use EFI_PAGE_SIZE here, it's more appropriate.May 29 2025, 6:04 PM
This revision now requires review to proceed.May 29 2025, 6:17 PM
This revision is now accepted and ready to land.May 29 2025, 9:16 PM