From 32eadeb2503fd632f1a78c0b3ac9fcc64d6cd3c4 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 20 Apr 2010 13:27:48 +0000 Subject: 2010-04-20 Allan Hessenflow * cpu_asm.S: L0-L3 were part of the interrupt context, but as Mike Frysinger noted they were not being zeroed before calling the C handlers. A patch that corrects this, as well as improving some of the push/pop order to avoid stalls. --- cpukit/score/cpu/bfin/ChangeLog | 7 +++++++ cpukit/score/cpu/bfin/cpu_asm.S | 28 +++++++++++++++++++--------- 2 files changed, 26 insertions(+), 9 deletions(-) (limited to 'cpukit/score') diff --git a/cpukit/score/cpu/bfin/ChangeLog b/cpukit/score/cpu/bfin/ChangeLog index 14bd10ba49..e7c04fa420 100644 --- a/cpukit/score/cpu/bfin/ChangeLog +++ b/cpukit/score/cpu/bfin/ChangeLog @@ -1,3 +1,10 @@ +2010-04-20 Allan Hessenflow + + * cpu_asm.S: L0-L3 were part of the interrupt context, but as + Mike Frysinger noted they were not being zeroed before calling + the C handlers. A patch that corrects this, as well as improving + some of the push/pop order to avoid stalls. + 2010-04-17 Allan Hessenflow * cpu.c, cpu_asm.S, rtems/score/cpu.h: Fine tune registers saved in the diff --git a/cpukit/score/cpu/bfin/cpu_asm.S b/cpukit/score/cpu/bfin/cpu_asm.S index 7180c635fc..8f80e82ae1 100644 --- a/cpukit/score/cpu/bfin/cpu_asm.S +++ b/cpukit/score/cpu/bfin/cpu_asm.S @@ -383,10 +383,10 @@ vectorIDLoop: [--sp] = r3; [--sp] = p3; [--sp] = p2; - [--sp] = lt1; - [--sp] = lt0; [--sp] = lc1; [--sp] = lc0; + [--sp] = lt1; + [--sp] = lt0; [--sp] = lb1; [--sp] = lb0; [--sp] = i3; @@ -406,8 +406,13 @@ vectorIDLoop: [--sp] = b1; [--sp] = b0; [--sp] = rets; - r1 = fp; /* is this really what should be passed here? */ /* call user isr; r0 = vector number, r1 = frame pointer */ + r1 = fp; /* is this really what should be passed here? */ + r2 = 0; + l0 = r2; + l1 = r2; + l2 = r2; + l3 = r2; sp += -12; /* bizarre abi... */ call (p0); sp += 12; @@ -430,10 +435,10 @@ vectorIDLoop: i3 = [sp++]; lb0 = [sp++]; lb1 = [sp++]; - lc0 = [sp++]; - lc1 = [sp++]; lt0 = [sp++]; lt1 = [sp++]; + lc0 = [sp++]; + lc1 = [sp++]; p2 = [sp++]; p3 = [sp++]; r3 = [sp++]; @@ -515,10 +520,10 @@ __ISR15_Handler: [--sp] = p2; [--sp] = p1; [--sp] = p0; - [--sp] = lt1; - [--sp] = lt0; [--sp] = lc1; [--sp] = lc0; + [--sp] = lt1; + [--sp] = lt0; [--sp] = lb1; [--sp] = lb0; [--sp] = i3; @@ -537,6 +542,11 @@ __ISR15_Handler: [--sp] = b2; [--sp] = b1; [--sp] = b0; + r2 = 0; + l0 = r2; + l1 = r2; + l2 = r2; + l3 = r2; sp += -12; /* bizarre abi... */ call __Thread_Dispatch; sp += 12; @@ -558,10 +568,10 @@ __ISR15_Handler: i3 = [sp++]; lb0 = [sp++]; lb1 = [sp++]; - lc0 = [sp++]; - lc1 = [sp++]; lt0 = [sp++]; lt1 = [sp++]; + lc0 = [sp++]; + lc1 = [sp++]; p0 = [sp++]; p1 = [sp++]; p2 = [sp++]; -- cgit v1.2.3