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)
Mon, Feb 12, 1:26 PM
Unknown Object (File)
Jan 5 2024, 10:36 PM
Unknown Object (File)
Jan 3 2024, 5:34 AM
Unknown Object (File)
Dec 25 2023, 5:29 PM
Unknown Object (File)
Dec 23 2023, 3:07 AM
Unknown Object (File)
Dec 21 2023, 1:56 PM
Unknown Object (File)
Dec 12 2023, 11:48 PM
Unknown Object (File)
Dec 8 2023, 8:00 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