u-boot/arch/arm/cpu
Sam Protsenko 1070f01ac1 armv8: cpu: Implement allow_unaligned()
Usually ARMv8 platforms allow unaligned access for Normal memory. But
some chips might not allow it by default, having SCTLR.A bit set to 1
before U-Boot execution. One such example is Exynos850 SoC. As
allow_unaligned() is not implemented for ARMv8 at the moment, its __weak
implementation is used, which does nothing. That might lead to unaligned
access abort, for example when running EFI selftest. Fix that by
implementing allow_unaligned() for ARMv8.

The issue was found when running EFI selftest on E850-96 board
(Exynos850 based):

    => bootefi selftest $fdtcontroladdr

    ...
    Executing 'HII database protocols'
    "Synchronous Abort" handler, esr 0x96000021, far 0xbaac0991
    ...
    resetting ...

Unaligned abort happens in u16_strnlen(), which is called from
efi_hii_sibt_string_ucs2_block_next():

    u16_strlen(blk->string_text)

where 'blk' type is struct efi_hii_sibt_string_ucs2_block. Because this
struct is packed, doing "->string_text" makes 'blk' address incremented
by 1 byte, which makes it unaligned. Although allow_unaligned() was
called in efi_init_early() before EFI selftest execution, it wasn't
implemented for ARMv8 CPUs, so data abort happened.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2024-11-17 13:13:22 -06:00
..
arm11 arch: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:47 -06:00
arm720t Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
arm920t global: Rename SPL_ to XPL_ 2024-10-11 11:44:48 -06:00
arm926ejs global: Rename SPL_ to XPL_ 2024-10-11 11:44:48 -06:00
arm946es Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
arm1136 arm: move _end to linker symbols 2024-06-07 16:20:29 -06:00
arm1176 arch: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:47 -06:00
armv7 global: Rename SPL_ to XPL_ 2024-10-11 11:44:48 -06:00
armv7m Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
armv8 armv8: cpu: Implement allow_unaligned() 2024-11-17 13:13:22 -06:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u-boot-spl.lds arm: move _end to linker symbols 2024-06-07 16:20:29 -06:00
u-boot.lds arm: move _end to linker symbols 2024-06-07 16:20:29 -06:00