When firmware is small enough, it can be interesting to run code from an embedded blockram memory (faster and not impacted by memory controller activity).
It can also be a fallback option in case boot from flash failed.
To use this, define ROM_BOOT_ADDRESS and initialize the blockram with the firmware data.
boot(0, 0, 0, MAIN_RAM_BASE);
}
#endif
+
+#ifdef ROM_BOOT_ADDRESS
+/* When firmware is small enough, it can be interesting to run code from an
+ embedded blockram memory (faster and not impacted by memory controller
+ activity). Define ROM_BOOT_ADDRESS for that and initialize the blockram
+ with the firmware data. */
+void romboot(void)
+{
+ boot(0, 0, 0, ROM_BOOT_ADDRESS);
+}
+#endif
void serialboot(void);
void netboot(void);
void flashboot(void);
+void romboot(void);
#endif /* __BOOT_H */
puts("serialboot - boot via SFL");
#ifdef FLASH_BOOT_ADDRESS
puts("flashboot - boot from flash");
+#endif
+#ifdef ROM_BOOT_ADDRESS
+ puts("romboot - boot from embedded rom");
#endif
puts("revision - display revision");
#ifdef CSR_SDRAM_BASE
#ifdef FLASH_BOOT_ADDRESS
else if(strcmp(token, "flashboot") == 0) flashboot();
+#endif
+#ifdef ROM_BOOT_ADDRESS
+ else if(strcmp(token, "romboot") == 0) romboot();
#endif
else if(strcmp(token, "serialboot") == 0) serialboot();
#ifdef CSR_ETHMAC_BASE
if(test_user_abort()) {
#ifdef FLASH_BOOT_ADDRESS
flashboot();
+#endif
+#ifdef ROM_BOOT_ADDRESS
+ romboot();
#endif
serialboot();
#ifdef CSR_ETHMAC_BASE