Bladeren bron

fw: prevent invalid linker relaxation in irqasm.S

We are making a relative zero-page reference; make sure the
linker doesn't try to turn it into an absolute one (which would mean
always pointing to the base of the table.)
H. Peter Anvin 3 jaren geleden
bovenliggende
commit
d3cac913de
6 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. BIN
      fpga/output_files/max80.jbc
  2. BIN
      fpga/output_files/max80.jic
  3. BIN
      fpga/output_files/max80.pof
  4. BIN
      fpga/output_files/max80.sof
  5. 1 1
      fw/boot.mif
  6. 5 0
      fw/irqasm.S

BIN
fpga/output_files/max80.jbc


BIN
fpga/output_files/max80.jic


BIN
fpga/output_files/max80.pof


BIN
fpga/output_files/max80.sof


+ 1 - 1
fw/boot.mif

@@ -32,7 +32,7 @@ CONTENT BEGIN
 0019 : 9563001D;
 001A : DD930002;
 001B : 0491001D;
-001C : 08C02283;
+001C : 08C4A283;
 001D : 0024D513;
 001E : DD939282;
 001F : 0491001D;

+ 5 - 0
fw/irqasm.S

@@ -40,7 +40,12 @@ _irq:
 	addi s1,s1,1*4
 5:
 	// __irq_handler_table must be in the zero page
+	// However, prevent the linker from incorrectly relaxing
+	// this instruction.
+	.option push
+	.option norelax
 	lw t0,%lo(__irq_handler_table)(s1)
+	.option pop
 	srli a0,s1,2
 	jalr t0
 	srli s11,s11,1