qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Philip Loh <philip.loh@aeste.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Need help: Save word (sw) and load word (lw) not working
Date: Mon, 27 Jun 2011 09:17:17 +0100	[thread overview]
Message-ID: <BANLkTinZwZbNjAOUBFwB3RUsqYoXwoaDCw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimLPPxGtzu9NJyROniY3OqN8iJ+Jg@mail.gmail.com>

On Mon, Jun 27, 2011 at 8:37 AM, Philip Loh <philip.loh@aeste.net> wrote:
> I'm new to QEMU development and am attempting to write code for a new board
> and system. I modeled the code after the code in the target-microblaze
> folder, but removed the dependency on the petalogix board and instead made
> it require the code from my board. At this point, it can boot and execute a
> binary file with no issues until it attempts to do a save word / load word.
> The dump for the binary is as follows:
>    0:    20200040     addi    r1, r0, 64
>    4:    20400030     addi    r2, r0, 48
>    8:    20600020     addi    r3, r0, 32
>    c:    d8411000     sw    r2, r1, r2
>   10:    d8611800     sw    r3, r1, r3
>   14:    c8811000     lw    r4, r1, r2
>   18:    c8a11000     lw    r5, r1, r3
>
> One would expect the sw and lw components (highlighted in yellow) to save r2
> to *(r1+r2) and then load it back to r4, and save r3 to *(r1+r3) and then
> load it back to r5. However, r4 and r5 are both 0 at the end. I don't know
> how to verify what is at *(r1+r2) or *(r1+r3) because when I attempt to "x
> address" in a remote desktop viewer, all I see are zeroes beyond x 18. Would
> anyone know what went wrong? Much thanks!

If you are able to post a link to a git repo that might help.  Seeing
how you set up the board and added RAM would be important.

Stefan

  reply	other threads:[~2011-06-27  8:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27  7:37 [Qemu-devel] Need help: Save word (sw) and load word (lw) not working Philip Loh
2011-06-27  8:17 ` Stefan Hajnoczi [this message]
2011-06-27  8:54   ` Philip Loh

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=BANLkTinZwZbNjAOUBFwB3RUsqYoXwoaDCw@mail.gmail.com \
    --to=stefanha@gmail.com \
    --cc=philip.loh@aeste.net \
    --cc=qemu-devel@nongnu.org \
    /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).