freebsd-dev/sys/powerpc/include
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
..
_align.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
_bus.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
_inttypes.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
_limits.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
_stdint.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
_types.h Do not include float interfaces when using libsa. 2018-02-23 04:04:25 +00:00
altivec.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
asm.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
atomic.h Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
bat.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
bus_dma.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
bus.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
clock.h
counter.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
cpu.h Fix the build post r332859 2018-04-22 03:58:04 +00:00
cpufunc.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
db_machdep.h No need to force md code to define a macro that's the same as 2018-04-16 13:52:23 +00:00
dbdma.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
dump.h
efi.h Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
elf.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
endian.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
exec.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
float.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
floatingpoint.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fpu.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
frame.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
gdb_machdep.h amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits 2018-03-06 14:28:37 +00:00
hid.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ieee.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ieeefp.h
in_cksum.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
intr_machdep.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
kdb.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
limits.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
machdep.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
md_var.h Break out the cpu_features setup to its own function, to be run earlier 2018-05-05 15:48:39 +00:00
memdev.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
metadata.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
mmuvar.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
ofw_machdep.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
openpicreg.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
openpicvar.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
param.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
pcb.h powerpc64: Add DSCR support 2018-04-20 03:19:44 +00:00
pcpu.h Merge AIM and Book-E PCPU fields 2018-02-17 20:59:12 +00:00
pio.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
platform.h Remove platform_cpu_idle() and platform_cpu_idle_wakeup() interfaces 2018-02-24 01:46:56 +00:00
platformvar.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
pmap.h Remove hard-coded trap-handling logic involving the segmented memory model 2018-01-29 04:33:41 +00:00
pmc_mdep.h Implement hwpmc(4) for Freescale e500 core. 2015-04-18 21:39:17 +00:00
proc.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
profile.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
psl.h Change the default MSR values used when starting userland and kernel 2018-02-01 05:31:24 +00:00
pte.h Add support for powernv POWER9 MMU initialization 2018-05-05 16:00:02 +00:00
ptrace.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
reg.h Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
reloc.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
resource.h
rtas.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
runq.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
sc_machdep.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
setjmp.h Use setjmp() instead of the identical-except-for-having-a-wrong-prototype 2016-01-10 16:42:14 +00:00
sigframe.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
signal.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
slb.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
smp.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
spr.h Add support for powernv POWER9 MMU initialization 2018-05-05 16:00:02 +00:00
sr.h Move the powerpc64 direct map base address from zero to high memory. This 2018-03-07 17:08:07 +00:00
stack.h
stdarg.h Use standard pattern for stdargs.h 2018-02-12 14:48:05 +00:00
sysarch.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
tlb.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
trap.h Handle the Facility Unavailable exception as a SIGILL 2017-12-15 04:11:20 +00:00
ucontext.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
vdso.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
vm.h sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
vmparam.h Add support for a pmap direct map for 64-bit Book-E 2018-04-03 00:45:38 +00:00