From 9c58bbd720b73b9c9c3bf9e86797077f053a9eb3 Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Tue, 8 Jan 2019 00:04:17 +1000 Subject: core/exceptions: save current MSR in exception frame Save and print the MSR of the interrupt context. This can be derived from the interrupt type, SRR1, and other system register settings. But it can be useful to quickly verify what's happening. Signed-off-by: Nicholas Piggin Signed-off-by: Stewart Smith --- asm/asm-offsets.c | 1 + asm/head.S | 2 ++ 2 files changed, 3 insertions(+) (limited to 'asm') diff --git a/asm/asm-offsets.c b/asm/asm-offsets.c index 3eac592..45f4243 100644 --- a/asm/asm-offsets.c +++ b/asm/asm-offsets.c @@ -87,6 +87,7 @@ int main(void) OFFSET(STACK_CTR, stack_frame, ctr); OFFSET(STACK_LR, stack_frame, lr); OFFSET(STACK_PC, stack_frame, pc); + OFFSET(STACK_MSR, stack_frame, msr); OFFSET(STACK_CFAR, stack_frame, cfar); OFFSET(STACK_SRR0, stack_frame, srr0); OFFSET(STACK_SRR1, stack_frame, srr1); diff --git a/asm/head.S b/asm/head.S index 1189fc4..336afc9 100644 --- a/asm/head.S +++ b/asm/head.S @@ -217,8 +217,10 @@ _exception: std %r6,STACK_HSRR1(%r1) mfspr %r3,SPR_DSISR mfspr %r4,SPR_DAR + mfmsr %r5 stw %r3,STACK_DSISR(%r1) std %r4,STACK_DAR(%r1) + std %r5,STACK_MSR(%r1) mr %r3,%r1 LOAD_IMM64(%r4, SKIBOOT_BASE) LOAD_IMM32(%r5, exception_entry_foo - __head) -- cgit v1.1