Page MenuHomeFreeBSD

stand/efi: Limit where we load the arm64 kernel
AcceptedPublic

Authored by andrew on Sep 10 2024, 2:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 30, 12:47 PM
Unknown Object (File)
Tue, Oct 8, 7:50 PM
Unknown Object (File)
Sep 21 2024, 11:33 AM
Unknown Object (File)
Sep 21 2024, 9:49 AM
Unknown Object (File)
Sep 17 2024, 9:25 PM
Unknown Object (File)
Sep 13 2024, 7:45 PM
Unknown Object (File)
Sep 13 2024, 5:34 PM
Unknown Object (File)
Sep 12 2024, 1:41 PM
Subscribers

Details

Reviewers
alc
kib
markj
manu
Group Reviewers
arm64
Summary

When FEAT_LPA2 is implemented the hardware supports increasing the
physical address space from 48-bit to 52-bit.

As older kernels only support a 48-bit physical address space limit
where the kernel is loaded to this.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59423
Build 56310: arc lint + arc unit

Event Timeline

stand/efi/loader/copy.c
305

The - 1 seems inconsistent with the amd64 case above. Which one is right?

stand/efi/loader/copy.c
305

BS->AllocatePages with AllocateMaxAddress can allocate pages where the uppermost address is less than or equal to this value.

It probably doesn't matter to not have the - 1 as no pages above the 1G or 4G mark should be allocated in the amd64 case as they would have to be zero length.

markj added inline comments.
stand/efi/loader/copy.c
305

Then perhaps let's just use (1ul << 48) for consistency's sake?

This revision is now accepted and ready to land.Sep 11 2024, 1:32 PM
stand/efi/loader/copy.c
333

Does this work? I thought that cpp #if only takes arithmetic expressions + defined().