CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/07/18 04:14:40
Modified files:
sys/arch/powerpc64/powerpc64: pmap.c
Log message:
sys/powerpc64: encode PTCR PATS correctly
The PTCR PATS field stores log2(partition table size) - 12. Since
PATMEMSZ is a power of two, ffs(PATMEMSZ) is log2(PATMEMSZ) + 1; the
old expression wrote 5 for the 64 KiB table, describing 128 KiB to
Book3S v3 hardware.
Use ffs(PATMEMSZ) - 1 - 12 to express the intended log2 calculation
and encode the 64 KiB partition table as PATS == 4.
Discussed with kettenis@
Tested and OK: gkoehler@