u-boot/arch/arm
Andre Przywara ce9c579e2b armv8: always use current exception level for TCR_ELx access
Currently get_tcr() takes an "el" parameter, to select the proper
version of the TCR_ELx system register.
This is problematic in case of the Apple M1, since it runs with
HCR_EL2.E2H fixed to 1, so TCR_EL2 is actually using the TCR_EL1 layout,
and we get the wrong version.

For U-Boot's purposes the only sensible choice here is the current
exception level, and indeed most callers treat it like that, so let's
remove that parameter and read the current EL inside the function.
This allows us to check for the E2H bit, and pretend it's EL1 in this
case.

There are two callers which don't care about the EL, and they pass 0,
which looks wrong, but is irrelevant in these two cases, since we don't
use the return value there. So the change cannot affect those two.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Tested-by: Mark Kettenis <kettenis@openbsd.org>
2022-06-16 15:22:55 -04:00
..
cpu armv8: always use current exception level for TCR_ELx access 2022-06-16 15:22:55 -04:00
dts arm64: dts: imx8mq-kontron-pitx-imx8m-u-boot.dtsi: disable assigned clocks 2022-06-16 15:22:55 -04:00
include armv8: always use current exception level for TCR_ELx access 2022-06-16 15:22:55 -04:00
lib arm: gic_v2: Skip gic_init_secure when cpu is not in el3 2022-05-23 09:33:10 -04:00
mach-apple arm: apple: Point stdout-path to framebuffer when keyboard present 2022-04-22 15:56:39 -04:00
mach-aspeed ast2600: spl: Locate load buffer in DRAM space 2021-11-17 17:05:00 -05:00
mach-at91 ARM: mach-at91: armv7: Remove default reset driver 2022-04-26 09:53:18 +03:00
mach-bcm283x doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mach-bcmstb
mach-cortina
mach-davinci Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
mach-exynos exynos: Drop CONFIG_CLK_* 2022-04-01 10:28:47 -04:00
mach-highbank
mach-imx imx: imx8mq: default select CLK_IMX8MQ 2022-06-03 11:15:24 -04:00
mach-integrator arm: integrator: Migrate platform-specific options and cleanup armcoremodule.h 2022-04-08 09:05:19 -04:00
mach-ipq40xx
mach-k3 arch: arm: mach-k3: am642_init: bring back MCU_PADCFG_MMR1 unlock 2022-06-16 15:22:54 -04:00
mach-keystone arch/arm/mach-keystone/ddr3.c: Fix spelling of "resetting". 2022-01-13 07:57:50 -05:00
mach-kirkwood keymile: Move sourcing of common Kconfig 2022-04-01 10:28:46 -04:00
mach-lpc32xx
mach-mediatek
mach-meson ARM: amlogic: add sm efuse write support and cmd for read/write efuse 2021-10-29 14:06:45 +02:00
mach-mvebu arm: mvebu: Move internal registers in arch_very_early_init() function 2022-05-16 11:31:34 +02:00
mach-nexell video: Drop references to CONFIG_VIDEO et al 2022-03-28 20:17:07 +02:00
mach-npcm arm: nuvoton: Add support for Nuvoton NPCM750 BMC 2022-05-05 09:28:47 -04:00
mach-octeontx Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-octeontx2 Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-omap2 arm: Introduce new CONFIG_SPL_SYS_NO_VECTOR_TABLE option 2022-04-21 12:31:36 +02:00
mach-orion5x Convert CONFIG_88F5182 et al to Kconfig 2021-12-27 16:20:19 -05:00
mach-owl
mach-qemu
mach-rmobile armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
mach-rockchip arm: set cntfrq_el0 if CONFIG_COUNTER_FREQUENCY is valid 2022-04-21 15:27:18 -04:00
mach-s5pc1xx doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mach-snapdragon board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board 2021-10-31 11:25:38 -04:00
mach-socfpga arm: socfpga: Add the terasic de10-standard board 2022-05-23 21:28:07 +02:00
mach-sti
mach-stm32 configs: stm32f746-disco: Migrate SPL flags to defconfig 2022-05-10 13:56:12 +02:00
mach-stm32mp stm32mp: psci: Retain MCUDIVR, PLL3CR, PLL4CR, MSSCKSELR across suspend 2022-05-10 13:54:47 +02:00
mach-sunxi sunxi: Remove obsolete Kconfig selections 2022-05-24 01:46:06 +01:00
mach-tegra ARM: tegra: XUSB padctl: Add new lines for errors 2022-06-13 15:31:00 -07:00
mach-u8500
mach-uniphier spl: mmc: extend spl_mmc_boot_mode() to take mmc argument 2022-04-04 23:24:17 +01:00
mach-versal arch: arm: move COUNTER_FREQUENCY from versal to arm 2022-04-21 14:32:40 -04:00
mach-versatile
mach-zynq ARM: zynq: Fix debug uart initialization 2022-02-21 13:20:24 +01:00
mach-zynqmp xilinx: zynqmp: Wire tee for Multi DTB use cases 2022-05-24 08:44:24 +02:00
mach-zynqmp-r5 Convert CONFIG_CPU_FREQ_HZ to Kconfig 2021-12-27 16:20:19 -05:00
thumb1/include/asm/proc-armv
config.mk
Kconfig arm: Add new config option ARCH_VERY_EARLY_INIT 2022-05-16 11:31:33 +02:00
Kconfig.debug
Makefile arm: nuvoton: Add support for Nuvoton NPCM750 BMC 2022-05-05 09:28:47 -04:00