1. 27 Feb, 2019 8 commits
    • Antonio Nino Diaz's avatar
      BL1: Enable pointer authentication support · cd7d6b0e
      Antonio Nino Diaz authored
      
      
      The size increase after enabling options related to ARMv8.3-PAuth is:
      
      +----------------------------+-------+-------+-------+--------+
      |                            |  text |  bss  |  data | rodata |
      +----------------------------+-------+-------+-------+--------+
      | CTX_INCLUDE_PAUTH_REGS = 1 |  +108 |  +192 |   +0  |   +0   |
      |                            |  0.5% |  0.8% |       |        |
      +----------------------------+-------+-------+-------+--------+
      | ENABLE_PAUTH = 1           |  +748 |  +192 |  +16  |   +0   |
      |                            |  3.7% |  0.8% |  7.0% |        |
      +----------------------------+-------+-------+-------+--------+
      
      Results calculated with the following build configuration:
      
          make PLAT=fvp SPD=tspd DEBUG=1 \
          SDEI_SUPPORT=1                 \
          EL3_EXCEPTION_HANDLING=1       \
          TSP_NS_INTR_ASYNC_PREEMPT=1    \
          CTX_INCLUDE_PAUTH_REGS=1       \
          ENABLE_PAUTH=1
      
      Change-Id: I3a7d02feb6a6d212be32a01432b0c7c1a261f567
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      cd7d6b0e
    • Antonio Nino Diaz's avatar
      plat/arm: Implement ARMv8.3-PAuth interfaces · ff6844c3
      Antonio Nino Diaz authored
      
      
      This feature is only supported on FVP.
      
      Change-Id: I4e265610211d92a84bd2773c34acfbe02a1a1826
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      ff6844c3
    • Antonio Nino Diaz's avatar
      Add support for pointer authentication · b86048c4
      Antonio Nino Diaz authored
      
      
      The previous commit added the infrastructure to load and save
      ARMv8.3-PAuth registers during Non-secure <-> Secure world switches, but
      didn't actually enable pointer authentication in the firmware.
      
      This patch adds the functionality needed for platforms to provide
      authentication keys for the firmware, and a new option (ENABLE_PAUTH) to
      enable pointer authentication in the firmware itself. This option is
      disabled by default, and it requires CTX_INCLUDE_PAUTH_REGS to be
      enabled.
      
      Change-Id: I35127ec271e1198d43209044de39fa712ef202a5
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      b86048c4
    • Antonio Nino Diaz's avatar
      Add ARMv8.3-PAuth registers to CPU context · 5283962e
      Antonio Nino Diaz authored
      
      
      ARMv8.3-PAuth adds functionality that supports address authentication of
      the contents of a register before that register is used as the target of
      an indirect branch, or as a load.
      
      This feature is supported only in AArch64 state.
      
      This feature is mandatory in ARMv8.3 implementations.
      
      This feature adds several registers to EL1. A new option called
      CTX_INCLUDE_PAUTH_REGS has been added to select if the TF needs to save
      them during Non-secure <-> Secure world switches. This option must be
      enabled if the hardware has the registers or the values will be leaked
      during world switches.
      
      To prevent leaks, this patch also disables pointer authentication in the
      Secure world if CTX_INCLUDE_PAUTH_REGS is 0. Any attempt to use it will
      be trapped in EL3.
      
      Change-Id: I27beba9907b9a86c6df1d0c5bf6180c972830855
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      5283962e
    • Antonio Nino Diaz's avatar
      Cleanup context handling library · 4d1ccf0e
      Antonio Nino Diaz authored
      
      
      Minor style cleanup.
      
      Change-Id: Ief19dece41a989e2e8157859a265701549f6c585
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      4d1ccf0e
    • Antonio Niño Díaz's avatar
      Merge pull request #1834 from thloh85-intel/s10_bl31 · 39718ea5
      Antonio Niño Díaz authored
      plat: intel: Add BL31 support to Intel Stratix10 SoCFPGA platform
      39718ea5
    • Antonio Niño Díaz's avatar
      Merge pull request #1831 from antonio-nino-diaz-arm/an/sccd · c8b96e4a
      Antonio Niño Díaz authored
      Disable processor Cycle Counting in Secure state
      c8b96e4a
    • Antonio Niño Díaz's avatar
      Merge pull request #1826 from smaeul/allwinner · 65954be7
      Antonio Niño Díaz authored
      allwinner: A few minor improvements
      65954be7
  2. 26 Feb, 2019 1 commit
  3. 22 Feb, 2019 2 commits
  4. 21 Feb, 2019 2 commits
  5. 20 Feb, 2019 5 commits
  6. 19 Feb, 2019 12 commits
  7. 18 Feb, 2019 7 commits
  8. 15 Feb, 2019 1 commit
  9. 14 Feb, 2019 2 commits
    • Antonio Nino Diaz's avatar
      SPM: Remove unnecessary register save · 9efdbc2c
      Antonio Nino Diaz authored
      Since commit 01fc1c24
      
       ("BL31: Use helper function to save registers
      in SMC handler") all the general-purpose registers are saved when
      entering EL3. It isn't needed to save them here.
      
      Change-Id: Ic540a5441b89b70888da587ab8fc3b2508cef8cc
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      9efdbc2c
    • Antonio Nino Diaz's avatar
      Update macro to check need for CVE-2017-5715 mitigation · ff6f62e1
      Antonio Nino Diaz authored
      
      
      Armv8.5 introduces the field CSV2 to register ID_AA64PFR0_EL1. It can
      have the following 3 values:
      
      - 0: Branch targets trained in one hardware described context may affect
           speculative execution in a different hardware described context. In
           some CPUs it may be needed to apply mitigations.
      
      - 1: Branch targets trained in one hardware described context can only
           affect speculative execution in a different hardware described
           context in a hard-to-determine way. No mitigation required.
      
      - 2: Same as 1, but the device is also aware of SCXTNUM_ELx register
           contexts. The TF doesn't use the registers, so there is no
           difference with 1.
      
      The field CSV2 was originally introduced in the TRM of the Cortex-A76
      before the release of the Armv8.5 architecture. That TRM only mentions
      the meaning of values 0 and 1. Because of this, the code only checks if
      the field has value 1 to know whether to enable or disable the
      mitigations.
      
      This patch makes it aware of value 2 as well. Both values 1 and 2
      disable the mitigation, and 0 enables it.
      
      Change-Id: I5af33de25a0197c98173f52c6c8c77b51a51429f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      ff6f62e1