u-boot/arch/arm/cpu/armv8
Volodymyr Babchuk f8ddd8cbb5 arm64: issue ISB after updating system registers
ARM Architecture reference manual clearly states that PE pipeline
should be flushed after changes to some system registers. Refer to
paragraph "B2.3.5 Memory Barriers" at page B2-92 of "Arm Architecture
Reference Manual ARMv8 for ARMv8-A Architecture Profile" (ARM DDI
0487B.a).

Failing to issue instruction synchronization barrier can lead to
spurious errors, like synchronous exception when accessing FPU
registers. This is very prominent on CPUs with long instruction
pipeline, like ARM Cortex A72.

This change fixes the following U-Boot panic:

 "Synchronous Abort" handler, esr 0x1fe00000
 elr: 00000000800948cc lr : 0000000080091e04
 x0 : 00000000801ffdc8 x1 : 00000000000000c8
 x2 : 00000000800979d4 x3 : 00000000801ffc60
 x4 : 00000000801ffd40 x5 : ffffff80ffffffd8
 x6 : 00000000801ffd70 x7 : 00000000801ffd70
 x8 : 000000000000000a x9 : 0000000000000000
 x10: 0000000000000044 x11: 0000000000000000
 x12: 0000000000000000 x13: 0000000000000000
 x14: 0000000000000000 x15: 0000000000000000
 x16: 000000008008b2e0 x17: 0000000000000000
 x18: 00000000801ffec0 x19: 00000000800957b0
 x20: 00000000000000c8 x21: 00000000801ffdc8
 x22: 000000008009909e x23: 0000000000000000
 x24: 0000000000000000 x25: 0000000000000000
 x26: 0000000000000000 x27: 0000000000000000
 x28: 0000000000000000 x29: 00000000801ffc50

 Code: a94417e4 a90217e4 a9051fe6 a90617e4 (3d801fe0)

While executing instruction

 str     q0, [sp, #112]

in vsnprintf() prologue. This panic was observed only on Cortex A72 so
far.

This patch places ISBs on other strategic places as well.

Also, this probably is the right fix for the issue workarounded in the
commit 45f41c134b ("ARM: uniphier: add weird workaround code for LD20")

Reported-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Suggested-by: Julien Grall <julien.grall.oss@gmail.com>
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
CC: Tom Rini <trini@konsulko.com>
CC: Masahiro Yamada <yamada.masahiro@socionext.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien@xen.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-07-07 11:01:52 -04:00
..
fsl-layerscape common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
hisilicon common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
s32v234 common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
cache.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cache_v8.c armv8: cache_v8: fix mmu_set_region_dcache_behaviour 2020-05-25 11:54:53 -04:00
config.mk SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cpu-dt.c common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
cpu.c common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
exception_level.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
exceptions.S armv8: Reduce exception handling code 2018-08-03 19:53:54 -04:00
fwcall.c common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
generic_timer.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig imx: imx8qm/qxp: Recover SPL data section for partition reboot 2020-05-10 20:55:20 +02:00
linux-kernel-image-header-vars.h arm64: add an option to switch visibility of CONFIG_SYS_INIT_SP_BSS_OFFSET 2019-07-10 22:37:23 +09:00
lowlevel_init.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile imx: imx8qm/qxp: Recover SPL data section for partition reboot 2020-05-10 20:55:20 +02:00
psci.S ARMv8: PSCI: Fix PSCI_TABLE relocation issue 2019-04-23 17:57:28 -04:00
sec_firmware.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
sec_firmware_asm.S armv8: sec_firmware: change el2_to_aarch32 SMC ID 2018-12-06 14:37:19 -08:00
smccc-call.S arm: Leave smccc calls in .text when efi_loader=n 2019-02-13 09:40:06 +01:00
spin_table.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spin_table_v8.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl_data.c imx: imx8qm/qxp: Recover SPL data section for partition reboot 2020-05-10 20:55:20 +02:00
start.S arm64: issue ISB after updating system registers 2020-07-07 11:01:52 -04:00
tlb.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
transition.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u-boot-spl.lds imx: imx8qm/qxp: Recover SPL data section for partition reboot 2020-05-10 20:55:20 +02:00
u-boot.lds ARMv8: Allow SiP service extensions on top of PSCI code 2019-04-22 18:13:21 -04:00