board: Rename virt_qemu to virt_qemu_<arch>

Instead of having a generic "virt_qemu" board use "virt_qemu_<arch>" in
order to have a clean distinction between boards. Current supported
boards are "virt_qemu_arm_v7a", "virt_qemu_arm_v8a", and
"virt_qemu_riscv".

issue #4034
This commit is contained in:
Sebastian Sumpf 2022-08-09 13:32:38 +02:00 committed by Christian Helmuth
parent c462720c28
commit b5c780993c
70 changed files with 85 additions and 58 deletions

View File

@ -0,0 +1 @@
arm_v8a

View File

@ -0,0 +1 @@
0x40000000

View File

@ -1,6 +1,6 @@
REP_INC_DIR += src/bootstrap/board/virt_qemu
REP_INC_DIR += src/bootstrap/board/virt_qemu_arm_v7a
SRC_CC += bootstrap/board/virt_qemu/platform.cc
SRC_CC += bootstrap/board/virt_qemu_arm_v7a/platform.cc
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
SRC_CC += bootstrap/spec/arm/cortex_a15_cpu.cc
SRC_CC += bootstrap/spec/arm/gicv2.cc

View File

@ -1,4 +1,4 @@
REP_INC_DIR += src/core/board/virt_qemu
REP_INC_DIR += src/core/board/virt_qemu_arm_v7a
REP_INC_DIR += src/core/spec/arm/virtualization
# add C++ sources

View File

@ -1,8 +1,8 @@
REP_INC_DIR += src/bootstrap/board/virt_qemu_64
REP_INC_DIR += src/bootstrap/board/virt_qemu_arm_v8a
SRC_CC += bootstrap/spec/arm/gicv3.cc
SRC_CC += bootstrap/spec/arm_64/cortex_a53_mmu.cc
SRC_CC += bootstrap/board/virt_qemu_64/platform.cc
SRC_CC += bootstrap/board/virt_qemu_arm_v8a/platform.cc
SRC_CC += lib/base/arm_64/kernel/interface.cc
SRC_CC += spec/64bit/memory_map.cc
SRC_S += bootstrap/spec/arm_64/crt0.s

View File

@ -1,4 +1,4 @@
REP_INC_DIR += src/core/board/virt_qemu_64
REP_INC_DIR += src/core/board/virt_qemu_arm_v8a
REP_INC_DIR += src/core/spec/arm/virtualization
# add C++ sources

View File

@ -1,4 +0,0 @@
CONTENT += src/core/board/virt_qemu_64 \
src/bootstrap/board/virt_qemu_64
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc

View File

@ -0,0 +1,4 @@
CONTENT += src/core/board/virt_qemu_arm_v7a \
src/bootstrap/board/virt_qemu_arm_v7a
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc

View File

@ -0,0 +1 @@
2022-08-10 70b4f8849f5c72c7d76985d7d5d2dbbd68bb7808

View File

@ -0,0 +1,4 @@
CONTENT += src/core/board/virt_qemu_arm_v8a \
src/bootstrap/board/virt_qemu_arm_v8a
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc

View File

@ -0,0 +1,2 @@
base-hw
base

View File

@ -1,9 +1,8 @@
-m 2048
-M virt,virtualization=true -cpu cortex-a15 -smp 2
-global virtio-mmio.force-legacy=false
-device virtio-net-device,bus=virtio-mmio-bus.0,netdev=net0
-device virtio-mouse-device
-device virtio-keyboard-device
-device virtio-gpu-device
-netdev user,id=net0
arm_v8a: -M virt,virtualization=true,gic-version=3 -cpu cortex-a53 -smp 4
arm_v7a: -M virt,virtualization=true -cpu cortex-a15 -smp 2

View File

@ -0,0 +1,8 @@
-m 2048
-M virt,virtualization=true,gic-version=3 -cpu cortex-a53 -smp 4
-global virtio-mmio.force-legacy=false
-device virtio-net-device,bus=virtio-mmio-bus.0,netdev=net0
-device virtio-mouse-device
-device virtio-keyboard-device
-device virtio-gpu-device
-netdev user,id=net0

View File

@ -1,4 +1,4 @@
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -1,4 +1,4 @@
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -2,7 +2,7 @@ if {[have_spec arm]} {
assert_spec arm_v7
}
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -3,7 +3,7 @@ set block_number 12345
set test_rounds 10000
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -5,7 +5,7 @@ if {[have_board linux] || [have_board rpi3] || [have_board imx53_qsb_tz]} {
exit 0
}
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -1,6 +1,6 @@
create_boot_directory
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -1,4 +1,4 @@
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -1,6 +1,6 @@
create_boot_directory
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -10,7 +10,7 @@ if {[have_board rpi3] || [have_board imx53_qsb_tz]} {
}
if {[get_cmd_switch --autopilot] && ([have_board linux] ||
[have_board riscv_qemu])} {
[have_board virt_qemu_riscv])} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -1,4 +1,4 @@
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -25,7 +25,7 @@ if {[have_board linux] ||
[have_board rpi3]} {
puts "\n Run script is not supported on this platform. \n"; exit 0 }
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -8,7 +8,7 @@ if {[have_board rpi3]} {
exit 0
}
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -1,4 +1,4 @@
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -3,4 +3,4 @@ _/src/virtio_input_drv
_/src/platform_drv
_/src/event_filter
_/src/virtdev_rom
_/raw/drivers_interactive-virt_qemu
_/raw/drivers_interactive-virt_qemu_arm

View File

@ -0,0 +1,3 @@
Device drivers needed to run interactive
scenarios on the Virt platform as emulated by Qemu

View File

@ -0,0 +1,6 @@
_/src/virtio_fb_drv
_/src/virtio_input_drv
_/src/platform_drv
_/src/event_filter
_/src/virtdev_rom
_/raw/drivers_interactive-virt_qemu_arm

View File

@ -0,0 +1 @@
2022-08-10 1f5b06e3adabbb73ba2b6e24edf621b15cfafa9a

View File

@ -1,4 +1,4 @@
_/raw/drivers_nic-virt_qemu
_/raw/drivers_nic-virt_qemu_arm
_/src/virtdev_rom
_/src/platform_drv
_/src/virtio_nic_drv

View File

@ -0,0 +1,3 @@
Device drivers needed for scenarios
using one network interface

View File

@ -0,0 +1,4 @@
_/raw/drivers_nic-virt_qemu_arm
_/src/virtdev_rom
_/src/platform_drv
_/src/virtio_nic_drv

View File

@ -0,0 +1 @@
2022-08-10 8cc0b5d0e02903c31134630d4244ec9135cb5560

View File

@ -1,7 +1,7 @@
content: drivers.config event_filter.config en_us.chargen special.chargen
drivers.config event_filter.config:
cp $(REP_DIR)/recipes/raw/drivers_interactive-virt_qemu/$@ $@
cp $(REP_DIR)/recipes/raw/drivers_interactive-virt_qemu_arm/$@ $@
en_us.chargen special.chargen:
cp $(REP_DIR)/src/server/event_filter/$@ $@

View File

@ -1,4 +0,0 @@
content: drivers.config
drivers.config:
cp $(REP_DIR)/recipes/raw/drivers_nic-virt_qemu/$@ $@

View File

@ -0,0 +1,4 @@
content: drivers.config
drivers.config:
cp $(REP_DIR)/recipes/raw/drivers_nic-virt_qemu_arm/$@ $@

View File

@ -9,7 +9,7 @@ if {[have_board imx7d_sabre] ||
}
if {[get_cmd_switch --autopilot] && ([have_spec linux] ||
[have_board riscv_qemu])} {
[have_board virt_qemu_riscv])} {
puts "\nAutopilot run is not supported on this platform\n"
exit 0
}

View File

@ -4,7 +4,7 @@ if {[have_spec foc] || [have_spec linux] || [have_board rpi3] ||
exit 0
}
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -5,7 +5,7 @@ if {![have_include power_on/qemu] || [have_spec foc] || [have_spec linux] ||
exit 0
}
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -7,7 +7,7 @@ if {![have_include power_on/qemu] ||
exit 0
}
if {[get_cmd_switch --autopilot] && ([have_board riscv_qemu] ||
if {[get_cmd_switch --autopilot] && ([have_board virt_qemu_riscv] ||
[have_board zynq_qemu])} {
puts "Autopilot mode is not supported on this platform."
exit 0

View File

@ -38,7 +38,7 @@ if {[have_spec foc] || [have_board rpi3] || [have_board imx53_qsb_tz]} {
}
if {[get_cmd_switch --autopilot] && ([have_spec linux] ||
[have_board riscv_qemu])} {
[have_board virt_qemu_riscv])} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -4,7 +4,7 @@ if {[have_spec foc] || [have_spec linux] || [have_board rpi3] ||
exit 0
}
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -1,7 +1,7 @@
#
# Check for platform support
#
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -10,7 +10,7 @@ proc fast_polling_buf_size { } {
if {[expr [have_board pbxa9] && [have_spec foc]]} { return 40000000 }
if {[expr [have_board imx53_qsb_tz] && [have_spec hw]]} { return 40000000 }
if {[expr [have_board rpi] && [have_spec hw]]} { return 40000000 }
if {[expr [have_board riscv_qemu] && [have_spec hw]]} { return 15000000 }
if {[expr [have_board virt_qemu_riscv] && [have_spec hw]]} { return 15000000 }
return 80000000
}

View File

@ -7,7 +7,8 @@
assert_spec hw
if { ![have_board imx7d_sabre] && ![have_board imx8q_evk] &&
![have_board virt_qemu]} {
![have_board virt_qemu_arm_v7a] &&
![have_board virt_qemu_arm_v8a]} {
puts "Run script is not supported on this platform"
exit 0
}

View File

@ -1,4 +1,4 @@
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
if {[get_cmd_switch --autopilot] && [have_board virt_qemu_riscv]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}

View File

@ -5,13 +5,13 @@ QEMU_RUN_OPT := --include power_on/qemu --include log/qemu
#KERNEL ?= hw
# board to use (imx53_qsb, imx53_qsb_tz, imx6q_sabrelite, imx7d_sabre,
# nit6_solox, pbxa9, usb_armory, virt_qemu, wand_quad,
# nit6_solox, pbxa9, usb_armory, virt_qemu_arm_v7a, wand_quad,
# or zynq_qemu)
#BOARD ?= pbxa9
# local variable for run-tool arguments that depend on the used board
BOARD_RUN_OPT(pbxa9) = $(QEMU_RUN_OPT)
BOARD_RUN_OPT(virt_qemu) = $(QEMU_RUN_OPT)
BOARD_RUN_OPT(virt_qemu_arm_v7a) = $(QEMU_RUN_OPT)
##
## Qemu arguments, effective when using the run tool's 'power_on/qemu' back end

View File

@ -10,7 +10,7 @@ QEMU_RUN_OPT := --include power_on/qemu --include log/qemu
# local variable for run-tool arguments that depend on the used board
BOARD_RUN_OPT(linux) := --include power_on/linux --include log/linux
BOARD_RUN_OPT(rpi3) := $(QEMU_RUN_OPT)
BOARD_RUN_OPT(virt_qemu) := $(QEMU_RUN_OPT)
BOARD_RUN_OPT(virt_qemu_arm_v8a) := $(QEMU_RUN_OPT)
##
## Qemu arguments, effective when using the run tool's 'power_on/qemu' back end

View File

@ -5,7 +5,7 @@ QEMU_RUN_OPT := --include power_on/qemu --include log/qemu
KERNEL ?= hw
# board to use (riscv_qemu)
BOARD ?= riscv_qemu
BOARD ?= virt_qemu_riscv
# local variable for run-tool arguments that depend on the used board
BOARD_RUN_OPT(riscv_qemu) = $(QEMU_RUN_OPT)
BOARD_RUN_OPT(virt_qemu_riscv) = $(QEMU_RUN_OPT)

View File

@ -54,19 +54,12 @@ proc board_qemu_args { } {
##
# Each line is appended to qemu_args.
# Arguments might be general or restricted to a particular spec as follows:
# general arguments
# arm_v7a: arguments for arm_v7a
#
set qemu_args ""
foreach line [split $file_content "\n"] {
if {[regexp {^([\w]+):(.*)$} $line dummy spec arg]} {
if {[have_spec $spec]} { append qemu_args " $arg" }
} else {
# general arguments
append qemu_args " $line"
}
}
return $qemu_args
}