qemu-system-arm injects #UND exception with wrong PC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Usually all accesses to coprocessor registers are only possible in PL1 or higher. When accessing a coprocessor register in user mode, QEMU generates a trap and the PC of the trapping instruction is passed to the OS with an offset of+ 4. Some coprocessor registers can be configured to allow access to them in usermode (PL0). The latest qemu-git (ee09f84e6bf538
Attached is a small test program that installs a signal handler for "SIGILL". On a pandaboard the progam prints "Val=0x2 Val2=0x2" whereas on the latest "qemu-system-arm" the output is : "Val=0x1 Val2=0x2"
Qemu was configured with: "./configure --python=`which python2.7` --target-
The test can be compiled with: "gcc -g -static test2.c -o test2"
If further information is needed, feel free to ask.
Regards,
Robert
Thanks for the clear bug report and the test case. I've submitted a patch which fixes this: patchwork. ozlabs. org/patch/ 482273/
http://