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
299 mov r2, sp299 mov r2, sp
300 ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr300 ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr
301 ldr lr, [r2, #\offset + S_PC]! @ get pc301 ldr lr, [r2, #\offset + S_PC]! @ get pc
302 tst r1, #0xcf302 tst r1, #PSR_I_BIT | 0x0f
303 bne 1f303 bne 1f
304 msr spsr_cxsf, r1 @ save in spsr_svc304 msr spsr_cxsf, r1 @ save in spsr_svc
305#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)305#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
@@ -331,7 +331,7 @@ · 25 unmodified lines
331 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr331 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
332 ldr lr, [sp, #\offset + S_PC] @ get pc332 ldr lr, [sp, #\offset + S_PC] @ get pc
333 add sp, sp, #\offset + S_SP333 add sp, sp, #\offset + S_SP
334 tst r1, #0xcf334 tst r1, #PSR_I_BIT | 0x0f
335 bne 1f335 bne 1f
336 msr spsr_cxsf, r1 @ save in spsr_svc336 msr spsr_cxsf, r1 @ save in spsr_svc
337 337

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