u-boot/arch/arm/cpu/armv8
Andre Przywara 5ff4857d35 armv8: Fix and simplify branch_if_master/branch_if_slave
The branch_if_master macro jumps to a label if the CPU is the "master"
core, which we define as having all affinity levels set to 0. To check
for this condition, we need to mask off some bits from the MPIDR
register, then compare the remaining register value against zero.

The implementation of this was slighly broken (it preserved the upper
RES0 bits), overly complicated and hard to understand, especially since
it lacked comments. The same was true for the very similar
branch_if_slave macro.

Use a much shorter assembly sequence for those checks, use the same
masking for both macros (just negate the final branch), and put some
comments on them, to make it clear what the code does.
This allows to drop the second temporary register for branch_if_master,
so we adjust all call sites as well.

Also use the opportunity to remove a misleading comment: the macro
works fine on SoCs with multiple clusters. Judging by the commit
message, the original problem with the Juno SoC stems from the fact that
the master CPU *can* be configured to be from cluster 1, so the
assumption that the master CPU has all affinity values set to 0 does not
hold there. But this is already mentioned above in a comment, so remove
the extra comment.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02 13:59:29 -05:00
..
bcmns3 board: ns3: add api to save boot parameters passed from BL31 2020-07-29 10:13:41 -04:00
fsl-layerscape armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
hisilicon WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
xen WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
cache.S armv8/cache.S: Triple with single instruction 2021-09-23 08:55:06 -04:00
cache_v8.c Revert most of the series for adding vexpress_aemv8r support 2021-09-03 10:42:15 -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 treewide: use CONFIG_IS_ENABLED() for ARMV8_SEC_FIRMWARE_SUPPORT 2020-12-04 16:09:05 -05: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
fel_utils.S WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
fwcall.c arm: Remove #include <version.h> from armv8/fwcall.c 2021-02-01 16:32:06 -05:00
generic_timer.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
Kconfig armv8: apple: Disable PSCI reset 2022-01-14 13:16:11 -05: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
Makefile armv8: remove no longer needed lowlevel_init.S 2022-02-04 00:09:57 +00:00
psci.S ARMv8: PSCI: Fix PSCI_TABLE relocation issue 2019-04-23 17:57:28 -04:00
sec_firmware.c image: Adjust the workings of fit_check_format() 2021-02-15 22:31:52 -05: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 treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
start.S armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05: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 armv8: Disable pointer authentication traps for EL1 2021-09-02 10:17:45 -04:00
u-boot-spl.lds armv8: spl: Fix build with LINUX_KERNEL_IMAGE_HEADER 2022-02-03 12:15:33 -05:00
u-boot.lds ARMv8: Allow SiP service extensions on top of PSCI code 2019-04-22 18:13:21 -04:00