Skip to content
  • Peter Hoyes's avatar
    armv8: Disable pointer authentication traps for EL1 · 53b40e8d
    Peter Hoyes authored and Tom Rini's avatar Tom Rini committed
    
    
    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.
    
    Signed-off-by: default avatarPeter Hoyes <Peter.Hoyes@arm.com>
    53b40e8d