public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel
Date: Mon,  5 Jun 2017 01:18:08 +0900	[thread overview]
Message-ID: <20170604161808.26222-1-tnishinaga.dev@gmail.com> (raw)

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(+)

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) {
-- 
2.13.0

             reply	other threads:[~2017-06-04 16:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-04 16:18 Toshifumi NISHINAGA [this message]
2017-06-10 13:46 ` [U-Boot] armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170604161808.26222-1-tnishinaga.dev@gmail.com \
    --to=tnishinaga.dev@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox