Page MenuHomeFreeBSD

arm64: Move cpu0 dpcpu and msgbuf to the DMAP
AcceptedPublic

Authored by andrew on Nov 23 2023, 2:20 PM.
Tags
None
Referenced Files
F115034635: D42734.diff
Sat, Apr 19, 8:40 PM
Unknown Object (File)
Thu, Apr 17, 2:46 AM
Unknown Object (File)
Wed, Apr 16, 8:06 PM
Unknown Object (File)
Mar 14 2025, 12:04 PM
Unknown Object (File)
Mar 10 2025, 9:31 PM
Unknown Object (File)
Mar 10 2025, 6:09 PM
Unknown Object (File)
Feb 25 2025, 7:01 AM
Unknown Object (File)
Dec 12 2024, 6:16 PM
Subscribers

Details

Reviewers
manu
alc
markj
Group Reviewers
arm64
Summary

When these are allocated we already have the DMAP region mapped. Search
for the largest region and use this to hold these.

Pr: 269726
Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

What's the motivation behind this?

It's part of a general clean up of the early page table creation code. In this case I'm trying to reduce the size of the 6M of extra virtual address space added in create_pagetables in locore.S as it may not be usable memory, e.g. if the kernel and modules are loaded at the end of physical memory and use almost all the 64M allocation in loader.efi.

It looks like it also fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269726

sys/arm64/arm64/pmap.c
1360

Other variables in this function which represent physical addresses have a suffix of "_pa", not "_phys".

1399

Don't you need to rebuild the physmap and compute largest_phys after this point? Otherwise, how is it guaranteed that the dmesg/dpcpu allocations are not stomping over the region we're using to bootstrap?

1406
sys/arm64/arm64/pmap.c
1368

Some explanation of "why" here would be nice.

I'd also like to see a little more on the why we need to find such memory in the comment.

sys/arm64/arm64/pmap.c
1393

why delete this?

markj added inline comments.
sys/arm64/arm64/pmap.c
1367
This revision is now accepted and ready to land.Fri, Apr 18, 2:19 PM