Преглед изворни кода

fw: slightly more informative sdram and timer messages

H. Peter Anvin пре 3 година
родитељ
комит
1506439cb0
6 измењених фајлова са 5332 додато и 5329 уклоњено
  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. 5316 5316
      fw/boot.mif
  6. 16 13
      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


Разлика између датотеке није приказан због своје велике величине
+ 5316 - 5316
fw/boot.mif


+ 16 - 13
fw/hello.c

@@ -116,17 +116,19 @@ static void test_download(void)
 	    (uint32_t)((val * 0x89abcdefULL) >> 32) +
 	    (w * 0x76543210);
     }
-    con_printf("%u/%u words OK\n\n", ok, words);
-
-    for (unsigned int o = 0; o < (512*1024); o += (64*1024)) {
-	volatile uint16_t *hp = (uint16_t *)(SDRAM_ADDR + o);
-	p = (uint32_t *)(SDRAM_ADDR + o);
-	for (unsigned int w = 0; w < 8; w++) {
-	    uint16_t l = *hp++;
-	    uint16_t h = *hp++;
-	    con_printf(" %04x.%04x", l, h);
+    con_printf("SDRAM download: %u/%u words OK\n", ok, words);
+
+    if (ok != words) {
+	for (unsigned int o = 0; o < (512*1024); o += (64*1024)) {
+	    volatile uint16_t *hp = (uint16_t *)(SDRAM_ADDR + o);
+	    p = (uint32_t *)(SDRAM_ADDR + o);
+	    for (unsigned int w = 0; w < 8; w++) {
+		uint16_t l = *hp++;
+		uint16_t h = *hp++;
+		con_printf(" %04x.%04x", l, h);
+	    }
+	    con_putc('\n');
 	}
-	con_putc('\n');
     }
 }
 
@@ -296,10 +298,11 @@ void main(void)
     scrub_sdram();
 
     irq_count = timer_irq_count;
-    done = rdtime() - timer_irq_start;
+    done = rdtime() - time_zero; /* timer_irq_start */
 
-    con_printf("%u timer interrupts received in %u us\n",
-	       irq_count, done/(CPU_HZ/1000000));
+    con_printf("%u timer interrupts received in %u ms, ~%u expected\n",
+	       irq_count, done/(CPU_HZ/1000),
+	       (done+(CPU_HZ/64))/(CPU_HZ/32));
 
     udelay(1000000);
     con_puts("*** Doing reset ***\n");

Неке датотеке нису приказане због велике количине промена