All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Strange behaviour with MSR?
@ 2014-07-07 12:10 François
  0 siblings, 0 replies; only message in thread
From: François @ 2014-07-07 12:10 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2400 bytes --]

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 = 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
=> 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çois


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-07 12:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 12:10 [Qemu-devel] Strange behaviour with MSR? François

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.