hw: Add support for Qemu virt arm platforms.
This patch adds support for booting base-hw kernel on qemu-arm virt machines. The arm_virt machine has 2GB of RAM, 2 Cortex A15 cores and uses GICv2 interrupt controller. The arm_64_virt machine also has 2GB of RAM, but has 4 Cortex A53 cores and uses GICv3. Both machines use PSCI to boot additional CPU cores. Fixes #3673
This commit is contained in:
committed by
Christian Helmuth
parent
dad1de1865
commit
585c4b8c69
@@ -6,11 +6,12 @@ QEMU_RUN_OPT := --include power_on/qemu --include log/qemu
|
||||
|
||||
# board to use (arndale, imx53_qsb, imx53_qsb_tz, imx6q_sabrelite, imx7d_sabre,
|
||||
# nit6_solox, odroid_xu, odroid_x2, panda, pbxa9, usb_armory,
|
||||
# wand_quad, or zynq_qemu)
|
||||
# virt_qemu, 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(zynq_qemu) = $(QEMU_RUN_OPT)
|
||||
|
||||
##
|
||||
|
||||
@@ -4,11 +4,12 @@ QEMU_RUN_OPT := --include power_on/qemu --include log/qemu
|
||||
# kernel to use (hw, foc, or sel4)
|
||||
#KERNEL ?= hw
|
||||
|
||||
# board to use (rpi3, imx8q_evk)
|
||||
# board to use (rpi3, imx8q_evk, virt_qemu)
|
||||
#BOARD ?= rpi3
|
||||
|
||||
# local variable for run-tool arguments that depend on the used board
|
||||
BOARD_RUN_OPT(rpi3) := $(QEMU_RUN_OPT)
|
||||
BOARD_RUN_OPT(rpi3) := $(QEMU_RUN_OPT)
|
||||
BOARD_RUN_OPT(virt_qemu) := $(QEMU_RUN_OPT)
|
||||
|
||||
##
|
||||
## Qemu arguments, effective when using the run tool's 'power_on/qemu' back end
|
||||
|
||||
@@ -22,6 +22,7 @@ proc bootstrap_link_address { } {
|
||||
if {[have_spec "rpi"]} { return "0x00800000" }
|
||||
if {[have_spec "rpi3"]} { return "0x00800000" }
|
||||
if {[have_spec "nit6_solox"]} { return "0x88000000" }
|
||||
if {[have_spec "virt_qemu"]} { return "0x40000000" }
|
||||
|
||||
puts "unknown platform no linker address known"
|
||||
exit -1
|
||||
@@ -229,6 +230,7 @@ proc base_src { } {
|
||||
if {[have_spec arndale]} { return base-hw-arndale }
|
||||
if {[have_spec panda]} { return base-hw-panda }
|
||||
if {[have_spec zynq_qemu]} { return base-hw-zynq_qemu }
|
||||
if {[have_spec virt_qemu]} { return base-hw-virt_qemu }
|
||||
|
||||
global specs
|
||||
|
||||
|
||||
@@ -109,6 +109,17 @@ proc run_power_on { } {
|
||||
if {[have_spec zynq_qemu]} { append qemu_args " -M xilinx-zynq-a9 -cpu cortex-a9 -m 256 " }
|
||||
if {[have_spec rpi3]} { append qemu_args " -M raspi3 -m 512 " }
|
||||
|
||||
if {[have_spec virt_qemu]} {
|
||||
append qemu_args " -M virt"
|
||||
if {[have_spec arm_v8a]} {
|
||||
append qemu_args ",gic_version=3 -cpu cortex-a53 -smp 4"
|
||||
}
|
||||
if {[have_spec arm_v7a]} {
|
||||
append qemu_args " -cpu cortex-a15 -smp 2"
|
||||
}
|
||||
append qemu_args " -m 2048"
|
||||
}
|
||||
|
||||
# on x86, we support booting via pxe or iso/disk image
|
||||
if {[have_spec x86]} {
|
||||
if {![regexp -- {-m} $qemu_args dummy]} {
|
||||
|
||||
Reference in New Issue
Block a user