xous-core/emulation/xous-release.resc
Sean Cross 3de0b4cf06 emulation: connect sha512 to Renode
Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-28 21:35:17 +08:00

78 lines
2 KiB
Text

# Boot Renode Script (boot.resc)
# Add this script's path to the global path, so
# we can include files relative to ourselves.
path add $ORIGIN
using sysbus
# Add peripherals that are defined in C#. You must restart Renode
# if you modify these files.
i @peripherals/ABRTCMC.cs
i @peripherals/BetrustedI2C.cs
i @peripherals/keyboard.cs
i @peripherals/LiteX_Timer_32.cs
i @peripherals/memlcd.cs
i @peripherals/sha512.cs
i @peripherals/ticktimer.cs
i @peripherals/trng_kernel.cs
i @peripherals/trng_server.cs
############### Define the Betrusted SoC ###############
mach create "SoC"
machine LoadPlatformDescription @soc/betrusted-soc.repl
machine StartGdbServer 3333 true
showAnalyzer uart
showAnalyzer console
# showAnalyzer app_uart
showAnalyzer memlcd
sysbus Tag <0xB0000000, 0xB0006000> "Framebuffer"
# logLevel -1 keyboard
# logLevel -1 ticktimer
logLevel -1 i2c
logLevel -1 abracom_rtc
# Silence COM and WDT and WFI
sysbus SilenceRange <0xF000D000, 0xF000DFFF>
sysbus SilenceRange <0xF0021000, 0xF0021FFF>
sysbus SilenceRange <0xF0023000, 0xF0023FFF>
# The macro `reset` gets called implicitly when running `machine Reset`
macro reset
"""
sysbus LoadELF @../loader/target/riscv32imac-unknown-none-elf/release/loader
sysbus LoadBinary @../target/riscv32imac-unknown-none-elf/release/args.bin 0x40800000
# Set $a0 to point at the args binary
cpu SetRegisterUnsafe 10 0x40800000
"""
# Connect the serial port to an Ethernet port
mach set 0
emulation CreateServerSocketTerminal 9999 "kernel" False
connector Connect sysbus.uart kernel
runMacro $reset
sysbus.cpu InstallCustomInstructionHandlerFromFile "00ss0fdbbbbbaaaaa000ddddd0001011" @vexriscv-aes.py
mach clear
############### Define the Betrusted EC ###############
mach create "EC"
machine LoadPlatformDescription @ec/betrusted-ec.repl
showAnalyzer uart
macro reset
"""
sysbus LoadBinary @ec/kernel.bin 0x10000000
cpu PC 0x10000000
"""
runMacro $reset
# Silence I2C for now while we work on the driver
sysbus SilenceRange <0xB0000000, 0xB000FFFF>
mach clear
start