From a6357c5bada7093460c7ed80c447164dfb7b7425 Mon Sep 17 00:00:00 2001 From: grehan Date: Tue, 20 Jul 2004 02:22:36 +0000 Subject: 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. --- sys/powerpc/aim/machdep.c | 2 ++ sys/powerpc/powerpc/machdep.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'sys') 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. -- cgit v1.1