Skip to content

Commit

Permalink
hw/arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
edgarigl authored and pm215 committed Feb 3, 2016
1 parent 6a43e0b commit 48d21a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/arm/boot.c
Expand Up @@ -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;
Expand Down

0 comments on commit 48d21a5

Please sign in to comment.