Skip to contentSkip to conversation

ARM: HYP/non-sec: Don't enable ARMV7_LPAE for old sunxi kernels

PATCH New Jonathan Liu 4 participants 6 messages Mar 19, 2019 – Apr 12, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: HYP/non-sec: Don't enable ARMV7_LPAE for old sunxi kernels

Old sunxi kernels fail to boot with ARMV7_LPAE enabled.

---
 arch/arm/cpu/armv7/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/Kconfig +1 -1
index 73d57a2aae..cdb7e402b4 100644
@@ -53,7 +53,7 @@ config ARMV7_PSCI_NR_CPUS
 config ARMV7_LPAE
 	bool "Use LPAE page table format" if EXPERT
 	depends on CPU_V7A
-	default y if ARMV7_VIRT
+	default y if ARMV7_VIRT && !OLD_SUNXI_KERNEL_COMPAT
 	---help---
 	Say Y here to use the long descriptor page table format. This is
 	required if U-Boot runs in HYP mode.
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 ARM: HYP/non-sec: Don't enable ARMV7_LPAE for old sunxi kernels

Quoted 2 lines · Jonathan Liu

Old sunxi kernels fail to boot with ARMV7_LPAE enabled.

Any idea why? I don't have relevant stuff with to test this.

#2 lore raw

PATCH 1/1 ARM: HYP/non-sec: Don't enable ARMV7_LPAE for old sunxi kernels

Hi Jagan,

Quoted 6 lines · Jagan Teki
Quoted 2 lines · Jonathan Liu

Old sunxi kernels fail to boot with ARMV7_LPAE enabled.

Any idea why? I don't have relevant stuff with to test this.

I don't know why. It failed to boot linux-sunxi 3.4.104 kernel on A20 OLinuXino-MICRO after updating from 2018.07 to 2018.09-rc1 and would hang at "Starting kernel...".

I bisected the issue to:
https://git.denx.de/?p=u-boot.git;a=commit;h=d32e86bde8a31a49cf4a9b233ad91ecdfc96ba2a

No problems booting mainline kernel.

Thanks.

Regards,
Jonathan

#3 lore raw

PATCH 1/1 ARM: HYP/non-sec: Don't enable ARMV7_LPAE for old sunxi kernels

Quoted 9 lines · Jonathan Liu

Hi Jagan,

Quoted 5 lines · Jagan Teki
Quoted 2 lines · Jonathan Liu

Old sunxi kernels fail to boot with ARMV7_LPAE enabled.

Quoted 8 lines
Quoted 1 line

Any idea why? I don't have relevant stuff with to test this.

I don't know why. It failed to boot linux-sunxi 3.4.104 kernel on A20 OLinuXino-MICRO after updating from 2018.07 to 2018.09-rc1 and would hang at "Starting kernel...".

I bisected the issue to:
https://git.denx.de/?p=u-boot.git;a=commit;h=d32e86bde8a31a49cf4a9b233ad91ecdfc96ba2a

No problems booting mainline kernel.

Can you update full details of bug on the commit message.

#4 lore raw

PATCH 1/1 ARM: HYP/non-sec: Don't enable ARMV7_LPAE for old sunxi kernels

Quoted 15 lines

From: Jagan Teki <[email protected]>
Date: Fri, 12 Apr 2019 12:02:06 +0530

Quoted 11 lines · Jonathan Liu

Hi Jagan,

Quoted 6 lines · Jagan Teki
Quoted 2 lines · Jonathan Liu

Old sunxi kernels fail to boot with ARMV7_LPAE enabled.

Any idea why? I don't have relevant stuff with to test this.

Quoted 8 lines
Quoted 6 lines

I don't know why. It failed to boot linux-sunxi 3.4.104 kernel on A20 OLinuXino-MICRO after updating from 2018.07 to 2018.09-rc1 and would hang at "Starting kernel...".

I bisected the issue to:
https://git.denx.de/?p=u-boot.git;a=commit;h=d32e86bde8a31a49cf4a9b233ad91ecdfc96ba2a

No problems booting mainline kernel.

Can you update full details of bug on the commit message.

Technically I think the right thing to do would be disabling ARMV7_VIRT as my understanding is that booting into HYP mode doesn't work without LPAE support.

#5 lore raw

PATCH 1/1 ARM: HYP/non-sec: Don't enable ARMV7_LPAE for old sunxi kernels

Mark Kettenis wrote on 04/12/2019 03:03 PM:

Quoted 20 lines
Quoted 20 lines

From: Jagan Teki <[email protected]>
Date: Fri, 12 Apr 2019 12:02:06 +0530

Quoted 16 lines · Jonathan Liu

Hi Jagan,

Quoted 6 lines · Jagan Teki
Quoted 2 lines · Jonathan Liu

Old sunxi kernels fail to boot with ARMV7_LPAE enabled.

Any idea why? I don't have relevant stuff with to test this.

I don't know why. It failed to boot linux-sunxi 3.4.104 kernel on A20 OLinuXino-MICRO after updating from 2018.07 to 2018.09-rc1 and would hang at "Starting kernel...".

I bisected the issue to:
https://git.denx.de/?p=u-boot.git;a=commit;h=d32e86bde8a31a49cf4a9b233ad91ecdfc96ba2a

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

No problems booting mainline kernel.

Can you update full details of bug on the commit message.

Technically I think the right thing to do would be disabling ARMV7_VIRT as my understanding is that booting into HYP mode doesn't work without LPAE support.

Some days ago I tried to disable HYP mode for SVC mode.
But with SVC the PSCI is not loading (u-boot bug?), and without PSCI only the 1st core of the CPU gets used. I had documented the case here:
https://lists.denx.de/pipermail/u-boot/2019-April/364192.html