Page MenuHomeFreeBSD

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

Authored by andrew on Tue, Sep 10, 2:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 17, 9:25 PM
Unknown Object (File)
Fri, Sep 13, 7:45 PM
Unknown Object (File)
Fri, Sep 13, 5:34 PM
Unknown Object (File)
Thu, Sep 12, 1:41 PM
Unknown Object (File)
Thu, Sep 12, 11:27 AM
Unknown Object (File)
Wed, Sep 11, 4:54 AM
Unknown Object (File)
Wed, Sep 11, 12:13 AM
Unknown Object (File)
Tue, Sep 10, 6:07 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.Wed, Sep 11, 1:32 PM
stand/efi/loader/copy.c
333

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