1. 18 Feb, 2019 1 commit
    • Antonio Nino Diaz's avatar
      Disable processor Cycle Counting in Secure state · ed4fc6f0
      Antonio Nino Diaz authored
      
      
      In a system with ARMv8.5-PMU implemented:
      
      - If EL3 is using AArch32, setting MDCR_EL3.SCCD to 1 disables counting
        in Secure state in PMCCNTR.
      
      - If EL3 is using AArch64, setting SDCR.SCCD to 1 disables counting in
        Secure state in PMCCNTR_EL0.
      
      So far this effect has been achieved by setting PMCR_EL0.DP (in AArch64)
      or PMCR.DP (in AArch32) to 1 instead, but this isn't considered secure
      as any EL can change that value.
      
      Change-Id: I82cbb3e48f2e5a55c44d9c4445683c5881ef1f6f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      ed4fc6f0
  2. 14 Feb, 2019 6 commits
  3. 11 Feb, 2019 2 commits
    • Antonio Nino Diaz's avatar
      cpus: Add casts to all definitions in CPU headers · 1a74e4a8
      Antonio Nino Diaz authored
      
      
      There are some incorrect casts and some missing casts in the headers.
      This patch fixes the ones that were 64-bit or 32-bit wide wrongly and
      adds casts where they were missing.
      
      Note that none of the changes of the patch actually changes the values
      of the definitions. This patch is just for correctness.
      
      Change-Id: Iad6458021bad521922ce4f91bafff38b116b49eb
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      1a74e4a8
    • Antonio Nino Diaz's avatar
      cpus: Fix some incorrect definitions in CPU headers · a69817ed
      Antonio Nino Diaz authored
      
      
      There are some values that should be 64-bit immediates but that resolve
      to 0 because the type of the value is 32-bit wide. This patch casts the
      expressions to 64-bit before the shift so that the definition has the
      correct value.
      
      The definitions are only used in assembly so far, so the code is not
      actually affected by this bug. The assembler treats all values as 64-bit
      values, so there are no overflows.
      
      Change-Id: I965e4be631c1d28787c0913661d224c82a6b9155
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      a69817ed
  4. 08 Feb, 2019 2 commits
  5. 06 Feb, 2019 1 commit
  6. 01 Feb, 2019 2 commits
  7. 31 Jan, 2019 3 commits
  8. 30 Jan, 2019 2 commits
    • Antonio Nino Diaz's avatar
      Remove support for the SMC Calling Convention 2.0 · 0709055e
      Antonio Nino Diaz authored
      This reverts commit 2f370465
      
       ("Add support for the SMC Calling
      Convention 2.0").
      
      SMCCC v2.0 is no longer required for SPM, and won't be needed in the
      future. Removing it makes the SMC handling code less complicated.
      
      The SPM implementation based on SPCI and SPRT was using it, but it has
      been adapted to SMCCC v1.0.
      
      Change-Id: I36795b91857b2b9c00437cfbfed04b3c1627f578
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      0709055e
    • Sathees Balya's avatar
      lib/xlat_tables: Add support for ARMv8.4-TTST · cedfa04b
      Sathees Balya authored
      
      
      ARMv8.4-TTST (Small Translation tables) relaxes the lower limit on the
      size of translation tables by increasing the maximum permitted value
      of the T1SZ and T0SZ fields in TCR_EL1, TCR_EL2, TCR_EL3, VTCR_EL2 and
      VSTCR_EL2.
      
      This feature is supported in AArch64 state only.
      
      This patch adds support for this feature to both versions of the
      translation tables library. It also removes the static build time
      checks for virtual address space size checks to runtime assertions.
      
      Change-Id: I4e8cebc197ec1c2092dc7d307486616786e6c093
      Signed-off-by: default avatarSathees Balya <sathees.balya@arm.com>
      cedfa04b
  9. 25 Jan, 2019 8 commits
  10. 23 Jan, 2019 2 commits
    • Varun Wadekar's avatar
      Helper function to read ID_AFR0_EL1 system register · e4e97f1d
      Varun Wadekar authored
      
      
      This patch provides helper function to read the ID_AFR0_EL1
      system register for platforms.
      
      Change-Id: Id5491b18e3bf9f619d98d6cc8efd9d2cf5918c9d
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e4e97f1d
    • Sathees Balya's avatar
      plat/arm: Save BL2 descriptors to reserved memory. · 5b8d50e4
      Sathees Balya authored
      
      
      On ARM platforms, the BL2 memory can be overlaid by BL31/BL32. The memory
      descriptors describing the list of executable images are created in BL2
      R/W memory, which could be possibly corrupted later on by BL31/BL32 due
      to overlay. This patch creates a reserved location in SRAM for these
      descriptors and are copied over by BL2 before handing over to next BL
      image.
      
      Also this patch increases the PLAT_ARM_MAX_BL2_SIZE for juno when TBBR
      is enabled.
      
      Fixes ARM-Software/tf-issues#626
      
      Change-Id: I755735706fa702024b4032f51ed4895b3687377f
      Signed-off-by: default avatarSathees Balya <sathees.balya@arm.com>
      5b8d50e4
  11. 22 Jan, 2019 2 commits
    • Andrew F. Davis's avatar
      ti: k3: common: Add support for runtime detection of GICR base address · b5443284
      Andrew F. Davis authored
      
      
      Valid addresses for GICR base are always a set calculable distance from
      the GICD and is based on the number of cores a given instance of GICv3 IP
      can support. The formula for the number of address bits is given by the
      ARM GIC-500 TRM section 3.2 as 2^(18+log2(cores)) with the MSB set to
      one for GICR instances. Holes in the GIC address space are also
      guaranteed to safely return 0 on reads. This allows us to support runtime
      detection of the GICR base address by starting from GIC base address plus
      BIT(18) and walking until the GICR ID register (IIDR) is detected. We
      stop searching after BIT(20) to prevent searching out into space if
      something goes wrong. This can be extended out if we ever have a device
      with 16 or more cores.
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      b5443284
    • Antonio Nino Diaz's avatar
      SPM: Rename SPM_DEPRECATED flag to SPM_MM · 8855e52e
      Antonio Nino Diaz authored
      
      
      The SPM implementation based on MM is going to be kept for the
      foreseeable future.
      
      Change-Id: I11e96778a4f52a1aa803e7e048d9a7cb24a53954
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      Acked-by: default avatarSumit Garg <sumit.garg@linaro.org>
      8855e52e
  12. 18 Jan, 2019 6 commits
  13. 15 Jan, 2019 2 commits
    • Antonio Nino Diaz's avatar
      plat/arm: Fix header dependencies · 234bc7f8
      Antonio Nino Diaz authored
      
      
      From now on, platform_def.h must include any header with definitions that
      are platform-specific (like arm_def.h) and the included headers mustn't
      include back platform_def.h, and shouldn't be used by other files. Only
      platform_def.h should be included in other files. This will ensure that all
      needed definitions are present, rather than needing to include all the
      headers in all the definitions' headers just in case.
      
      This also prevents problems like cyclic dependencies.
      
      Change-Id: I9d3cf4d1de4b956fa035c79545222697acdaf5ca
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      234bc7f8
    • Antonio Nino Diaz's avatar
      Move BL1 and BL2 private defines to bl_common.h · c9f9d9ea
      Antonio Nino Diaz authored
      
      
      The definitions in bl1/bl1_private.h and bl2/bl2_private.h are useful for
      platforms that may need to access them.
      
      Change-Id: Ifd1880f855ddafcb3bfcaf1ed4a4e0f121eda174
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      c9f9d9ea
  14. 11 Jan, 2019 1 commit
    • Antonio Nino Diaz's avatar
      xlat v2: Dynamically detect need for CnP bit · 2559b2c8
      Antonio Nino Diaz authored
      
      
      ARMv8.2-TTCNP is mandatory from ARMv8.2 onwards, but it can be implemented
      in CPUs that don't implement all mandatory 8.2 features (and so have to
      claim to be a lower version).
      
      This patch removes usage of the ARM_ARCH_AT_LEAST() macro and uses system
      ID registers to detect whether it is needed to set the bit or not.
      
      Change-Id: I7bcbf0c7c937590dfc2ca668cfd9267c50f7d52c
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      2559b2c8