From f51366c49d4a5850ca845240ba2f7339190e4c94 Mon Sep 17 00:00:00 2001 From: QiaoChong Date: Tue, 27 Jun 2017 14:58:09 +0800 Subject: [PATCH] add Bonito3a82w timer irq process in asm code. Change-Id: I501c85dc8ffe24bbc47ceec69e9581d79e225d08 Signed-off-by: QiaoChong --- Targets/Bonito3a82w/Bonito/start.S | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Targets/Bonito3a82w/Bonito/start.S b/Targets/Bonito3a82w/Bonito/start.S index 1e6104d0..751f103f 100644 --- a/Targets/Bonito3a82w/Bonito/start.S +++ b/Targets/Bonito3a82w/Bonito/start.S @@ -158,6 +158,19 @@ ext_map_and_reboot: /* General exception */ .align 7 /* bfc00380 */ +#ifdef CLKIRQ_ENABLE + mfc0 k1,COP_0_CAUSE_REG + andi k1,0x807f + xori k1,0x8000 + bnez k1,1f + nop + mfc0 k1,$11 + lui k0,0x1000 + addu k1,k0 + mtc0 k1,$11 + eret +1: +#endif la a0, v380_msg bal stringserial nop @@ -310,6 +323,16 @@ wait_to_be_killed: bne t0, a0, slave_main nop +#ifdef CLKIRQ_ENABLE + li t0, SR_BOOT_EXC_VEC|0x8001 /* Exception to Boostrap Location */ + mtc0 t0, COP_0_STATUS_REG + + li v0,0x10000000 + mtc0 zero,$9 + mtc0 v0,$11 + mtc0 zero, COP_0_CAUSE_REG +#endif + bal initserial nop bal initserial1