freebsd-nq/sys/powerpc/powerpc
Nathan Whitehorn 8864f35942 Execute PowerPC64/AIM kernel from direct map region when possible.
When the kernel can be in real mode in early boot, we can execute from
high addresses aliased to the kernel's physical memory. If that high
address has the first two bits set to 1 (0xc...), those addresses will
automatically become part of the direct map. This reduces page table
pressure from the kernel and it sets up the kernel to be used with
radix translation, for which it has to be up here.

This is accomplished by exploiting the fact that all PowerPC kernels are
built as position-independent executables and relocate themselves
on start. Before this patch, the kernel runs at 1:1 VA:PA, but that
VA/PA is random and set by the bootloader. Very early, it processes
its ELF relocations to operate wherever it happens to find itself.
This patch uses that mechanism to re-enter and re-relocate the kernel
a second time witha new base address set up in the early parts of
powerpc_init().

Reviewed by:	jhibbits
Differential Revision:	D14647
2018-03-13 15:03:58 +00:00
..
altivec.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
autoconf.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
bcopy.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
bus_machdep.c Move the powerpc64 direct map base address from zero to high memory. This 2018-03-07 17:08:07 +00:00
busdma_machdep.c Add support for NUMA domains to bus dma tags. This causes all memory 2018-01-12 23:34:16 +00:00
clock.c PowerPC: Switch to more accurate unit to avoid division rounding 2018-02-20 07:30:57 +00:00
copyinout.c PPC64: fix copyinout ranges 2018-01-17 09:36:48 +00:00
copystr.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
cpu_subr64.S PowerNV: Put processor to power-save state in idle thread 2018-02-21 14:28:40 +00:00
cpu.c Fix a minor typo. 2018-02-27 04:23:03 +00:00
db_disasm.c Fix disassembly by adding back some deleted lines. 2016-12-16 04:47:29 +00:00
db_hwwatch.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
db_interface.c Remove PIR from PCPU data. It has an implementation-defined meaning that 2017-12-31 20:23:39 +00:00
db_trace.c Book-E debug trace fixes 2017-10-20 03:03:04 +00:00
dump_machdep.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
elf32_machdep.c The recent bump of MAXDSIZ made 32-bit binary execution on 64-bit powerpc fail. 2018-01-03 20:20:43 +00:00
elf64_machdep.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
exec_machdep.c Change the default MSR values used when starting userland and kernel 2018-02-01 05:31:24 +00:00
fpu.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
fuswintr.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
gdb_machdep.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
genassym.c Move the powerpc64 direct map base address from zero to high memory. This 2018-03-07 17:08:07 +00:00
in_cksum.c spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
interrupt.c Clear the WE bit in C code rather than the asm 2017-11-08 01:23:37 +00:00
intr_machdep.c PPC: Add place for NULL chars in intrnames 2018-01-26 09:38:40 +00:00
iommu_if.m
machdep.c Execute PowerPC64/AIM kernel from direct map region when possible. 2018-03-13 15:03:58 +00:00
mem.c Move the powerpc64 direct map base address from zero to high memory. This 2018-03-07 17:08:07 +00:00
mmu_if.m Remove hard-coded trap-handling logic involving the segmented memory model 2018-01-29 04:33:41 +00:00
mp_machdep.c Fix PowerMac G5 thermal management, plus likely other bugs, introduced in 2018-02-09 20:09:32 +00:00
nexus.c
openpic.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
pic_if.m
platform_if.m Remove platform_cpu_idle() and platform_cpu_idle_wakeup() interfaces 2018-02-24 01:46:56 +00:00
platform.c Remove assumption that all physical memory is available to the kernel and 2018-03-03 02:04:40 +00:00
pmap_dispatch.c Remove hard-coded trap-handling logic involving the segmented memory model 2018-01-29 04:33:41 +00:00
ptrace_machdep.c
sc_machdep.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
setjmp.S
sigcode32.S
sigcode64.S
stack_machdep.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
suswintr.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
swtch32.S
swtch64.S PPC64: fix TOC behavior on process initialization 2018-01-18 07:42:51 +00:00
syncicache.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
sys_machdep.c sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
trap.c Split printtrap() into generic and CPU-specific components 2018-02-21 03:34:33 +00:00
uio_machdep.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uma_machdep.c Move the powerpc64 direct map base address from zero to high memory. This 2018-03-07 17:08:07 +00:00
vm_machdep.c Change the default MSR values used when starting userland and kernel 2018-02-01 05:31:24 +00:00