SVNews r330845

NOTE: This service is experimental and subject to change! Use at your own risk!

2018-03-13 15:03:58 - r330845 by nwhitehorn (Nathan Whitehorn)

Complete list of files affected by revision r330845:

(Note: At the moment, these links point to ViewVC on They are probably slow. Do not overuse.)

  History   Contents   Diff   MODIFY   /head/sys/powerpc/aim/aim_machdep.c  
  History   Contents   Diff   MODIFY   /head/sys/powerpc/aim/locore64.S  
  History   Contents   Diff   MODIFY   /head/sys/powerpc/aim/mmu_oea64.c  
  History   Contents   Diff   MODIFY   /head/sys/powerpc/ofw/ofwcall64.S  
  History   Contents   Diff   MODIFY   /head/sys/powerpc/powerpc/machdep.c  

Commit message:

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

Reviewed by: jhibbits
Differential Revision: D14647


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 14 ms, 5 files printed. Current time is 2018-03-22 06:01:56. All times are in UTC/GMT.