mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
riscv: Use Qemu and update to ISA v1.10
- remove Spike/BBL support in favour of Qemu (>=4.2.1) - add 'riscv_qemu' board, remove 'spike' board' - update to privileged ISA v1.10 (from v1.9.1) - use direct system calls for privileged core threads (they call into the kernel and don't use mode changing system calls, i.e. 'ecall', semantics) - use 'OpenSBI' semtantics for SBI calls (to machine mode) instead of BBL issue #4012
This commit is contained in:
committed by
Norman Feske
parent
18e282ab8a
commit
fd0e6685fc
@@ -1,9 +1,11 @@
|
||||
# local variable for run-tool arguments used for running scenarios in Qemu
|
||||
QEMU_RUN_OPT := --include power_on/qemu --include log/qemu
|
||||
|
||||
# kernel to use
|
||||
KERNEL ?= hw
|
||||
|
||||
# board to use
|
||||
BOARD ?= spike
|
||||
# board to use (riscv_qemu)
|
||||
BOARD ?= riscv_qemu
|
||||
|
||||
# local variable for run-tool arguments that depend on the used board
|
||||
BOARD_RUN_OPT(spike) = --include image/bbl --include power_on/spike --include log/spike
|
||||
|
||||
BOARD_RUN_OPT(riscv_qemu) = $(QEMU_RUN_OPT)
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
proc run_image {elf_img} {
|
||||
puts "using '$elf_img' as bbl image"
|
||||
|
||||
exec rm -f bbl/image.o
|
||||
exec -ignorestderr make IMAGE_ELF=[pwd]/$elf_img bbl
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
source [genode_dir]/tool/run/log.inc
|
||||
source [genode_dir]/tool/run/spike.inc
|
||||
|
||||
|
||||
proc run_log { wait_for_re timeout_value } {
|
||||
global spike_spawn_id
|
||||
global output_spawn_id
|
||||
|
||||
set kernel_msg [run_boot_string]
|
||||
set output_spawn_id $spike_spawn_id
|
||||
|
||||
if {$wait_for_re == "forever"} {
|
||||
set timeout -1
|
||||
} else {
|
||||
set timeout $timeout_value
|
||||
}
|
||||
|
||||
expect {
|
||||
-i $output_spawn_id $kernel_msg { }
|
||||
eof {
|
||||
puts stderr "Aborting, received EOF"
|
||||
return false
|
||||
}
|
||||
timeout {
|
||||
puts stderr "Boot process timed out"
|
||||
close
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
wait_for_output $wait_for_re $timeout_value $spike_spawn_id
|
||||
return true
|
||||
}
|
||||
@@ -52,6 +52,7 @@ proc run_power_on { } {
|
||||
if {[have_spec x86_64]} { set qemu "qemu-system-x86_64" }
|
||||
if {[have_spec arm]} { set qemu "qemu-system-arm" }
|
||||
if {[have_spec arm_64]} { set qemu "qemu-system-aarch64" }
|
||||
if {[have_spec riscv]} { set qemu "qemu-system-riscv64" }
|
||||
|
||||
#
|
||||
# Only the x86_64 variant of Qemu provides the emulation of hardware
|
||||
@@ -155,8 +156,14 @@ proc run_power_on { } {
|
||||
append qemu_args " -machine q35 "
|
||||
}
|
||||
|
||||
# on ARM, we supply the boot image as kernel
|
||||
if {[have_spec arm] || [have_spec arm_v8]} { append qemu_args " -kernel [run_dir]/boot/image.elf " }
|
||||
if {[have_board riscv_qemu]} {
|
||||
append qemu_args " -m 128 -machine virt -cpu rv64,priv_spec=v1.10.0 "
|
||||
append qemu_args " -bios default "
|
||||
}
|
||||
|
||||
# on ARM/RISC-V, we supply the boot image as kernel
|
||||
if {[have_spec arm] || [have_spec arm_v8] || [have_spec riscv]} {
|
||||
append qemu_args " -kernel [run_dir]/boot/image.elf " }
|
||||
|
||||
eval spawn $qemu $qemu_args
|
||||
set qemu_spawn_id $spawn_id
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
# Execute scenario using spike
|
||||
#
|
||||
source [genode_dir]/tool/run/spike.inc
|
||||
|
||||
proc is_spike_available { } {
|
||||
|
||||
if {[have_spec riscv]} { return true }
|
||||
|
||||
puts stderr "skipping execution because platform is not supported by spike"
|
||||
return false
|
||||
}
|
||||
|
||||
proc run_power_on { } {
|
||||
global spike_args
|
||||
global spike
|
||||
global spike_spawn_id
|
||||
|
||||
if {![is_spike_available]} { return 0 }
|
||||
|
||||
append spike_args "-m128 [pwd]/debug/bbl "
|
||||
|
||||
set spike "spike"
|
||||
eval spawn $spike $spike_args
|
||||
set spike_spawn_id $spawn_id
|
||||
|
||||
return true
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
set spike_spawn_id ""
|
||||
Reference in New Issue
Block a user