bios/boot: add specific flash_boot for linux with vexriscv
This commit is contained in:
parent
1ba1ad9a00
commit
fcd518b5d0
|
@ -304,6 +304,28 @@ void netboot(void)
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef FLASHBOOT_LINUX_VEXRISCV
|
||||
|
||||
/* TODO: add configurable flash mapping, improve integration */
|
||||
|
||||
void flashboot(void)
|
||||
{
|
||||
printf("Loading Image from flash...\n");
|
||||
memcpy((void *)MAIN_RAM_BASE + 0x00000000, (void *)0x50400000, 0x400000);
|
||||
|
||||
printf("Loading rootfs.cpio from flash...\n");
|
||||
memcpy((void *)MAIN_RAM_BASE + 0x02000000, (void *)0x50800000, 0x700000);
|
||||
|
||||
printf("Loading rv32.dtb from flash...\n");
|
||||
memcpy((void *)MAIN_RAM_BASE + 0x03000000, (void *)0x50f00000, 0x001000);
|
||||
|
||||
printf("Loading emulator.bin from flash...\n");
|
||||
memcpy((void *)EMULATOR_RAM_BASE + 0x00000000, (void *)0x50f80000, 0x004000);
|
||||
|
||||
boot(0, 0, 0, EMULATOR_RAM_BASE);
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef FLASH_BOOT_ADDRESS
|
||||
|
||||
/* On systems with exernal SDRAM we copy out of the SPI flash into the SDRAM
|
||||
|
@ -346,6 +368,8 @@ void flashboot(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
|
Loading…
Reference in New Issue