From 78bf83de4af9136bce6bfc93fa9e1c8ccbad2e10 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 11 Jun 2018 12:01:34 +1000 Subject: Rework/shrink the "bad exceptions" stubs Signed-off-by: Benjamin Herrenschmidt --- cf-code/cf-fsi-fw.S | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/cf-code/cf-fsi-fw.S b/cf-code/cf-fsi-fw.S index 4b5c9bf..3d70efc 100644 --- a/cf-code/cf-fsi-fw.S +++ b/cf-code/cf-fsi-fw.S @@ -154,7 +154,7 @@ _vecs: * starting at 0x10000, 0x10 bytes each */ .rept 254 -0: .long 0x10000 + (0b - _vecs) * 4 +0: .long _bad_exceptions + (0b - _vecs) .endr /* @@ -535,15 +535,20 @@ _int: move.l %d0,%a2@(CVIC_SW_IRQ_CLR) rte - /* Bad exception stubs */ - .org 0x10000 -_bad_exceptions: - .rept 256 - .balign 0x10 -0: move.b #(0b - _bad_exceptions) / 0x10,%d0 + /* Bad exception handler */ +bad_exception: + move.l %a7@+,%d0 + move.l _bad_exceptions + 4,%d1 + sub.l %d1,%d0 + lsr.l #2,%d0 move.b %d0,%a1@(BAD_INT_VEC) move.b #STAT_ERR_INVAL_IRQ,%a1@(STAT_REG) halt + + /* Bad exception stubs */ +_bad_exceptions: + .rept 256 + bsr.w bad_exception .endr /* Stack */ -- cgit v1.2.1