diff options
author | grehan <grehan@FreeBSD.org> | 2004-07-20 02:22:36 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2004-07-20 02:22:36 +0000 |
commit | a6357c5bada7093460c7ed80c447164dfb7b7425 (patch) | |
tree | 58eabd055aaaa6960148c59f5d59f540afb38584 | |
parent | 9256b26053403f1d7357510273acf61955a446aa (diff) | |
download | FreeBSD-src-a6357c5bada7093460c7ed80c447164dfb7b7425.zip FreeBSD-src-a6357c5bada7093460c7ed80c447164dfb7b7425.tar.gz |
Properly obey PPC context synchronization rules when modifying
the address translation bits of the MSR. This fixes the boot-time
panic reported by Drew Gallatin.
-rw-r--r-- | sys/powerpc/aim/machdep.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 4c3199e..c877b3d 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -309,6 +309,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) * hasn't been mapped (G5) */ mtmsr(mfmsr() & ~(PSL_IR | PSL_DR)); + isync(); bcopy(&trapcode, (void *)EXC_RST, (size_t)&trapsize); bcopy(&trapcode, (void *)EXC_MCHK, (size_t)&trapsize); bcopy(&dsitrap, (void *)EXC_DSI, (size_t)&dsisize); @@ -336,6 +337,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) * Make sure translation has been enabled */ mtmsr(mfmsr() | PSL_IR|PSL_DR|PSL_ME|PSL_RI); + isync(); /* * Initialise virtual memory. diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index 4c3199e..c877b3d 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -309,6 +309,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) * hasn't been mapped (G5) */ mtmsr(mfmsr() & ~(PSL_IR | PSL_DR)); + isync(); bcopy(&trapcode, (void *)EXC_RST, (size_t)&trapsize); bcopy(&trapcode, (void *)EXC_MCHK, (size_t)&trapsize); bcopy(&dsitrap, (void *)EXC_DSI, (size_t)&dsisize); @@ -336,6 +337,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) * Make sure translation has been enabled */ mtmsr(mfmsr() | PSL_IR|PSL_DR|PSL_ME|PSL_RI); + isync(); /* * Initialise virtual memory. |