From f328b69076b3e92276ffaa13e8779ed608c974c4 Mon Sep 17 00:00:00 2001 From: Till Straumann Date: Tue, 11 Dec 2007 05:19:55 +0000 Subject: [PATCH] 2007-12-10 Till Straumann * new-exceptions/bspsupport/ppc_exc_hdl.c: make sure RI is set in the exception frame and panic if it isn't (state info might have been lost). This only affects classic PPC. --- c/src/lib/libcpu/powerpc/ChangeLog | 7 +++++++ .../libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index e48e309e81..b9ae8f072d 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,10 @@ +2007-12-10 Till Straumann + + * new-exceptions/bspsupport/ppc_exc_hdl.c: make sure + RI is set in the exception frame and panic if it isn't + (state info might have been lost). This only affects + classic PPC. + 2007-12-10 Till Straumann * new-exceptions/bspsupport/README, diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c index 7d33088a57..a88b2fb371 100644 --- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c +++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c @@ -97,6 +97,12 @@ int rval = 1; rval = 0; } + if ( (ppc_exc_msr_bits ^ f->EXC_SRR1) & MSR_RI ) { + printk("unrecoverable exception (RI was clear), spinning to death.\n"); + while (1) + ; + } + return rval; }