Page MenuHomeFreeBSD

arm64: Move cpu0 dpcpu and msgbuf to the DMAP
Needs ReviewPublic

Authored by andrew on Nov 23 2023, 2:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 4, 7:10 PM
Unknown Object (File)
Oct 2 2024, 5:04 AM
Unknown Object (File)
Oct 2 2024, 5:04 AM
Unknown Object (File)
Oct 2 2024, 4:52 AM
Unknown Object (File)
Sep 8 2024, 9:43 PM
Unknown Object (File)
Sep 8 2024, 5:23 PM
Unknown Object (File)
Aug 8 2024, 10:50 PM
Unknown Object (File)
Jul 5 2024, 2:43 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 54590
Build 51479: 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
1307

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

1340

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?

1347