Skip to contentSkip to conversation

arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64

PATCH New Michal Simek 3 participants 7 messages Oct 13, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64

AArch32 Linux should start in EL1 instead of EL2.

---

 arch/arm/lib/bootm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/bootm.c +1 -1
index 5c62d9c14406..e83d13de6749 100644
@@ -339,7 +339,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
 #else
 		if ((IH_ARCH_DEFAULT == IH_ARCH_ARM64) &&
 		    (images->os.arch == IH_ARCH_ARM))
-			armv8_switch_to_el2(0, (u64)gd->bd->bi_arch_number,
+			armv8_switch_to_el1(0, (u64)gd->bd->bi_arch_number,
 					    (u64)images->ft_addr, 0,
 					    (u64)images->ep,
 					    ES_TO_AARCH32);
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64

Quoted 1 line · Michal Simek

AArch32 Linux should start in EL1 instead of EL2.

Why? There is KVM on AArch32 as well.

Alex

Quoted 21 lines

---

 arch/arm/lib/bootm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/bootm.c +1 -1
index 5c62d9c14406..e83d13de6749 100644
@@ -339,7 +339,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
 #else
 		if ((IH_ARCH_DEFAULT == IH_ARCH_ARM64) &&
 		    (images->os.arch == IH_ARCH_ARM))
-			armv8_switch_to_el2(0, (u64)gd->bd->bi_arch_number,
+			armv8_switch_to_el1(0, (u64)gd->bd->bi_arch_number,
 					    (u64)images->ft_addr, 0,
 					    (u64)images->ep,
 					    ES_TO_AARCH32);
#2 lore raw

PATCH 1/1 arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64

Quoted 6 lines · Alexander Graf
Quoted 1 line · Michal Simek

AArch32 Linux should start in EL1 instead of EL2.

Why? There is KVM on AArch32 as well.

Is AArch32 without KVM able to start from EL2?
At least based on my tests this is not working.

M

#3 lore raw

PATCH 1/1 arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64

Quoted 10 lines · Michal Simek
Quoted 6 lines · Alexander Graf
Quoted 1 line · Michal Simek

AArch32 Linux should start in EL1 instead of EL2.

Why? There is KVM on AArch32 as well.

Is AArch32 without KVM able to start from EL2?
At least based on my tests this is not working.

I'll leave it to Marc to answer that. I'd say if it's unable to boot from EL2 that's a bug though.

Alex

#4 lore raw

PATCH 1/1 arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64

In reply to Michal Simek
Quoted 10 lines · Michal Simek
Quoted 6 lines · Alexander Graf
Quoted 1 line · Michal Simek

AArch32 Linux should start in EL1 instead of EL2.

Why? There is KVM on AArch32 as well.

Is AArch32 without KVM able to start from EL2?
At least based on my tests this is not working.

Then someone broke it. Please report the bug on LAKML.

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#5 lore raw

PATCH 1/1 arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64

Quoted 5 lines · Marc Zyngier
Quoted 4 lines · Michal Simek
Quoted 3 lines · Alexander Graf

On 13.10.17 09:08, Michal Simek wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

AArch32 Linux should start in EL1 instead of EL2.

Why? There is KVM on AArch32 as well.

Is AArch32 without KVM able to start from EL2?
At least based on my tests this is not working.

Then someone broke it. Please report the bug on LAKML.

Do you have any kernel version which you are sure it should work? Or any kernel version which you know that it started to work?

Thanks,
Michal

#6 lore raw

PATCH 1/1 arm: Start AArch32 Linux in EL1 instead of EL2 on AArch64

Quoted 10 lines · Michal Simek
Quoted 9 lines · Marc Zyngier
Quoted 8 lines · Michal Simek
Quoted 6 lines · Alexander Graf
Quoted 1 line · Michal Simek

AArch32 Linux should start in EL1 instead of EL2.

Why? There is KVM on AArch32 as well.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Is AArch32 without KVM able to start from EL2?
At least based on my tests this is not working.

Then someone broke it. Please report the bug on LAKML.

Do you have any kernel version which you are sure it should work? Or any kernel version which you know that it started to work?

It should have worked from the day 32bit KVM was merged (3.9), and still does as of 4.13.

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...