blob: 04ff4903b2357a4f9cc79ab2f6a3ae06f541f1bc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
qemu-system-arm exits when cortex-m4 floating point used and irq occurs
qemu-system-arm exits with
"...Secure UsageFault with CFSR.NOCP because NSACR.CP10 prevents stacking FP regs
...taking pending nonsecure exception 3
Taking exception 7 [Breakpoint]
qemu: fatal: Lockup: can't escalate 3 to HardFault (current priority -1)"
when emulating Cortex-m4, executing at least 1 floating point instruction, and then an irq (e.g. sys tick) occurring.
CPACR.CP10 and CPACR.CP11 are set to 0x3 respectively prior to executing the fp instructions.
NOTE: NSACR does not appear to be a cortex m4 register.
Attached is a simplified elf to repro the issue.
The qemu command line is: "qemu-system-arm --gdb tcp::1234 -cpu cortex-m4 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel QemuExitWhenUsingFPAndIRQOccurs.elf -d int"
I think this patch should fix this bug:
https://<email address hidden>/
I confirm that this fixes the issue above.
Thank you for your help! It is much appreciated.
Now fixed in git master; will be in the imminent 4.1 release.
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=02ac2f7f613b47f6a5b3
|