When qemu starts a kernel in a bare environment, the default SCR has the AW and FW bits clear, which means that the kernel can't modify the PSR A or PSR F bits, and means that FIQs and imprecise aborts are always masked. When running uboot under qemu, the AW and FW SCR bits are set, and the kernel functions normally - and this is how real hardware behaves. Fix this for qemu by ignoring the FIQ bit.
Unified · Split
| @@ -299,7 +299,7 @@ · 298 unmodified lines | ||
| 299 | 299 | mov r2, sp |
| 300 | 300 | ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr |
| 301 | 301 | ldr lr, [r2, #\offset + S_PC]! @ get pc |
| 302 | − tst r1, #0xcf | |
| 302 | + tst r1, #PSR_I_BIT | 0x0f | |
| 303 | 303 | bne 1f |
| 304 | 304 | msr spsr_cxsf, r1 @ save in spsr_svc |
| 305 | 305 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K) |
| @@ -331,7 +331,7 @@ · 25 unmodified lines | ||
| 331 | 331 | ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr |
| 332 | 332 | ldr lr, [sp, #\offset + S_PC] @ get pc |
| 333 | 333 | add sp, sp, #\offset + S_SP |
| 334 | − tst r1, #0xcf | |
| 334 | + tst r1, #PSR_I_BIT | 0x0f | |
| 335 | 335 | bne 1f |
| 336 | 336 | msr spsr_cxsf, r1 @ save in spsr_svc |
| 337 | 337 | |