Jelajahi Sumber

fw: set gp for the IRQ bank too

Need to initialize gp in the IRQ register bank too.
H. Peter Anvin 3 tahun lalu
induk
melakukan
211ec5e0c8
7 mengubah file dengan 3261 tambahan dan 3259 penghapusan
  1. TEMPAT SAMPAH
      fpga/output_files/max80.jbc
  2. TEMPAT SAMPAH
      fpga/output_files/max80.jic
  3. TEMPAT SAMPAH
      fpga/output_files/max80.pof
  4. TEMPAT SAMPAH
      fpga/output_files/max80.sof
  5. 3255 3255
      fw/boot.mif
  6. 1 0
      fw/head.S
  7. 5 4
      fw/irq.c

TEMPAT SAMPAH
fpga/output_files/max80.jbc


TEMPAT SAMPAH
fpga/output_files/max80.jic


TEMPAT SAMPAH
fpga/output_files/max80.pof


TEMPAT SAMPAH
fpga/output_files/max80.sof


File diff ditekan karena terlalu besar
+ 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...
 	la gp, __global_pointer$
 	.option pop
+	addqxi gp,gp,0		// Set gp for interrupt code too
 	sw t0, time_zero, t1
 	j _start
 	.type _reset, @function

+ 5 - 4
fw/irq.c

@@ -5,6 +5,7 @@
 /* Invalid interrupt */
 static void spurious_irq_handler(unsigned int vector)
 {
+    con_printf("spurious interrupt: %u\n", 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];
     __irq_handler_table[vector] = handler;
 
-    if (enable && handler)
+    if (enable)
 	unmask_irq(vector);
 
     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;
 }

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini