[arch][arm64] use SMC when booted at EL2 in QEMU

If we were booted at EL2 (e.g. when passing -machine
virt,virtualization=on), we need to use SMC instead of HVC for PSCI
calls. Change psci_call() to do this and add a flag to do-qemuarm to
allow testing this scenario.
This commit is contained in:
Peter Collingbourne
2022-03-30 11:46:03 -07:00
committed by Travis Geiselbrecht
parent 894a580b5f
commit 4a15661ee0
3 changed files with 27 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ function HELP {
echo "-d a virtio display"
echo "-3 cortex-m3 based platform"
echo "-6 64bit arm"
echo "-v boot kernel at EL2"
echo "-m <memory in MB>"
echo "-s <number of cpus>"
echo "-h for help"
@@ -23,6 +24,7 @@ DO_NET=0
DO_NET_TAP=0
DO_BLOCK=0
DO_64BIT=0
DO_VIRT=0
DO_CORTEX_M3=0
DO_DISPLAY=0
DO_CMPCTMALLOC=0
@@ -32,7 +34,7 @@ MEMSIZE=512
SUDO=""
PROJECT=""
while getopts bdhm:cMnt36p:s: FLAG; do
while getopts bdhm:cMnt36vp:s: FLAG; do
case $FLAG in
b) DO_BLOCK=1;;
c) DO_CMPCTMALLOC=1;;
@@ -42,6 +44,7 @@ while getopts bdhm:cMnt36p:s: FLAG; do
t) DO_NET_TAP=1;;
3) DO_CORTEX_M3=1;;
6) DO_64BIT=1;;
v) DO_VIRT=1;;
m) MEMSIZE=$OPTARG;;
s) SMP=$OPTARG;;
p) PROJECT=$OPTARG;;
@@ -58,6 +61,9 @@ if [ $DO_64BIT == 1 ]; then
QEMU="qemu-system-aarch64"
CPU="cortex-a53"
MACHINE="virt"
if [ $DO_VIRT == 1 ]; then
MACHINE+=",virtualization=on"
fi
_PROJECT="qemu-virt-arm64-test"
elif [ $DO_CORTEX_M3 == 1 ]; then
QEMU="qemu-system-arm"