Skip to contentSkip to conversation

armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel

PATCH In review Toshifumi NISHINAGA 2 participants 2 messages Jun 4, 2017 – Jun 10, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel

Disable D-Cache is required when booting nommu Linux kernel. (please see Linux kernel source "arch/arm/kernel/head-nommu.S")

U-Boot is enabled D-cache and I-Cache at startup.
However, it does not disable D-Cache before
booting nommu Linux kernel.
Therefore, I call dcache_disable()
when the CPU is ARMv7M to fix this problem.

---
 arch/arm/lib/bootm.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/lib/bootm.c +1 -0
index 4dbe6a5303..d14a8b5737 100644
@@ -359,6 +359,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
 #ifdef CONFIG_CPU_V7M
 	ulong addr = (ulong)kernel_entry | 1;
 	kernel_entry = (void *)addr;
+	dcache_disable();
 #endif
 	s = getenv("machid");
 	if (s) {
Signature · 1 line
2.13.0
#1 lore raw
Quoted 10 lines · tnishinaga.dev at gmail.com

Disable D-Cache is required when booting nommu Linux kernel. (please see Linux kernel source "arch/arm/kernel/head-nommu.S")

U-Boot is enabled D-cache and I-Cache at startup.
However, it does not disable D-Cache before
booting nommu Linux kernel.
Therefore, I call dcache_disable()
when the CPU is ARMv7M to fix this problem.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170610/f3e952bf/attachment.sig>