How to print SPR_DECR in QEMU Monitor (ppc-softmmu target)?

157 views Asked by At

I have a little problem. I'm using ppc-softmmu target in QEMU and I need to print SPR_DECR(defines in qemu/target-ppc/cpu.h as 0x016) in QEMU Monitor Could anybody help?

Thanks.

1

There are 1 answers

0
Jeremy Kerr On

In the monitor session, you can get the full register dump with:

(qemu) info registers

On a test VM, this gives me:

(qemu) info registers 
NIP 000000001dbe0bb0   LR 000000001dbe4924 CTR 000000001dbe0bb0 XER 0000000000000000 CPU#0
MSR 8000000000000000 HID0 0000000000000000  HF 8000000000000000 idx 1
TB 00000000 1101801658 DECR 3193165638
GPR00 0000000000000001 000000001e45e6f0 000000001dbffc00 000000001dc43048
GPR04 0000000000000010 ffffffffffffffe8 000000001e45b008 0000000000000040
GPR08 0000000000000008 000000001dbfb440 000000001dbe0bb0 0000000000000040
GPR12 000000001dbe701c 0000000000000000 0000000000000000 0000000000000000
GPR16 0000000000000000 0000000000000000 0000000000000000 000000001dbe0d54
GPR20 000000001dbfe070 0000000000000032 000000001dc1b900 000000001dbf9492
GPR24 0000000000000003 0000000000000006 000000001dbf6800 000000001e45f060
GPR28 000000001dbf92b0 0000000000000003 000000001dbfb390 000000001e45b010
CR 40000208  [ G  -  -  -  -  E  -  L  ]             RES ffffffffffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 0000000000000000
 SRR0 000000001dbe0730  SRR1 8000000000000000    PVR 00000000003f0203 VRSAVE 0000000000000000
SPRG0 0000000000000000 SPRG1 000000000000bf20  SPRG2 0000000000000000  SPRG3 0000000000000000
SPRG4 0000000000000000 SPRG5 0000000000000000  SPRG6 0000000000000000  SPRG7 0000000000000000
 CFAR 000000001dbe1808
 SDR1 00007f446c800004   DAR 0000000000000000  DSISR 0000000000000000

- see the DECR value there. Note that the value is decimal, not hex.

Or, to only print the single decrementer register value:

(qemu) print $decr
0xbe53d746