summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
diff options
context:
space:
mode:
authorandreast <andreast@FreeBSD.org>2013-12-11 22:36:20 +0000
committerandreast <andreast@FreeBSD.org>2013-12-11 22:36:20 +0000
commit66bcaa96d680466f9c02406d1c9c6f6fa8147efe (patch)
tree451f1ba31330be9c8b1f330dff4460957da82a74 /sys/powerpc/aim
parent50221324bd40404e88dea60c7f368087bdd21a77 (diff)
downloadFreeBSD-src-66bcaa96d680466f9c02406d1c9c6f6fa8147efe.zip
FreeBSD-src-66bcaa96d680466f9c02406d1c9c6f6fa8147efe.tar.gz
MFC r257991, r257992, 257993, 258504
r257991: Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware. r257992: Allow OF_decode_addr() to also be able to map resources on big-endian devices. To this end, make PCI device detection rely on the device_type field rather than name, as per the standard. r257993: Make tsec work with the device tree present on the RB800. The previous code assumed that the MDIO bus was a direct child of the Ethernet interface. It may not be and indeed on many device trees is not. While here, add proper locking for MII transactions, which may be on a bus shared by several MACs. r258504: Save and restore the trap vectors when doing OF calls on pSeries machines. It turned out that on pSeries machines the call into OF modified the trap vectors and this made further behaviour unpredictable. With this commit I'm now able to boot multi user on a network booted environment on my IntelliStation 285. This is a POWER5+ machine.
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r--sys/powerpc/aim/machdep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c
index 5ae42bd..4b211fa 100644
--- a/sys/powerpc/aim/machdep.c
+++ b/sys/powerpc/aim/machdep.c
@@ -123,6 +123,7 @@ __FBSDID("$FreeBSD$");
#include <machine/spr.h>
#include <machine/trap.h>
#include <machine/vmparam.h>
+#include <machine/ofw_machdep.h>
#include <ddb/ddb.h>
@@ -249,6 +250,7 @@ extern void *dblow, *dbsize;
extern void *imisstrap, *imisssize;
extern void *dlmisstrap, *dlmisssize;
extern void *dsmisstrap, *dsmisssize;
+char save_trap_init[0x2f00]; /* EXC_LAST */
uintptr_t
powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
@@ -273,6 +275,9 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
trap_offset = 0;
cacheline_warn = 0;
+ /* Save trap vectors. */
+ ofw_save_trap_vec(save_trap_init);
+
#ifdef WII
/*
* The Wii loader doesn't pass us any environment so, mdp
OpenPOWER on IntegriCloud