소스 검색

fw: make sure to clear the timer IRQ counter on init...

.sbss isn't being cleared on soft reset anymore...
H. Peter Anvin 3 년 전
부모
커밋
bc09800c11
6개의 변경된 파일3482개의 추가작업 그리고 3479개의 파일을 삭제
  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. 3478 3478
      fw/boot.mif
  6. 4 1
      fw/hello.c

BIN
fpga/output_files/max80.jbc


BIN
fpga/output_files/max80.jic


BIN
fpga/output_files/max80.pof


BIN
fpga/output_files/max80.sof


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3478 - 3478
fw/boot.mif


+ 4 - 1
fw/hello.c

@@ -145,6 +145,7 @@ static void periodic_irq(unsigned int vector)
     set_led(count >> 3); /* 4 Hz */
 }
 
+static uint32_t timer_irq_start;
 static void init(void)
 {
     static const char hello[] =
@@ -156,6 +157,8 @@ static void init(void)
 
     con_puts(hello);
 
+    timer_irq_count = 0;
+    timer_irq_start = rdtime();
     register_irq(3, periodic_irq, true);
 }
 
@@ -184,7 +187,7 @@ void main(void)
     scrub_sdram();
 
     irq_count = timer_irq_count;
-    done = rdtime() - time_zero;
+    done = rdtime() - timer_irq_start;
 
     con_printf("%u timer interrupts received in %u us\n",
 	       irq_count, done/(CPU_HZ/1000000));

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.