diff options
author | Tom Rini <trini@konsulko.com> | 2019-11-19 17:42:46 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-11-19 17:42:46 -0500 |
commit | 99f9682cae45604ed3ad923cf2caa8fdd0e273e3 (patch) | |
tree | da06ca42bb24ad32f2b7f6afefd61db8b8a275bc /arch/arm | |
parent | d4a31e8ee5592072d8d5208b3e950cba2d89b6bd (diff) | |
parent | 38064ee04c9b42a299f914c36a093144bd86ac50 (diff) |
Merge tag 'efi-2020-01-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-01-rc4
Fix errors due to unaligned memory access:
* disable UEFI except for ARMv8, ARMv7, ARM11
* enable unaligned access support on ARM11
Remove an unused function.
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/arm11/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/cpu/arm11/sctlr.S | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm11/Makefile b/arch/arm/cpu/arm11/Makefile index 5d721fce12..5dfa01ae8d 100644 --- a/arch/arm/cpu/arm11/Makefile +++ b/arch/arm/cpu/arm11/Makefile @@ -4,3 +4,7 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. obj-y = cpu.o + +ifneq ($(CONFIG_SPL_BUILD),y) +obj-$(CONFIG_EFI_LOADER) += sctlr.o +endif diff --git a/arch/arm/cpu/arm11/sctlr.S b/arch/arm/cpu/arm11/sctlr.S new file mode 100644 index 0000000000..74a7fc4a25 --- /dev/null +++ b/arch/arm/cpu/arm11/sctlr.S @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Routines to access the system control register + * + * Copyright (c) 2019 Heinrich Schuchardt + */ + +#include <linux/linkage.h> + +/* + * void allow_unaligned(void) - allow unaligned access + * + * This routine sets the enable unaligned data support flag and clears the + * aligned flag in the system control register. + * After calling this routine unaligned access does no longer leads to a + * data abort or undefined behavior but is handled by the CPU. + * For details see the "ARM Architecture Reference Manual" for ARMv6. + */ +ENTRY(allow_unaligned) + mrc p15, 0, r0, c1, c0, 0 @ load system control register + orr r0, r0, #1 << 22 @ set unaligned data support flag + bic r0, r0, #2 @ clear aligned flag + mcr p15, 0, r0, c1, c0, 0 @ write system control register + bx lr @ return +ENDPROC(allow_unaligned) |