1. 28 Sep, 2020 1 commit
  2. 25 Sep, 2020 1 commit
    • Javier Almansa Sobrino's avatar
      arm_fpga: Add support for unknown MPIDs · 1994e562
      Javier Almansa Sobrino authored
      
      
      This patch allows the system to fallback to a default CPU library
      in case the MPID does not match with any of the supported ones.
      
      This feature can be enabled by setting SUPPORT_UNKNOWN_MPID build
      option to 1 (enabled by default only on arm_fpga platform).
      
      This feature can be very dangerous on a production image and
      therefore it MUST be disabled for Release images.
      Signed-off-by: default avatarJavier Almansa Sobrino <javier.almansasobrino@arm.com>
      Change-Id: I0df7ef2b012d7d60a4fd5de44dea1fbbb46881ba
      1994e562
  3. 24 Sep, 2020 2 commits
  4. 15 Sep, 2020 3 commits
  5. 10 Sep, 2020 3 commits
  6. 02 Sep, 2020 3 commits
    • Alexei Fedorov's avatar
      plat/arm: Introduce and use libc_asm.mk makefile · e3f2b1a9
      Alexei Fedorov authored
      Trace analysis of FVP_Base_AEMv8A 0.0/6063 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.99% of CPU execution time is spent in memset() function
      written in C using single byte write operations,
      see lib\libc\memset.c.
      This patch introduces new libc_asm.mk makefile which
      replaces C memset() implementation with assembler
      version giving the following results:
      - for Aarch32 in auth_signature() call memset() CPU time
      reduced to 20.56%.
      The number of CPU instructions (Inst) executed during
      TF-A boot stage before start of BL33 in RELEASE builds
      for different versions is presented in the tables below,
      where:
      - C TF-A: existing TF-A C code;
      - C musl: "lightweight code" C "implementation of the
        standard library for Linux-based systems"
      https://git.musl-libc.org/cgit/musl/tree/src/string/memset.c
      - Asm Opt: assemler version from "Arm Optimized Routines"
        project
      https://github.com/ARM-software/optimized-routines/blob/
      master/string/arm/memset.S
      - Asm Linux: assembler version from Linux kernel
      https://github.com/torvalds/linux/blob/master/arch/arm/lib/memset.S
      
      
      - Asm TF-A: assembler version from this patch
      
      Aarch32:
      +-----------+------+------+--------------+----------+
      | Variant   | Set  | Size |    Inst 	 |  Ratio   |
      +-----------+------+------+--------------+----------+
      | C TF-A    | T32  | 16   | 2122110003   | 1.000000 |
      | C musl    | T32  | 156  | 1643917668   | 0.774662 |
      | Asm Opt   | T32  | 84   | 1604810003   | 0.756233 |
      | Asm Linux | A32  | 168  | 1566255018   | 0.738065 |
      | Asm TF-A  | A32  | 160  | 1525865101   | 0.719032 |
      +-----------+------+------+--------------+----------+
      
      AArch64:
      +-----------+------+------------+----------+
      | Variant   | Size |    Inst    |  Ratio   |
      +-----------+------+------------+----------+
      | C TF-A    | 28   | 2732497518 | 1.000000 |
      | C musl    | 212  | 1802999999 | 0.659836 |
      | Asm TF-A  | 140  | 1680260003 | 0.614917 |
      +-----------+------+------------+----------+
      
      This patch modifies 'plat\arm\common\arm_common.mk'
      by overriding libc.mk makefile with libc_asm.mk and
      does not effect other platforms.
      
      Change-Id: Ie89dd0b74ba1079420733a0d76b7366ad0157c2e
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      e3f2b1a9
    • Javier Almansa Sobrino's avatar
      arm_fpga: Add support to populate the CPU nodes in the DTB · 20ff991e
      Javier Almansa Sobrino authored
      
      
      At the moment BL31 dynamically discovers the CPU topology of an FPGA
      system at runtime, but does not export it to the non-secure world.
      Any BL33 user would typically looks at the devicetree to learn about
      existing CPUs.
      
      This patch exports a minimum /cpus node in a devicetree to satisfy
      the binding. This means that no cpumaps or caches are described.
      This could be added later if needed.
      
      An existing /cpus node in the DT will make the code bail out with a
      message.
      Signed-off-by: default avatarJavier Almansa Sobrino <javier.almansasobrino@arm.com>
      Change-Id: I589a2b3412411a3660134bdcef3a65e8200e1d7e
      20ff991e
    • Anders Dellien's avatar
      plat/arm: Add dependencies to configuration files · 3ab336a1
      Anders Dellien authored
      
      
      This patch adds dependencies to the generated configuration
      files that are included in the FIP. This fixes occasional
      build errors that occur when the FIP happens to be built first.
      
      Change-Id: I5a2bf724ba3aee13954403b141f2f19b4fd51d1b
      Signed-off-by: default avatarAnders Dellien <anders.dellien@arm.com>
      3ab336a1
  7. 28 Aug, 2020 2 commits
  8. 26 Aug, 2020 1 commit
  9. 24 Aug, 2020 1 commit
  10. 20 Aug, 2020 1 commit
  11. 19 Aug, 2020 1 commit
  12. 18 Aug, 2020 4 commits
  13. 17 Aug, 2020 1 commit
  14. 14 Aug, 2020 4 commits
    • Ruari Phipps's avatar
      SPM: Add owner field to cactus secure partitions · ad86d35a
      Ruari Phipps authored
      
      
      For supporting dualroot CoT for Secure Partitions a new optional field
      "owner" is introduced which will be used to sign the SP with
      corresponding signing domain. To demonstrate its usage, this patch adds
      owners to cactus Secure Partitions.
      Signed-off-by: default avatarRuari Phipps <ruari.phipps@arm.com>
      Change-Id: I7b760580355fc92edf5402cecc38c38125dc1cae
      ad86d35a
    • Manish Pandey's avatar
      plat/arm: enable support for Plat owned SPs · 990d972f
      Manish Pandey authored
      
      
      For Arm platforms SPs are loaded by parsing tb_fw_config.dts and
      adding them to SP structure sequentially, which in-turn is appended to
      loadable image list.
      
      With recently introduced dualroot CoT for SPs where they are owned
      either by SiP or by Platform. SiP owned SPs index starts at SP_PKG1_ID
      and Plat owned SPs index starts at SP_PKG5_ID. As the start index of SP
      depends on the owner, there should be a mechanism to parse owner of a SP
      and put it at the correct index in SP structure.
      
      This patch adds support for parsing a new optional field "owner" and
      based on it put SP details(UUID & Load-address) at the correct index in
      SP structure.
      
      Change-Id: Ibd255b60d5c45023cc7fdb10971bef6626cb560b
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      990d972f
    • Jimmy Brisson's avatar
      Use true instead of 1 in while · 92069086
      Jimmy Brisson authored
      
      
      This resolves MISRA defects such as:
      
          plat/common/plat_bl1_common.c:63:[MISRA C-2012 Rule 14.4 (required)]
          The condition expression "1" does not have an essentially boolean type.
      
      Change-Id: I679411980ad661191fbc834a44a5eca5494fd0e2
      Signed-off-by: default avatarJimmy Brisson <jimmy.brisson@arm.com>
      92069086
    • Jimmy Brisson's avatar
      Prevent colliding identifiers · d74c6b83
      Jimmy Brisson authored
      
      
      There was a collision between the name of the typedef in the CASSERT and
      something else, so we make the name of the typedef unique to the
      invocation of DEFFINE_SVC_UUID2 by appending the name that's passed into
      the macro. This eliminates the following MISRA violation:
      
          bl1/bl1_main.c:233:[MISRA C-2012 Rule 5.6 (required)] Identifier
          "invalid_svc_uuid" is already used to represent a typedef.
      
      This also resolves MISRA rule 5.9.
      
      These renamings are as follows:
        * tzram -> secram. This matches the function call name as it has
        sec_mem in it's  name
        * fw_config_base -> config_base. This file does not mess with
        hw_conig, so there's little chance of confusion
      
      Change-Id: I8734ba0956140c8e29b89d0596d10d61a6ef351e
      Signed-off-by: default avatarJimmy Brisson <jimmy.brisson@arm.com>
      d74c6b83
  15. 10 Aug, 2020 1 commit
    • Alexei Fedorov's avatar
      plat/arm: Reduce size of BL31 binary · fa1fdb22
      Alexei Fedorov authored
      
      
      BL31 binary size is aligned to 4KB because of the
      code in include\plat\arm\common\arm_reclaim_init.ld.S:
          __INIT_CODE_UNALIGNED__ = .;
          . = ALIGN(PAGE_SIZE);
          __INIT_CODE_END__ = .;
      with all the zero data after the last instruction of
      BL31 code to the end of the page.
      This causes increase in size of BL31 binary stored in FIP
      and its loading time by BL2.
      This patch reduces the size of BL31 image by moving
      page alignment from __INIT_CODE_END__ to __STACKS_END__
      which also increases the stack size for secondary CPUs.
      
      Change-Id: Ie2ec503fc774c22c12ec506d74fd3ef2b0b183a9
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      fa1fdb22
  16. 31 Jul, 2020 2 commits
  17. 30 Jul, 2020 4 commits
  18. 26 Jul, 2020 1 commit
  19. 24 Jul, 2020 2 commits
  20. 23 Jul, 2020 2 commits