From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X47ls-0008G8-Ih for qemu-devel@nongnu.org; Mon, 07 Jul 2014 08:11:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X47lj-0007Qd-Vs for qemu-devel@nongnu.org; Mon, 07 Jul 2014 08:11:48 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:62649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X47lj-0007QU-Qa for qemu-devel@nongnu.org; Mon, 07 Jul 2014 08:11:39 -0400 Received: by mail-wg0-f46.google.com with SMTP id l18so867874wgh.17 for ; Mon, 07 Jul 2014 05:11:34 -0700 (PDT) Received: from regal.lifl.fr (regal.lifl.fr. [134.206.17.57]) by mx.google.com with ESMTPSA id ub8sm114588027wib.0.2014.07.07.05.11.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Jul 2014 05:11:33 -0700 (PDT) Message-ID: <53BA8E4D.1090004@gmail.com> Date: Mon, 07 Jul 2014 14:10:53 +0200 From: =?ISO-8859-1?Q?Fran=E7ois?= MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cSXmmX7pTLM5lrhR6NpSkSWbigDPDSbQj" Subject: [Qemu-devel] Strange behaviour with MSR? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cSXmmX7pTLM5lrhR6NpSkSWbigDPDSbQj Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, I'm not sure I'm on the right list to post, sorry about that, but I tried on IRC and got no answer. I'm working on a low level piece of system, which has to change PSR values on ARM. I use qemu-system-arm v 2.0.0, with the command : qemu-system-arm -nographic -s -S -m 1024 -M vexpress-a9 -kernel ./bootstrap My issue is the following: Just before the MSR call, I have an LR value. When executing MSR, the LR value gets nulled. After a second iteration, MSR does *not* set this value to 0. I really don't see wether it can come from qemu, if I'm writting this message, I think it does not come from my code, since the reset caused by the lr =3D 0 restarts the system, and thus, re initilizes the context with the same values and same call graph. Here is a gdb trace from the issue : (gdb) target remote 127.0.0.1:1234 Remote debugging using 127.0.0.1:1234 0x60000000 in ?? () (gdb) b *0x61005814 Breakpoint 1 at 0x61005814 (gdb) c Continuing. Breakpoint 1, 0x61005814 in ?? () (gdb) x /i $pc =3D> 0x61005814: msr CPSR_fsxc, r3 (gdb) info reg r0 0xe1a010b2 -509603662 r1 0x0 0 r2 0x2822001 42082305 r3 0xe1a010b2 -509603662 r4 0x0 0 r5 0x6100ec04 1627450372 r6 0x0 0 r7 0x0 0 r8 0x0 0 r9 0x0 0 r10 0x0 0 r11 0x60340be4 1614023652 r12 0x0 0 sp 0x60340bc0 0x60340bc0 lr 0x610057cc 1627412428 pc 0x61005814 0x61005814 cpsr 0x80000013 -2147483629 (gdb) si 0x61005818 in ?? () (gdb) info reg r0 0xe1a010b2 -509603662 r1 0x0 0 r2 0x2822001 42082305 r3 0xe1a010b2 -509603662 r4 0x0 0 r5 0x6100ec04 1627450372 r6 0x0 0 r7 0x0 0 r8 0x0 0 r9 0x0 0 r10 0x0 0 r11 0x60340be4 1614023652 r12 0x0 0 sp 0x0 0x0 lr 0x0 0 pc 0x61005818 0x61005818 cpsr 0xe0000092 -536870766 Thanks in advance for any piece of advice :) -- Fran=E7ois --cSXmmX7pTLM5lrhR6NpSkSWbigDPDSbQj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTuo5QAAoJED4y673idXxP+pYP/0MiiQXAC2YZq+fZfdxmR9Rn ZBdMBdVAOh2zOAy+DCpFobAdPrgelZarD1UBjcaxHy9G2VRTvrfEEbIFXy2+2sh+ wzgmBeyHDh9efbr5QUe13Nbsjx/Up3cb3N/whyi9Q8IoU9qoxWd4+xdqof3j3Ogc 3FdZHpOYHzBTa9kjOFEZEY4VAXhmx0cuTJjQs6A4CMK/UOjk2zYrMWsqvTKB7mh/ uI90YqUcQkpqSYI51N/4v25EcNwV7X4oq2IrYRrK5RuXqOfJNsxNJs2adm2kD6VT RBIkQv/+NzCi44X+wN/TlJuMDK3amMOxEIXSm8nOxWhHiUYisXSFKSxKV8LSBfwN qXkN4kKZ34nvrddTPYBeyPNGayIyMPtwIdxix7qOm4I7rZ42scsjPBWr0k+Fr+jM k+QmTc2pOKOc2Mz2yzBcBaE4FZ9NWHalfb7hpCR0sOnNFIrN3y/cujegwtgmPMlt QH8noH9q+R5aMbs8do3QP6XN/ynbEq0XpQ9qwtPAZGZio/IST2e5UZq/KT7gPVEi u9R6M5r54S6ugxWNUvOgzZ6KOvOr7d5G+AYo0FMy/iAcadCeygFM7EG4fYSbOvuz KuZ3u1fjtw86VtrrHWXOZT87V/Ulc8O5GdKo4bFKXJxvcSPaCxq4dtOQSDhOsIKS 6RRnQ3EznSGEXy3acV4N =tYBa -----END PGP SIGNATURE----- --cSXmmX7pTLM5lrhR6NpSkSWbigDPDSbQj--