xp /16i on arm mixes DWords

Bug #1900779 reported by Chaoscode
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

I was working with qemuand wanted to understag ATAG structure.
In Monitor mode I used xp /16i 0x100 and I got really confused.
with xp /16i 0x100:
At address 0x120 the DWords are 0x00000000, 0x00000004, 0x54410009, 0x74736574
with xp /16x 0x100:
At address 0x120 the DWords are 0x54410001, 0x00000001, 0x00000001, 0x00000000

from my Terminal:

(qemu) xp /16x 0x100
0000000000000100: 0x00000005 0x54410001 0x00000001 0x00001000
0000000000000110: 0x00000000 0x00000004 0x54410002 0x3c000000
0000000000000120: 0x00000000 0x00000004 0x54410009 0x74736574
0000000000000130: 0x00000000 0x00000000 0x00000000 0x00000000
(qemu) xp /16i 0x100
0x00000100: 00000005 andeq r0, r0, r5
0x00000104: 54410001 strbpl r0, [r1], #-1
0x00000108: 00000001 andeq r0, r0, r1
0x0000010c: 00001000 andeq r1, r0, r0
0x00000110: 00000000 andeq r0, r0, r0
0x00000114: 00000004 andeq r0, r0, r4
0x00000118: 54410002 strbpl r0, [r1], #-2
0x0000011c: 3c000000 .byte 0x00, 0x00, 0x00, 0x3c
0x00000120: 54410001 strbpl r0, [r1], #-1
0x00000124: 00000001 andeq r0, r0, r1
0x00000128: 00001000 andeq r1, r0, r0
0x0000012c: 00000000 andeq r0, r0, r0
0x00000130: 00000004 andeq r0, r0, r4
0x00000134: 54410002 strbpl r0, [r1], #-2
0x00000138: 3c000000 .byte 0x00, 0x00, 0x00, 0x3c
0x0000013c: 00000000 andeq r0, r0, r0
(increasing length only results in more 00000000 andeq r0, r0, r0 Lines)

Version:
4.2.1Debian 1:4.2-3ubuntu6.6
Commandline:
qemu-system-arm -machine raspi2 --nographic -S -s -kernel ./vmlinuz --append "test"
./vmlinuz is a x64 linux kernel. I didn't care about architecture because i just wanted to see ATAG structure.
I also tried
qemu-system-arm -machine raspi2 --nographic -S -s -kernel ./overview.pdf --append "test"
same result.

Revision history for this message
Chaoscode (dennis-restle) wrote :

I compiled Qemu 5.1.0
Same Problem.

Peter Maydell (pmaydell)
Changed in qemu:
status: New → Confirmed
Revision history for this message
Peter Maydell (pmaydell) wrote :

Thanks for the bug report; I've just posted a patch which should fix it: https://<email address hidden>/

Changed in qemu:
status: Confirmed → In Progress
Revision history for this message
John Snow (jnsnow) wrote :

Staged: 437588d81d99ac91cb1e4ff060610458e67852d5

Changed in qemu:
status: In Progress → Fix Committed
Revision history for this message
John Snow (jnsnow) wrote :
Revision history for this message
Thomas Huth (th-huth) wrote :

Released with QEMU v5.2.0.

Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.