
Hi,
Am 2021-08-20 16:44, schrieb Andre Przywara:
On 8/19/21 4:53 PM, Peter Hoyes wrote:
From: Peter Hoyes Peter.Hoyes@arm.com
The use of ARMv8.3 pointer authentication (PAuth) is governed by fields in HCR_EL2, which trigger a 'trap to EL2' if not enabled. The reset value of these fields is 'architecturally unknown' so we must ensure that the fields are enabled (to disable the traps) if we are entering the kernel at EL1.
The APK field disables PAuth instruction traps and the API field disables PAuth register traps
Add code to disable the traps in armv8_switch_to_el1_m. Prior to doing so, it checks fields in the ID_AA64ISAR1_EL1 register to ensure pointer authentication is supported by the hardware.
The runtime checks require a second temporary register, so add this to the EL1 transition macro signature and update 2 call sites.
^^^^^^^^^^^^
So can we get rid of the rather fragile macro, and just have one normal function, in transition.S, which fsl-layerscape/spintable.S calls? The code does not seem to return, and also the FSL call site does not seem to be in some special section or so, so not sure why this was a macro in the first place?
The spin tables will be marked as reserved memory at
https://elixir.bootlin.com/u-boot/v2021.10-rc2/source/arch/arm/cpu/armv8/fsl... also the code will be moved around:
https://elixir.bootlin.com/u-boot/v2021.10-rc2/source/arch/arm/cpu/armv8/fsl...
-michael