I have three separate questions.
seL4cp for cortex_a53
I tried building and booting the sel4cp for the qemu_virt_arm board and for the zcu102 and boot the resulting files on the generic cortex_a53 emulation in on Renode. The ZCU102 don’t even start to boot. The qemu_virt_arm gets a little ways.
I found that the loader.img file is not recognized by any of the load options in Renode. Instead I tried loading all of the individual ELF files like this:
sysbus LoadELF @/home/esandberg/projects/sel4/hans-sel4/cortex-a53/renode-14/sel4cp/qemu_virt/loader.elf
sysbus LoadSymbolsFrom @/home/esandberg/projects/sel4/hans-sel4/cortex-a53/renode-14/sel4cp/qemu_virt/kernel.elf
sysbus LoadSymbolsFrom @/home/esandberg/projects/sel4/hans-sel4/cortex-a53/renode-14/sel4cp/qemu_virt/kernel.elf
but I am getting this error :
LDR|INFO: altloader for seL4 starting
LDR|ERROR: mismatch on loader data structure magic number
I think that is because I am not specifying the loader link address, but I don’t have the option to do so when I use direct kernel boot instead of u-boot. I tried stripping the elf files into dat files like this:
arm-linux-gnueabi-objcopy -O binary hello.elf hello.bin
arm-linux-gnueabi-objcopy -O binary kernel.elf kernel.bin
arm-linux-gnueabi-objcopy -O binary loader.elf loader.bin
Thinking that might remove references to the loader link address. The conversion causes Renode to no longer recognizes the files. If you have suggestions to try I would like to hear them. Also could point me to where the file format is chosen so I could create an elf file that combines the loader, the kernel and the example? I think an ELF would be better recognized by Renode.
seL4cp for for polarfire in QEMU
I tried the commit you mentioned. Still having trouble in QEMU. I see this now:
Booting all finished, dropped to user space
MON|INFO: seL4 Core Platform Bootstrap
MON|INFO: bootinfo untyped list matches expected list
MON|INFO: Number of bootstrap invocations: 0x00000009
MON|INFO: Number of system invocations: 0x00000021
seL4 failed assertion 'NODE_STATE(ksCurTime) < MAX_RELEASE_TIME' at /host/seL4/include/kernel/thread.h:235 in function updateTimestamp
halting...
Kernel entry via Syscall, number: 1, Call
Cap type: 2, Invocation tag: 1
seL4cp for for polarfire on hardware
You asked me to try to boot on the hardware. Perhaps you can advise on how to do that as well. I am able to boot into u-boot and from there I should be able to boot your loader.img. To do so I think I need to convert it to a u-boot image. I tried to adapt the instructions I pointed to above for sel4test on the polarfire:
mkimage -A riscv -O linux -T kernel -C none -a 0x80000000 -e 0x80000000 -n sel4test -d \
images/sel4test-driver-image-riscv-polarfire images/seL4-uImage
cp kernel/kernel.dtb images/
but I am unsure what to use for the load address (-a) and entry point (-e). Would the “Domain1 Next Address” in the below output be the load address? How would I find the entry point?
OpenSBI v1.2
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : Microchip PolarFire(R) SoC
Platform Features : medeleg
Platform HART Count : 5
Platform IPI Device : aclint-mswi
Platform Timer Device : aclint-mtimer @ 1000000Hz
Platform Console Device : mmuart
Platform HSM Device : mpfs_hsm
Platform PMU Device : ---
Platform Reboot Device : mpfs_reset
Platform Shutdown Device : mpfs_reset
Firmware Base : 0xa000000
Firmware Size : 144 KB
Runtime SBI Version : 1.0
Domain0 Name : root
Domain0 Boot HART : 1
Domain0 HARTs : 1,2,3,4
Domain0 Region00 : 0x0000000002008000-0x000000000200bfff (I)
Domain0 Region01 : 0x0000000002000000-0x0000000002007fff (I)
Domain0 Region02 : 0x000000000a000000-0x000000000a03ffff ()
Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000001000200000
Domain0 Next Arg1 : 0x0000000000000000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Domain1 Name : u-boot.bin
Domain1 Boot HART : 1
Domain1 HARTs : 1*,2*,3*,4*
Domain1 Region00 : 0x000000000a000000-0x000000000a03ffff ()
Domain1 Region01 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain1 Next Address : 0x0000001000200000
Domain1 Next Arg1 : 0x0000000000000000
Domain1 Next Mode : S-mode
Domain1 SysReset : yes
Boot HART ID : 1
Boot HART Domain : u-boot.bin
Boot HART Priv Version : v1.10
Boot HART Base ISA : rv64imafdc
Boot HART ISA Extensions : none
Boot HART PMP Count : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 36
Boot HART MHPM Count : 2
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b109