diff mbox

[U-Boot] armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel

Message ID 20170604161808.26222-1-tnishinaga.dev@gmail.com
State Accepted
Commit 8f079cccb369995e46a2ab530d5d60b88c1e70bb
Delegated to: Tom Rini
Headers show

Commit Message

Toshifumi NISHINAGA June 4, 2017, 4:18 p.m. UTC
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.

Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
---
 arch/arm/lib/bootm.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tom Rini June 10, 2017, 1:46 p.m. UTC | #1
On Mon, Jun 05, 2017 at 01:18:08AM +0900, tnishinaga.dev@gmail.com wrote:

> 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.
> 
> Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 4dbe6a5303..d14a8b5737 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -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) {