* [Qemu-devel] Need help: Save word (sw) and load word (lw) not working
@ 2011-06-27 7:37 Philip Loh
2011-06-27 8:17 ` Stefan Hajnoczi
0 siblings, 1 reply; 3+ messages in thread
From: Philip Loh @ 2011-06-27 7:37 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
Hello,
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!
--
Philip Z Loh,
Intern at Aeste Works (M),
Candidate for Bachelor of Science in Engineering: Computing.
[-- Attachment #2: Type: text/html, Size: 2750 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Need help: Save word (sw) and load word (lw) not working
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
2011-06-27 8:54 ` Philip Loh
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2011-06-27 8:17 UTC (permalink / raw)
To: Philip Loh; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Need help: Save word (sw) and load word (lw) not working
2011-06-27 8:17 ` Stefan Hajnoczi
@ 2011-06-27 8:54 ` Philip Loh
0 siblings, 0 replies; 3+ messages in thread
From: Philip Loh @ 2011-06-27 8:54 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]
Resolved: I accidentally compiled an executable that had a different memory
map than the board's memory map.
Thanks though!
On 27 June 2011 16:17, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> 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
>
--
Philip Z Loh,
Intern at Aeste Works (M),
Candidate for Bachelor of Science in Engineering: Computing.
[-- Attachment #2: Type: text/html, Size: 2782 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-27 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-06-27 8:54 ` Philip Loh
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).