freebsd-dev/sys
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
..
amd64 Reduce code duplication between MD Linux code by moving SYSV IPC 64-bit 2017-03-07 17:07:16 +00:00
arm o Another round fixes for mmc(4), mmcsd(4) and sdhci(4) regarding 2017-03-06 23:47:59 +00:00
arm64 Load the new sp_el0 with interrupts disabled in fork_trampoline. If an 2017-02-15 14:56:47 +00:00
boot ufsread: Use appropriate UFS_MAXNAMLEN constant 2017-03-07 21:40:01 +00:00
bsm
cam Add mechanism to unload CAM periph drivers. 2017-03-07 17:41:08 +00:00
cddl Fix null pointer dereference in zfs_freebsd_setacl(). 2017-03-02 23:23:28 +00:00
compat Add support for constant pointer constructs to READ_ONCE() in the 2017-03-07 20:24:34 +00:00
conf LinuxKPI workqueue cleanup. 2017-03-07 12:09:14 +00:00
contrib Merge ACPICA 20170303. 2017-03-03 18:56:15 +00:00
crypto Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
ddb Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dev Make multi-namespace nvme drives more robust. 2017-03-07 21:47:54 +00:00
fs remove procfs ctl interface 2017-03-05 03:05:24 +00:00
gdb
geom The kern.geom.part.auto_resize should be tunable. 2017-02-28 20:51:20 +00:00
gnu Update our device tree files to a Linux 4.10 2017-03-07 13:56:49 +00:00
i386 Reduce code duplication between MD Linux code by moving SYSV IPC 64-bit 2017-03-07 17:07:16 +00:00
isa Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kern m_mbuftouio() doesn't modify the mbuf. 2017-03-07 19:00:50 +00:00
kgssapi
libkern strstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert 2017-03-01 02:07:51 +00:00
mips o Another round fixes for mmc(4), mmcsd(4) and sdhci(4) regarding 2017-03-06 23:47:59 +00:00
modules qlxgbe: add GCC_MS_EXTENSIONS to CFLAGS to make old base GCC happy 2017-03-07 15:43:49 +00:00
net Introduce the concept of IPsec security policies scope. 2017-03-07 00:13:53 +00:00
net80211 net80211: fix ieee80211_htrateset setup, return EINVAL for an unsupported 2017-03-03 01:06:27 +00:00
netgraph mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION. 2017-01-20 00:02:11 +00:00
netinet The patch provides the same socket option as Linux IP_ORIGDSTADDR. 2017-03-06 04:01:58 +00:00
netinet6 The patch provides the same socket option as Linux IP_ORIGDSTADDR. 2017-03-06 04:01:58 +00:00
netipsec Introduce the concept of IPsec security policies scope. 2017-03-07 00:13:53 +00:00
netnatm
netpfil pf: Fix a crash in low-memory situations 2017-03-06 23:41:23 +00:00
netsmb
nfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsclient Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsserver Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nlm
ofed Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
opencrypto
powerpc Fix booting with >4GB RAM on PowerMac G5 hardware 2017-03-07 22:11:57 +00:00
riscv Implement atomic_fcmpset_*() for RISC-V. 2017-02-05 00:32:12 +00:00
rpc Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
security Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, 2016-11-22 00:41:24 +00:00
sparc64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sys m_mbuftouio() doesn't modify the mbuf. 2017-03-07 19:00:50 +00:00
teken
tests
tools Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ufs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
vm Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
x86 mca: fix up couple of issues introduced with amd thresholding in r314636 2017-03-05 07:46:48 +00:00
xdr
xen xenstore: fix suspension when using the xenstore device 2017-03-07 09:17:48 +00:00
Makefile Remove pc98 support completely. 2017-01-28 02:22:15 +00:00