1. 31 Aug, 2020 3 commits
  2. 26 Aug, 2020 1 commit
  3. 24 Aug, 2020 1 commit
    • Varun Wadekar's avatar
      lib: cpus: sanity check pointers before use · 601e3ed2
      Varun Wadekar authored
      
      
      The cpu_ops structure contains a lot of function pointers. It
      is a good idea to verify that the function pointer is not NULL
      before executing it.
      
      This patch sanity checks each pointer before use to prevent any
      unforeseen crashes. These checks have been enabled for debug
      builds only.
      
      Change-Id: Ib208331c20e60f0c7c582a20eb3d8cc40fb99d21
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      601e3ed2
  4. 21 Aug, 2020 1 commit
  5. 19 Aug, 2020 2 commits
    • Alexei Fedorov's avatar
      libc/memset: Implement function in assembler · e7d344de
      Alexei Fedorov authored
      
      
      Trace analysis of FVP_Base_AEMv8A model running in
      Aarch32 mode with the build options listed below:
      TRUSTED_BOARD_BOOT=1 GENERATE_COT=1
      ARM_ROTPK_LOCATION=devel_ecdsa KEY_ALG=ecdsa
      ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem
      shows that when auth_signature() gets called
      71.84% of CPU execution time is spent in memset() function
      written in C using single byte write operations,
      see lib\libc\memset.c.
      This patch replaces C memset() implementation with assembler
      version giving the following results:
      - for Aarch32 in auth_signature() call memset() CPU time
      reduced to 24.84%.
      - Number of CPU instructions executed during TF-A
      boot stage before start of BL33 in RELEASE builds:
      ----------------------------------------------
      |  Arch   |     C      |  assembler |    %   |
      ----------------------------------------------
      | Aarch32 | 2073275460 | 1487400003 | -28.25 |
      | Aarch64 | 2056807158 | 1244898303 | -39.47 |
      ----------------------------------------------
      The patch also replaces memset.c with aarch64/memset.S
      in plat\nvidia\tegra\platform.mk.
      
      Change-Id: Ifbf085a2f577a25491e2d28446ee95a4ac891597
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      e7d344de
    • Ruari Phipps's avatar
      SPM: Change condition on saving/restoring EL2 registers · 6b704da3
      Ruari Phipps authored
      
      
      Make this more scalable by explicitly checking internal and hardware
      states at run_time
      Signed-off-by: default avatarRuari Phipps <ruari.phipps@arm.com>
      Change-Id: I1c6ed1c1badb3538a93bff3ac5b5189b59cccfa1
      6b704da3
  6. 18 Aug, 2020 4 commits
  7. 13 Aug, 2020 1 commit
    • Olivier Deprez's avatar
      TF-A AMU: remove AMU enable info print · e82eb8c8
      Olivier Deprez authored
      Following f3ccf036
      
       the INFO print in amu_enable is causing
      a lot of print outs on UART1 in DEBUG mode especially on PSCI test
      cases because CPU_ON or SUSPEND operations call:
      cm_prepare_el3_exit => enable_extensions_nonsecure => amu_enable.
      PSCI SUSPEND is also very frequent in linux boot cases causing test
      timeout failures.
      Signed-off-by: default avatarOlivier Deprez <olivier.deprez@arm.com>
      Change-Id: I63581f8fa489d44b3b1d10af3b7f6fdf3af44720
      e82eb8c8
  8. 12 Aug, 2020 1 commit
    • Manish Pandey's avatar
      cert_create: add Platform owned secure partitions support · 23d5f03a
      Manish Pandey authored
      
      
      Add support to generate a certificate named "plat-sp-cert" for Secure
      Partitions(SP) owned by Platform.
      Earlier a single certificate file "sip-sp-cert" was generated which
      contained hash of all 8 SPs, with this change SPs are divided into
      two categories viz "SiP owned" and "Plat owned" containing 4 SPs each.
      
      Platform RoT key pair is used for signing.
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      Change-Id: I5bd493cfce4cf3fc14b87c8ed1045f633d0c92b6
      23d5f03a
  9. 10 Aug, 2020 1 commit
    • Alexei Fedorov's avatar
      TF-A AMU extension: fix detection of group 1 counters. · f3ccf036
      Alexei Fedorov authored
      
      
      This patch fixes the bug when AMUv1 group1 counters was
      always assumed being implemented without checking for its
      presence which was causing exception otherwise.
      The AMU extension code was also modified as listed below:
      - Added detection of AMUv1 for ARMv8.6
      - 'PLAT_AMU_GROUP1_NR_COUNTERS' build option is removed and
      number of group1 counters 'AMU_GROUP1_NR_COUNTERS' is now
      calculated based on 'AMU_GROUP1_COUNTERS_MASK' value
      - Added bit fields definitions and access functions for
      AMCFGR_EL0/AMCFGR and AMCGCR_EL0/AMCGCR registers
      - Unification of amu.c Aarch64 and Aarch32 source files
      - Bug fixes and TF-A coding style compliant changes.
      
      Change-Id: I14e407be62c3026ebc674ec7045e240ccb71e1fb
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      f3ccf036
  10. 09 Aug, 2020 2 commits
  11. 08 Aug, 2020 1 commit
    • johpow01's avatar
      MISRA cleanup in mem_region and semihosting files · 633fa4cd
      johpow01 authored
      
      
      MISRA defect cleanup and general code cleanup in mem_region.c and
      semihosting.c.  This task also called for cleanup of the ARM NOR flash
      driver but that was removed at some point since the Jira task was
      created.  This patch fixes all MISRA defects in these files except for a
      few "Calling function "console_flush()" which returns error information
      without testing the error information." errors which can't really be
      avoided.
      
      Defects Fixed
      
      File                           Line Rule
      lib/semihosting/semihosting.c  70   MISRA C-2012 Rule 14.4 (required)
      lib/semihosting/semihosting.c  197  MISRA C-2012 Rule 14.3 (required)
      lib/semihosting/semihosting.c  210  MISRA C-2012 Rule 14.4 (required)
      lib/utils/mem_region.c         128  MISRA C-2012 Rule 12.1 (advisory)
      Signed-off-by: default avatarJohn Powell <john.powell@arm.com>
      Change-Id: I21a039d1cfccd6aa4301da09daec15e373305a80
      633fa4cd
  12. 04 Aug, 2020 1 commit
    • Grant Likely's avatar
      Use abspath to dereference $BUILD_BASE · 29214e95
      Grant Likely authored
      
      
      If the user tries to change BUILD_BASE to put the build products outside
      the build tree the compile will fail due to hard coded assumptions that
      $BUILD_BASE is a relative path. Fix by using $(abspath $(BUILD_BASE))
      to rationalize to an absolute path every time and remove the relative
      path assumptions.
      
      This patch also adds documentation that BUILD_BASE can be specified by
      the user.
      Signed-off-by: default avatarGrant Likely <grant.likely@arm.com>
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      Change-Id: Ib1af874de658484aaffc672f30029b852d2489c8
      29214e95
  13. 29 Jul, 2020 1 commit
  14. 23 Jul, 2020 4 commits
  15. 21 Jul, 2020 1 commit
  16. 27 Jun, 2020 1 commit
  17. 25 Jun, 2020 3 commits
  18. 24 Jun, 2020 5 commits
  19. 22 Jun, 2020 2 commits
  20. 12 Jun, 2020 2 commits
  21. 09 Jun, 2020 1 commit
    • Varun Wadekar's avatar
      cpus: denver: disable cycle counter when event counting is prohibited · c5c1af0d
      Varun Wadekar authored
      
      
      The Denver CPUs implement support for PMUv3 for ARMv8.1 and expect the
      PMCR_EL0 to be saved in non-secure context.
      
      This patch disables cycle counter when event counting is prohibited
      immediately on entering the secure world to avoid leaking useful
      information about the PMU counters. The context saving code later
      saves the value of PMCR_EL0 to the non-secure world context.
      
      Verified with 'PMU Leakage' test suite.
      
       ******************************* Summary *******************************
       > Test suite 'PMU Leakage'
                                                                       Passed
       =================================
       Tests Skipped : 2
       Tests Passed  : 2
       Tests Failed  : 0
       Tests Crashed : 0
       Total tests   : 4
       =================================
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: I3675e2b99b44ed23d86e29a5af1b496e80324875
      c5c1af0d
  22. 08 Jun, 2020 1 commit
    • Manish Pandey's avatar
      cert_create: add SiP owned secure partitions support · 0792dd7d
      Manish Pandey authored
      
      
      Add support to generate certificate "sip-sp-cert" for Secure
      Partitions(SP) owned by Silicon provider(SiP).
      To avoid deviation from TBBR specification the support is only added for
      dualroot CoT and not for TBBR CoT.
      
      A single certificate file is generated containing hash of individual
      packages. Maximum 8 secure partitions are supported.
      
      Following new options added to cert_tool:
       --sip-sp-cert --> SiP owned Secure Partition Content Certificate
       --sp-pkg1 --> Secure Partition Package1 file
       --sp-pkg2
       .....
       --sp-pkg8
      
      Trusted world key pair is used for signing.
      
      Going forward, this feature can be extended for Platfrom owned
      Partitions, if required.
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      Change-Id: Ia6dfbc1447cfb41b1fcbd12cf2bf7b88f409bd8d
      0792dd7d