freebsd-dev/sys/powerpc
Justin Hibbits 10d0cdfc6e Add support for powernv POWER9 MMU initialization
The POWER9 MMU (PowerISA 3.0) is slightly different from current
configurations, using a partition table even for hypervisor mode, and
dropping the SDR1 register.  Key off the newly early-enabled CPU features
flags for the new architecture, and configure the MMU appropriately.

The POWER9 MMU ignores the "PSIZ" field in the PTCR, and expects a 64kB
table.  As we are enabled for powernv (hypervisor mode, no VMs), only
initialize partition table entry 0, and zero out the rest.  The actual
contents of the register are identical to SDR1 from previous architectures.

Along with this, fix a bug in the page table allocation with very large
memory.  The table can be allocated on any 256k boundary.  The
bootstrap_alloc alignment argument is an int, and with large amounts of
memory passing the size of the table as the alignment will overflow an
integer.  Hard-code the alignment at 256k as wider alignment is not
necessary.

Reviewed by:	nwhitehorn
Tested by:	Breno Leitao
Relnotes:	Yes
2018-05-05 16:00:02 +00:00
..
aim Add support for powernv POWER9 MMU initialization 2018-05-05 16:00:02 +00:00
booke Remove dead errata fixup code 2018-05-01 04:31:17 +00:00
conf PowerNV: Initial support for OPAL I2C transfers 2018-03-01 14:11:07 +00:00
cpufreq [ofw] fix errneous checks for OF_finddevice(9) return value 2018-03-20 00:03:49 +00:00
fpu sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
include Add support for powernv POWER9 MMU initialization 2018-05-05 16:00:02 +00:00
mambo sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
mikrotik - Allow different slicers for different flash types to be registered 2017-02-22 10:21:39 +00:00
mpc85xx Remove dead errata fixup code 2018-05-01 04:31:17 +00:00
ofw Increase the fdtmemreserv array limit to boot on POWER9 2018-04-25 02:42:11 +00:00
powermac Fix null pointer dereference on nodes without a "compatible" property. 2018-04-30 19:37:32 +00:00
powernv Reverting r330925 for now 2018-03-15 06:19:45 +00:00
powerpc Break out the cpu_features setup to its own function, to be run earlier 2018-05-05 15:48:39 +00:00
ps3 Move the powerpc64 direct map base address from zero to high memory. This 2018-03-07 17:08:07 +00:00
pseries Add support for powernv POWER9 MMU initialization 2018-05-05 16:00:02 +00:00
psim Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00