freebsd-skq/sys/powerpc
jhibbits c2061e1c23 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
..
aim Use the explicit expanded form of cmp. 2017-01-18 03:42:21 +00:00
booke Correct the return value for pmap_change_attr() 2017-02-21 05:08:07 +00:00
conf Migrate e1000 to the IFLIB framework: 2017-01-10 03:23:22 +00:00
cpufreq
fpu Un-static two local variables in the FPU emulator 2016-10-19 02:23:29 +00:00
include Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mambo CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
mikrotik - Allow different slicers for different flash types to be registered 2017-02-22 10:21:39 +00:00
mpc85xx Fix r312613. 2017-01-22 06:17:31 +00:00
ofw Fix booting with >4GB RAM on PowerMac G5 hardware 2017-03-07 22:11:57 +00:00
powermac Include pcib_private.h for prototypes. 2017-02-26 21:33:18 +00:00
powerpc Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ps3 Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name) 2017-01-04 20:26:42 +00:00
pseries Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name) 2017-01-04 20:26:42 +00:00
psim Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00