From 0992b519b56cc5181d77ac1f1a69769a3f164f22 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 21 Apr 2022 10:19:02 +0800 Subject: [PATCH] emulation: load bootloader from ROM By loading the bootloader from ROM instead of from ELF, we ensure that .bss and friends aren't overwritten. Signed-off-by: Sean Cross --- emulation/betrusted.resc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/emulation/betrusted.resc b/emulation/betrusted.resc index ed574fec8..aa3d20557 100644 --- a/emulation/betrusted.resc +++ b/emulation/betrusted.resc @@ -1,6 +1,5 @@ # Boot Renode Script (boot.resc) -i @emulation/linux-server.resc # Add this script's path to the global path, so # we can include files relative to ourselves. @@ -46,6 +45,9 @@ i @peripherals/wfi.cs EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.CPU.VexRiscv" i @peripherals/vexriscv-aes.cs +EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.Timers.TickTimer" +i @peripherals/susres.cs + # Create the COM SPI bus emulation CreateComConnector "com" @@ -90,10 +92,11 @@ connector Connect sysbus.com com macro reset """ #sysbus LoadBinary @flash-formatted.bin 0x20000000 - sysbus LoadELF @../target/riscv32imac-unknown-xous-elf/release/loader + sysbus LoadBinary @../target/riscv32imac-unknown-xous-elf/release/loader.bin 0x20500000 sysbus LoadBinary @../target/riscv32imac-unknown-xous-elf/release/xous.img 0x20980000 # Set $a0 to point at the args binary cpu SetRegisterUnsafe 10 0x20980000 + cpu PC 0x20501000 """ # Connect the serial port to an Ethernet port @@ -130,9 +133,6 @@ macro reset """ runMacro $reset -connector Connect wifi.wf200 switch - - mach clear start