History

ARM: avoid faulting on qemu

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.

Russell King committed 8 years ago

Commit 3aaf33b1 parent 8bafae21 file · +2 −2Browse files

Unified · Split

arch/arm/kernel/entry-header.S+2−2
@@ -299,7 +299,7 @@ · 298 unmodified lines
299299 mov r2, sp
300300 ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr
301301 ldr lr, [r2, #\offset + S_PC]! @ get pc
302− tst r1, #0xcf
302+ tst r1, #PSR_I_BIT | 0x0f
303303 bne 1f
304304 msr spsr_cxsf, r1 @ save in spsr_svc
305305 #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
@@ -331,7 +331,7 @@ · 25 unmodified lines
331331 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
332332 ldr lr, [sp, #\offset + S_PC] @ get pc
333333 add sp, sp, #\offset + S_SP
334− tst r1, #0xcf
334+ tst r1, #PSR_I_BIT | 0x0f
335335 bne 1f
336336 msr spsr_cxsf, r1 @ save in spsr_svc
337337

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t