summaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c24xx/common-smdk.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-06-07 15:41:35 +0200
committerArd Biesheuvel <ardb@kernel.org>2020-06-17 15:29:11 +0200
commit2a55280a3675203496d302463b941834228b9875 (patch)
treefdf348d4f9ab6ac68f52c3011900d9a2e9845598 /arch/arm/mach-s3c24xx/common-smdk.c
parent62956be8f95b93e9f91ffe2e5aa9c0e411af5a14 (diff)
efi/libstub: arm: Print CPU boot mode and MMU state at boot
On 32-bit ARM, we may boot at HYP mode, or with the MMU and caches off (or both), even though the EFI spec does not actually support this. While booting at HYP mode is something we might tolerate, fiddling with the caches is a more serious issue, as disabling the caches is tricky to do safely from C code, and running without the Dcache makes it impossible to support unaligned memory accesses, which is another explicit requirement imposed by the EFI spec. So take note of the CPU mode and MMU state in the EFI stub diagnostic output so that we can easily diagnose any issues that may arise from this. E.g., EFI stub: Entering in SVC mode with MMU enabled Also, capture the CPSR and SCTLR system register values at EFI stub entry, and after ExitBootServices() returns, and check whether the MMU and Dcache were disabled at any point. If this is the case, a diagnostic message like the following will be emitted: efi: [Firmware Bug]: EFI stub was entered with MMU and Dcache disabled, please fix your firmware! efi: CPSR at EFI stub entry : 0x600001d3 efi: SCTLR at EFI stub entry : 0x00c51838 efi: CPSR after ExitBootServices() : 0x600001d3 efi: SCTLR after ExitBootServices(): 0x00c50838 Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Diffstat (limited to 'arch/arm/mach-s3c24xx/common-smdk.c')
0 files changed, 0 insertions, 0 deletions