summaryrefslogtreecommitdiffstats
path: root/hw/arm
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>2016-02-03 13:46:33 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:31:25 -0600
commit1ea7d5a4e84ba3068e08201eea5d684ffe78f1e6 (patch)
tree1fe0e8dbd05d3f4de89b2141b0470f2dba9f5849 /hw/arm
parent15918811215a5bb44445df04aa50d2a727beaabe (diff)
downloadhqemu-1ea7d5a4e84ba3068e08201eea5d684ffe78f1e6.zip
hqemu-1ea7d5a4e84ba3068e08201eea5d684ffe78f1e6.tar.gz
hw/arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots
When booting Linux on AArch64 enabled cores, setup EL1 and EL2 to use AArch64. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/boot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 7742dd3..d05a998 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -488,7 +488,9 @@ static void do_cpu_reset(void *opaque)
* adjust.
*/
if (env->aarch64) {
+ env->cp15.scr_el3 |= SCR_RW;
if (arm_feature(env, ARM_FEATURE_EL2)) {
+ env->cp15.hcr_el2 |= HCR_RW;
env->pstate = PSTATE_MODE_EL2h;
} else {
env->pstate = PSTATE_MODE_EL1h;
OpenPOWER on IntegriCloud