瀏覽代碼

Merge pull request #625 from chinesebear/master

fix loongson 1c启动异常
Bernard Xiong 9 年之前
父節點
當前提交
bef87f8aff
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      libcpu/mips/loongson_1c/context_gcc.S

+ 7 - 0
libcpu/mips/loongson_1c/context_gcc.S

@@ -36,7 +36,14 @@ rt_hw_interrupt_disable:
  */
     .globl rt_hw_interrupt_enable
 rt_hw_interrupt_enable:
+    ori     a0, 0x00000800   
     mtc0    a0, CP0_STATUS
+    ehb
+    mfc0    v0, CP0_CAUSE
+    ehb
+    or      v1, v0, 0x800000                 //EBASE + 0x200                                                                                                 
+    mtc0    v1, CP0_CAUSE
+    ehb
     jr      ra
     nop