u-boot/arch
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
..
arc dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
arm armv8: always use current exception level for TCR_ELx access 2022-06-16 15:22:55 -04:00
m68k Convert CONFIG_MCFRTC et al to Kconfig 2022-04-01 10:28:46 -04:00
microblaze microblaze: Migrate DCACHE/ICACHE to Kconfig 2022-04-08 10:46:22 -04:00
mips mips: octeon: mrvl, octeon-nic23.dts: Add ethernet DT support 2022-05-04 03:38:21 +02:00
nios2 event: Convert arch_cpu_init_dm() to use events 2022-03-10 08:28:36 -05:00
powerpc powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for NOR booting 2022-05-23 09:33:10 -04:00
riscv riscv: Clean up asm/io.h 2022-05-26 18:41:21 +08:00
sandbox sandbox: Avoid binman error when run without device tree 2022-05-05 09:29:57 -04:00
sh Split CONFIG_CC_OPTIMIZE_FOR_SIZE into two configs 2022-03-25 13:35:50 -04:00
x86 pci: Add mask parameter to dm_pci_map_bar() 2022-05-03 18:33:29 -04:00
xtensa Convert CONFIG_BOARD_POSTCLK_INIT to Kconfig 2022-03-03 16:51:19 -05:00
.gitignore
Kconfig nds32: Remove the architecture 2022-04-25 16:04:05 -04:00
u-boot-elf.lds