u-boot/arch
Andre Przywara 7ed340a828 armv8: Force SP_ELx stack pointer usage
In ARMv8 we have the choice between two stack pointers to use: SP_EL0 or
SP_ELx, which is banked per exception level. This choice is stored in
the SP field of PState, and can be read and set via the SPSel special
register. When the CPU takes an exception, it automatically switches to
the SP_ELx stack pointer.

Trusted Firmware enters U-Boot typically with SPSel set to 1, so we use
SP_ELx all along as our sole stack pointer, both for normal operation and
for exceptions.

But if we now for some reason enter U-Boot with SPSel cleared, we will
setup and use SP_EL0, which is fine, but leaves SP_ELx uninitialised.
When we now take an exception, we try to save the GPRs to some undefined
location, which will usually end badly.

To make sure we always have SP_ELx pointing to some memory, set SPSel
to 1 in the early boot code, to ensure safe operation at all times.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02 13:59:29 -05:00
..
arc dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
arm armv8: Force SP_ELx stack pointer usage 2022-03-02 13:59:29 -05:00
m68k dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
microblaze Xilinx changes for v2022.04-rc3 2022-02-21 08:32:02 -05:00
mips dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
nds32 dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
nios2 dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
powerpc powerpc: mpc8xx: drop CONFIG_SYS_RESET_ADDRESS 2022-02-10 16:44:23 -05:00
riscv dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
sandbox acpi: Move acpi_write_tables() to a generic header 2022-02-11 11:29:23 -05:00
sh dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
x86 spl: x86: Correct the binman symbols for SPL 2022-02-22 10:05:44 -07:00
xtensa dts: automatically build necessary .dtb files 2022-02-09 12:26:12 -07:00
.gitignore
Kconfig Convert CONFIG_SCSI_AHCI_PLAT et al to Kconfig 2022-02-09 09:16:48 -05:00
u-boot-elf.lds arch: Add explicit linker script for u-boot-elf 2020-04-03 11:52:55 -04:00