浏览代码

fw: set gp for the IRQ bank too

Need to initialize gp in the IRQ register bank too.
H. Peter Anvin 3 年之前
父节点
当前提交
211ec5e0c8
共有 7 个文件被更改,包括 3261 次插入3259 次删除
  1. 二进制
      fpga/output_files/max80.jbc
  2. 二进制
      fpga/output_files/max80.jic
  3. 二进制
      fpga/output_files/max80.pof
  4. 二进制
      fpga/output_files/max80.sof
  5. 3255 3255
      fw/boot.mif
  6. 1 0
      fw/head.S
  7. 5 4
      fw/irq.c

二进制
fpga/output_files/max80.jbc


二进制
fpga/output_files/max80.jic


二进制
fpga/output_files/max80.pof


二进制
fpga/output_files/max80.sof


文件差异内容过多而无法显示
+ 3255 - 3255
fw/boot.mif


+ 1 - 0
fw/head.S

@@ -11,6 +11,7 @@ _reset:
 	.option norelax		// Can't make gp references to set up gp...
 	.option norelax		// Can't make gp references to set up gp...
 	la gp, __global_pointer$
 	la gp, __global_pointer$
 	.option pop
 	.option pop
+	addqxi gp,gp,0		// Set gp for interrupt code too
 	sw t0, time_zero, t1
 	sw t0, time_zero, t1
 	j _start
 	j _start
 	.type _reset, @function
 	.type _reset, @function

+ 5 - 4
fw/irq.c

@@ -5,6 +5,7 @@
 /* Invalid interrupt */
 /* Invalid interrupt */
 static void spurious_irq_handler(unsigned int vector)
 static void spurious_irq_handler(unsigned int vector)
 {
 {
+    con_printf("spurious interrupt: %u\n", vector);
     mask_irq(vector);
     mask_irq(vector);
 }
 }
 
 
@@ -34,14 +35,14 @@ irq_handler_t register_irq(unsigned int vector, irq_handler_t handler,
     old_handler = __irq_handler_table[vector];
     old_handler = __irq_handler_table[vector];
     __irq_handler_table[vector] = handler;
     __irq_handler_table[vector] = handler;
 
 
-    if (enable && handler)
+    if (enable)
 	unmask_irq(vector);
 	unmask_irq(vector);
 
 
     if (old_handler == spurious_irq_handler)
     if (old_handler == spurious_irq_handler)
-	handler = NULL;
+	old_handler = NULL;
 
 
-    con_printf("irq: register vector %u, mask = %08x\n",
-	       vector, irqmask());
+    con_printf("irq: register vector %u, handler = %p, mask = %08x\n",
+	       vector, handler, irqmask());
 
 
     return old_handler;
     return old_handler;
 }
 }

部分文件因为文件数量过多而无法显示