diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-06-11 12:01:34 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-06-11 12:01:34 +1000 |
commit | 78bf83de4af9136bce6bfc93fa9e1c8ccbad2e10 (patch) | |
tree | d3ad93f493dbd2f6fdba1bd6a5f721c5e466551f /cf-code | |
parent | eb7b14b2ca04dfd2b719572dbea92300106683ad (diff) | |
download | cf-fsi-78bf83de4af9136bce6bfc93fa9e1c8ccbad2e10.tar.gz cf-fsi-78bf83de4af9136bce6bfc93fa9e1c8ccbad2e10.zip |
Rework/shrink the "bad exceptions" stubs
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'cf-code')
-rw-r--r-- | cf-code/cf-fsi-fw.S | 19 |
1 files 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 */ |