From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qb6Nx-0007lS-G5 for qemu-devel@nongnu.org; Mon, 27 Jun 2011 03:37:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qb6Nv-0002yF-7t for qemu-devel@nongnu.org; Mon, 27 Jun 2011 03:37:33 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:63066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qb6Nu-0002y6-NR for qemu-devel@nongnu.org; Mon, 27 Jun 2011 03:37:30 -0400 Received: by vws17 with SMTP id 17so3557642vws.4 for ; Mon, 27 Jun 2011 00:37:29 -0700 (PDT) MIME-Version: 1.0 From: Philip Loh Date: Mon, 27 Jun 2011 15:37:09 +0800 Message-ID: Content-Type: multipart/alternative; boundary=20cf307d01c69a94ec04a6ac9f7b Subject: [Qemu-devel] Need help: Save word (sw) and load word (lw) not working List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --20cf307d01c69a94ec04a6ac9f7b Content-Type: text/plain; charset=ISO-8859-1 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. --20cf307d01c69a94ec04a6ac9f7b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I'm new to QEMU development and am attempting to write co= de for a new board and system. I modeled the code after the code in the tar= get-microblaze folder, but removed the dependency on the petalogix board an= d instead made it require the code from my board. At this point, it can boo= t and execute a binary file with no issues until it attempts to do a save w= ord / load word. The dump for the binary is as follows:
=A0=A0 0:=A0=A0 =A02020= 0040 =A0=A0 =A0addi=A0=A0 =A0r1, r0, 64
= =A0=A0 4:=A0=A0 =A020400030 =A0=A0 =A0addi=A0=A0 =A0r2, r0, 48
=A0=A0 8:=A0=A0 =A02060= 0020 =A0=A0 =A0addi=A0=A0 =A0r3, r0, 32
=A0=A0 c:=A0=A0=A0 d8411000 =A0=A0=A0 s= w=A0=A0=A0 r2, r1, r2
=A0 10:=A0=A0=A0 d8611800 =A0=A0=A0 sw=A0=A0=A0 r3, r1, r3
=A0 14:=A0=A0=A0 c8811000 =A0=A0=A0 lw=A0= =A0=A0 r4, r1, r2
=A0 18:=A0=A0=A0 c8a11000 =A0=A0=A0 lw=A0=A0=A0 r5, r1, r3

One would expect the sw and lw components (highlighted in yell= ow) 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 whe= n 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 than= ks!

--
Philip Z Loh,
Intern at Aeste Works (M),
Candidate for Bachelor of Science in Engineering: Computing.
--20cf307d01c69a94ec04a6ac9f7b--