freebsd-dev/sys/powerpc/ofw
Justin Hibbits 62c6b30e5c Fix booting with >4GB RAM on PowerMac G5 hardware
===
From Nathan Whitehorn:

Open Firmware runs in virtual mode on the Powermac G5. This runs inside the
kernel page table, which preserves all address translations made by OF before
the kernel starts; as a result, the kernel address space is a strict superset of
OF's.

Where this explodes is if OF uses an unmapped SLB entry. The SLB fault handler
runs in real mode and refers to the PCPU pointer in SPRG0, which blows up the
kernel. Having a value of SPRG0 that works for the kernel is less fatal than
preserving OF's value in this case.

===

The result of this is seemingly random panics from NULL dereferences, or hangs
immediately upon boot.  By not restoring SPRG0 for Open Firmware entry the
kernel PCPU pointer is preserved and SLB faults are successful, resulting in a
stable kernel.

PR:		205458
Reported by:	several (over bugzilla, lists, IRC)
Reviewed by:	andreast
Tested by:	many (various forms)
MFC after:	2 weeks
2017-03-07 22:11:57 +00:00
..
ofw_machdep.c Fix booting with >4GB RAM on PowerMac G5 hardware 2017-03-07 22:11:57 +00:00
ofw_pcib_pci.c Convert PCIe Hot Plug to using pci_request_feature 2017-02-25 06:11:59 +00:00
ofw_pcibus.c Add a bus_null_rescan() method that always fails with an error. 2016-04-27 17:49:42 +00:00
ofw_pcibus.h
ofw_real.c As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00
ofw_syscons.c Allow callers of OF_decode_addr to get the size of the found mapping. This 2016-02-16 15:18:12 +00:00
ofw_syscons.h
ofwcall32.S Make 32-bit PowerPC kernels, like 64-bit PowerPC kernels, position-independent 2015-03-07 20:14:46 +00:00
ofwcall64.S Use TOC to look up all kernel globals on powerpc64 instead of doing the 2015-01-18 20:00:33 +00:00
ofwmagic.S
openpic_ofw.c Where appropriate, use the endian-flipping OF_getencprop() instead of 2015-11-17 16:07:43 +00:00
rtas.c As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00