diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-06-26 20:28:10 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-07-07 16:25:44 +0900 |
commit | a15119db2ff5c2fdfdeb913b297bf8aa3399132e (patch) | |
tree | 7d6f779408bb772b11c029ab88000fc01856b599 /roms/openbios/arch/sparc32/vectors.S | |
parent | 340f06c9eaee097e626c251bf7a013350649c091 (diff) | |
download | qemu-a15119db2ff5c2fdfdeb913b297bf8aa3399132e.tar.gz qemu-a15119db2ff5c2fdfdeb913b297bf8aa3399132e.tar.bz2 qemu-a15119db2ff5c2fdfdeb913b297bf8aa3399132e.zip |
Imported Upstream version 2.0.0upstream/2.0.0
Change-Id: I081766c4314e7893f54fec80b920b1638d15021f
Diffstat (limited to 'roms/openbios/arch/sparc32/vectors.S')
-rw-r--r-- | roms/openbios/arch/sparc32/vectors.S | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/roms/openbios/arch/sparc32/vectors.S b/roms/openbios/arch/sparc32/vectors.S index f728d5fba..e812cecb9 100644 --- a/roms/openbios/arch/sparc32/vectors.S +++ b/roms/openbios/arch/sparc32/vectors.S @@ -41,6 +41,9 @@ trap_table: #define WINDOW_FILL \ rd %psr, %l0; rd %wim, %l3; b fill_window_entry; nop; +#define TRAP_DFAULT(lvl) \ + rd %psr, %l0; rd %wim, %l3; b handle_dfault; mov lvl, %l7; + #define BTRAP(lvl) ba bug; mov lvl, %g1; nop; nop; #define BTRAPS(x) BTRAP(x) BTRAP(x+1) BTRAP(x+2) BTRAP(x+3) BTRAP(x+4) BTRAP(x+5) BTRAP(x+6) BTRAP(x+7) #define TRAP_ENTRY_INTERRUPT(int_level) \ @@ -54,7 +57,9 @@ t_zero: b entry; nop; nop; nop; t_wovf: WINDOW_SPILL /* Window Overflow */ t_wunf: WINDOW_FILL /* Window Underflow */ BTRAP(0x7) - BTRAPS(0x8) + BTRAP(0x8) + TRAP_DFAULT(0x9) + BTRAP(0xa) BTRAP(0xb) BTRAP(0xc) BTRAP(0xd) BTRAP(0xe) BTRAP(0xf) #if 0 BAD_TRAP(0x10) t_irq1: TRAP_ENTRY_INTERRUPT(1) /* IRQ Software/SBUS Level 1 */ @@ -80,7 +85,10 @@ t_irq10: TRAP_ENTRY_INTERRUPT(10) /* IRQ Timer #1 (one we use) t_irq14: TRAP_ENTRY_INTERRUPT(14) /* IRQ Timer #2 */ BTRAP(0x1f) #endif - BTRAPS(0x20) BTRAPS(0x28) + BTRAPS(0x20) + BTRAP(0x28) + TRAP_DFAULT(0x29) + BTRAP(0x2a) BTRAP(0x2b) BTRAP(0x2c) BTRAP(0x2d) BTRAP(0x2e) BTRAP(0x2f) BTRAPS(0x30) BTRAPS(0x38) BTRAPS(0x40) BTRAPS(0x48) BTRAPS(0x50) BTRAPS(0x58) @@ -199,6 +207,11 @@ irq_entry14: sethi %hi(counter_regs), %l7 ld [%l7 + %lo(counter_regs)], %l7 ld [%l7], %g0 + sethi %hi(obp_ticks), %l7 + ld [%l7 + %lo(obp_ticks)], %l7 + ld [%l7], %l6 + add %l6, 10, %l6 + st %l6, [%l7] jmp %l1 rett %l2 @@ -206,6 +219,30 @@ irq_entry14: #include "wof.S" #include "wuf.S" +/* Data fault handler */ + .data + .align 4 + .global ignore_dfault + +ignore_dfault: + .word 0 + + .text + .align 4 + +handle_dfault: + /* If ignore_dfault is 0, fall through to normal exception handler */ + sethi %hi(ignore_dfault), %l4 + ld [%l4 + %lo(ignore_dfault)], %l4 + tst %l4 + bz,a bug + mov %l7, %g1 + + /* Otherwise skip the faulting instruction and return */ + jmp %l2 + rett %l2 + 4 + + .section .rodata _BUG_message_0: .string "Unhandled Exception 0x" |