qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	Jia Liu <proljc@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	qemu-stable@nongnu.org, Max Filippov <jcmvbkbc@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Scott Wood <scottwood@freescale.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: [Qemu-devel] [PATCH v2 2/2] hw/xtensa/xtfpga: treat uImage load address as virtual
Date: Sun, 19 Oct 2014 09:04:01 +0400	[thread overview]
Message-ID: <1413695041-7022-3-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1413695041-7022-1-git-send-email-jcmvbkbc@gmail.com>

U-boot for xtensa always treats uImage load address as virtual address.
This is important when booting uImage on xtensa core with MMUv2, because
MMUv2 has fixed non-identity virtual-to-physical mapping after reset.

Always do virtual-to-physical translation of uImage load address and
load uImage at the translated address. This fixes booting uImage kernels
on dc232b and other MMUv2 cores.

Cc: qemu-stable@nongnu.org
Reported-by: Waldemar Brodkorb <mail@waldemar-brodkorb.de>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Changes v1->v2:
- use translate_phys_addr with the new load_uimage interface.

 hw/xtensa/xtfpga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 3c2f409..02ab824 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -328,7 +328,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
             hwaddr ep;
             int is_linux;
             success = load_uimage(kernel_filename, &ep, NULL, &is_linux,
-                                  NULL, NULL);
+                                  translate_phys_addr, cpu);
             if (success > 0 && is_linux) {
                 entry_point = ep;
             } else {
-- 
1.8.1.4

  reply	other threads:[~2014-10-19  5:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-19  5:03 [Qemu-devel] [PATCH v2 0/2] target-xtensa: fix loading uImage kernels on MMUv2 cores Max Filippov
2014-10-19  5:04 ` Max Filippov [this message]
2014-10-20  8:41 ` Alexander Graf
     [not found] ` <1413695041-7022-2-git-send-email-jcmvbkbc@gmail.com>
2014-10-28  8:37   ` [Qemu-devel] [PATCH v2 1/2] hw/core/loader: implement address translation in uimage loader Max Filippov

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=1413695041-7022-3-git-send-email-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=agraf@suse.de \
    --cc=edgar.iglesias@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=proljc@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=scottwood@freescale.com \
    /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;
as well as URLs for NNTP newsgroup(s).