static void help(void)
{
puts("MiSoC BIOS");
- puts("Don't know what to do? Try 'flashboot'.\n");
puts("Available commands:");
puts("mr - read address space");
puts("mw - write address space");
puts("crc - compute CRC32 of a part of the address space");
puts("rcsr - read processor CSR");
puts("wcsr - write processor CSR");
+#ifdef MINIMAC_BASE
puts("netboot - boot via TFTP");
+#endif
puts("serialboot - boot via SFL");
puts("flashboot - boot from flash");
puts("revision - display revision");
else if(strcmp(token, "flashboot") == 0) flashboot();
else if(strcmp(token, "serialboot") == 0) serialboot();
+#ifdef MINIMAC_BASE
else if(strcmp(token, "netboot") == 0) netboot();
+#endif
else if(strcmp(token, "revision") == 0) printf("%08x\n", GIT_ID);
else if(strcmp(token, "rcsr") == 0) rcsr(get_token(&c));
else if(strcmp(token, "wcsr") == 0) wcsr(get_token(&c), get_token(&c));
+#ifdef DFII_BASE
else if(strcmp(token, "ddrrow") == 0) ddrrow(get_token(&c));
else if(strcmp(token, "ddrsw") == 0) ddrsw();
else if(strcmp(token, "ddrhw") == 0) ddrhw();
else if(strcmp(token, "ddrwr") == 0) ddrwr(get_token(&c));
else if(strcmp(token, "memtest") == 0) memtest();
else if(strcmp(token, "ddrinit") == 0) ddrinit();
+#endif
else if(strcmp(token, "dfs") == 0) dfs(get_token(&c));
printf("Automatic boot in 2 seconds...\n");
printf("Q/ESC: abort boot\n");
printf("F7: boot from serial\n");
+#ifdef MINIMAC_BASE
printf("F8: boot from network\n");
+#endif
timer0_en_write(0);
timer0_reload_write(0);
timer0_load_write(identifier_frequency_read()*2);
serialboot();
return 0;
}
+#ifdef MINIMAC_BASE
if(c == 0x07) {
netboot();
return 0;
}
+#endif
}
timer0_update_value_write(1);
}
if(test_user_abort()) {
flashboot();
serialboot();
+#ifdef MINIMAC_BASE
netboot();
+#endif
printf("No boot medium found\n");
}
}
printf("Revision %08x built "__DATE__" "__TIME__"\n\n", GIT_ID);
crcbios();
id_print();
+#ifdef MINIMAC_BASE
ethreset();
+#endif
+#ifdef DFII_BASE
ddr_ok = ddrinit();
+#else
+ ddr_ok = 1;
+#endif
if(ddr_ok)
boot_sequence();
else