1. 07 Feb, 2020 9 commits
    • Vijayenthiran Subramaniam's avatar
      board/rdn1edge: add support for dual-chip configuration · 2d4b719c
      Vijayenthiran Subramaniam authored
      
      
      RD-N1-Edge based platforms can operate in dual-chip configuration
      wherein two rdn1edge SoCs are connected through a high speed coherent
      CCIX link.
      
      This patch adds a function to check if the RD-N1-Edge platform is
      operating in multi-chip mode by reading the SID register's NODE_ID
      value. If operating in multi-chip mode, initialize GIC-600 multi-chip
      operation by overriding the default GICR frames with array of GICR
      frames and setting the chip 0 as routing table owner.
      
      The address space of the second RD-N1-Edge chip (chip 1) starts from the
      address 4TB. So increase the physical and virtual address space size to
      43 bits to accommodate the multi-chip configuration. If the multi-chip
      mode configuration is detected, dynamically add mmap entry for the
      peripherals memory region of the second RD-N1-Edge SoC. This is required
      to let the BL31 platform setup stage to configure the devices in the
      second chip.
      
      PLATFORM_CORE_COUNT macro is set to be multiple of CSS_SGI_CHIP_COUNT
      and topology changes are added to represent the dual-chip configuration.
      
      In order the build the dual-chip platform, CSS_SGI_CHIP_COUNT macro
      should be set to 2:
      export CROSS_COMPILE=<path-to-cross-compiler>
      make PLAT=rdn1edge CSS_SGI_CHIP_COUNT=2 ARCH=aarch64 all
      
      Change-Id: I576cdaf71f0b0e41b9a9181fa4feb7091f8c7bb4
      Signed-off-by: default avatarAditya Angadi <aditya.angadi@arm.com>
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      2d4b719c
    • Aditya Angadi's avatar
      drivers/arm/scmi: allow use of multiple SCMI channels · 31e703f9
      Aditya Angadi authored
      
      
      On systems that have multiple platform components that can interpret the
      SCMI messages, there is a need to support multiple SCMI channels (one
      each to those platform components). Extend the existing SCMI interface
      that currently supports only a single SCMI channel to support multiple
      SCMI channels.
      
      Change-Id: Ice4062475b903aef3b5e5bc37df364c9778a62c5
      Signed-off-by: default avatarAditya Angadi <aditya.angadi@arm.com>
      31e703f9
    • Aditya Angadi's avatar
      drivers/mhu: derive doorbell base address · f8931606
      Aditya Angadi authored
      
      
      In order to allow the MHUv2 driver to be usable with multiple MHUv2
      controllers, use the base address of the controller from the platform
      information instead of the MHUV2_BASE_ADDR macro.
      
      Change-Id: I4dbab87b929fb0568935e6c8b339ce67937f8cd1
      Signed-off-by: default avatarAditya Angadi <aditya.angadi@arm.com>
      f8931606
    • Vijayenthiran Subramaniam's avatar
      plat/arm/sgi: include AFF3 affinity in core position calculation · 80151c27
      Vijayenthiran Subramaniam authored
      
      
      AFF3 bits of MPIDR corresponds to Chip-Id in Arm multi-chip platforms.
      For calculating linear core position of CPU cores from slave chips, AFF3
      bits has to be used. Update `plat_arm_calc_core_pos` assembly function
      to include AFF3 bits in calculation.
      
      Change-Id: I4af2bd82ab8e31e18bc61de22705a73893954260
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      80151c27
    • Vijayenthiran Subramaniam's avatar
      plat/arm/sgi: add macros for remote chip device region · e4854153
      Vijayenthiran Subramaniam authored
      
      
      Some of the Reference Design platforms like RD-N1-Edge can operate in
      multi-chip configuration wherein two or more SoCs are connected through
      a high speed coherent CCIX link. For the RD platforms, the remote chip
      address space is at the offset of 4TB per chip. In order for the primary
      chip to access the device memory region on the remote chip, the required
      memory region entries need to be added as mmap entry. This patch adds
      macros related to the remote chip device memory region.
      
      Change-Id: I833810b96f1a0e7c3c289ac32597b6ba03344c80
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      e4854153
    • Vijayenthiran Subramaniam's avatar
      plat/arm/sgi: add chip_id and multi_chip_mode to platform variant info · 6daeec70
      Vijayenthiran Subramaniam authored
      
      
      Multi-chip platforms have two or more identical chips connected using a
      high speed coherent link. In order to identify such platforms,
      add chip_id and multi_chip_mode information in the platform variant
      info structure. The values of these two new elements is populated
      during boot.
      
      Change-Id: Ie6e89cb33b3f0f408814f6239cd06647053e23ed
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      6daeec70
    • Vijayenthiran Subramaniam's avatar
      plat/arm/sgi: move bl31_platform_setup to board file · c7d4a217
      Vijayenthiran Subramaniam authored
      
      
      For SGI-575 and RD platforms, move bl31_platform_setup handler to
      individual board files to allow the platforms to perform board specific
      bl31 setup.
      
      Change-Id: Ia44bccc0a7f40a155b33909bcb438a0909b20d42
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      c7d4a217
    • Vijayenthiran Subramaniam's avatar
      board/rde1edge: fix incorrect topology tree description · 4e950109
      Vijayenthiran Subramaniam authored
      RD-E1-Edge platform consists of two clusters with eight CPUs each and
      two processing elements (PE) per CPU. Commit a9fbf13e
      
       (plat/arm/sgi:
      move topology information to board folder) defined the RD-E1-Edge
      topology tree to have two clusters with eight CPUs each but PE per CPU
      entries were not added. This patch fixes the topology tree accordingly.
      
      Change-Id: I7f97f0013be60e5d51c214fce3962e246bae8a0b
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      4e950109
    • Vijayenthiran Subramaniam's avatar
      plat/arm/sgi: introduce number of chips macro · 4d37aa76
      Vijayenthiran Subramaniam authored
      
      
      Introduce macro 'CSS_SGI_CHIP_COUNT' to allow Arm CSS platforms with
      multi-chip support to define number of chiplets on the platform. By
      default, this flag is set to 1 and does not affect the existing single
      chip platforms.
      
      For multi-chip platforms, override the default value of
      CSS_SGI_CHIP_COUNT with the number of chiplets supported on the
      platform. As an example, the command below sets the number of chiplets
      to two on the RD-N1-Edge multi-chip platform:
      
      export CROSS_COMPILE=<path-to-cross-compiler>
      make PLAT=rdn1edge CSS_SGI_CHIP_COUNT=2 ARCH=aarch64 all
      
      Change-Id: If364dc36bd34b30cc356f74b3e97633933e6c8ee
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      4d37aa76
  2. 06 Feb, 2020 1 commit
    • Max Shvetsov's avatar
      Adds option to read ROTPK from registers for FVP · a6ffddec
      Max Shvetsov authored
      
      
      Enables usage of ARM_ROTPK_LOCATION=regs for FVP board.
      Removes hard-coded developer keys. Instead, setting
      ARM_ROTPK_LOCATION=devel_* takes keys from default directory.
      In case of ROT_KEY specified - generates a new hash and replaces the
      original.
      
      Note: Juno board was tested by original feature author and was not tested
      for this patch since we don't have access to the private key. Juno
      implementation was moved to board-specific file without changing
      functionality. It is not known whether byte-swapping is still needed
      for this platform.
      
      Change-Id: I0fdbaca0415cdcd78f3a388551c2e478c01ed986
      Signed-off-by: default avatarMax Shvetsov <maksims.svecovs@arm.com>
      a6ffddec
  3. 04 Feb, 2020 1 commit
  4. 03 Feb, 2020 1 commit
  5. 29 Jan, 2020 1 commit
  6. 28 Jan, 2020 1 commit
  7. 27 Jan, 2020 2 commits
    • Madhukar Pappireddy's avatar
      plat/arm: Add support for SEPARATE_NOBITS_REGION · 0c1f197a
      Madhukar Pappireddy authored
      
      
      In order to support SEPARATE_NOBITS_REGION for Arm platforms, we need to load
      BL31 PROGBITS into secure DRAM space and BL31 NOBITS into SRAM. Hence mandate
      the build to require that ARM_BL31_IN_DRAM is enabled as well.
      
      Naturally with SEPARATE_NOBITS_REGION enabled, the BL31 initialization code
      cannot be reclaimed to be used for runtime data such as secondary cpu stacks.
      
      Memory map for BL31 NOBITS region also has to be created.
      
      Change-Id: Ibbc8c9499a32e63fd0957a6e254608fbf6fa90c9
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      0c1f197a
    • Vijayenthiran Subramaniam's avatar
      plat/arm/sgi: move topology information to board folder · a9fbf13e
      Vijayenthiran Subramaniam authored
      
      
      The platform topology description of the upcoming Arm's RD platforms
      have different topology than those listed in the sgi_topology.c file. So
      instead of adding platform specific topology into existing
      sgi_topology.c file, those can be added to respective board files. In
      order to maintain consistency with the upcoming platforms, move the
      existing platform topology description to respective board files.
      
      Change-Id: I4689c7d24cd0c75a3dc234370c34a85c08598abb
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      a9fbf13e
  8. 24 Jan, 2020 1 commit
  9. 23 Jan, 2020 1 commit
  10. 22 Jan, 2020 1 commit
    • Madhukar Pappireddy's avatar
      plat/arm: Add support for SEPARATE_NOBITS_REGION · d433bbdd
      Madhukar Pappireddy authored
      
      
      In order to support SEPARATE_NOBITS_REGION for Arm platforms, we need to load
      BL31 PROGBITS into secure DRAM space and BL31 NOBITS into SRAM. Hence mandate
      the build to require that ARM_BL31_IN_DRAM is enabled as well.
      
      Naturally with SEPARATE_NOBITS_REGION enabled, the BL31 initialization code
      cannot be reclaimed to be used for runtime data such as secondary cpu stacks.
      
      Memory map for BL31 NOBITS region also has to be created.
      
      Change-Id: Ibd480f82c1dc74e9cbb54eec07d7a8fecbf25433
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      d433bbdd
  11. 10 Jan, 2020 2 commits
    • Deepika Bhavnani's avatar
      Unify type of "cpu_idx" across PSCI module. · 5b33ad17
      Deepika Bhavnani authored
      
      
      NOTE for platform integrators:
         API `plat_psci_stat_get_residency()` third argument
         `last_cpu_idx` is changed from "signed int" to the
         "unsigned int" type.
      
      Issue / Trouble points
      1. cpu_idx is used as mix of `unsigned int` and `signed int` in code
      with typecasting at some places leading to coverity issues.
      
      2. Underlying platform API's return cpu_idx as `unsigned int`
      and comparison is performed with platform specific defines
      `PLAFORM_xxx` which is not consistent
      
      Misra Rule 10.4:
      The value of a complex expression of integer type may only be cast to
      a type that is narrower and of the same signedness as the underlying
      type of the expression.
      
      Based on above points, cpu_idx is kept as `unsigned int` to match
      the API's and low-level functions and platform defines are updated
      where ever required
      Signed-off-by: default avatarDeepika Bhavnani <deepika.bhavnani@arm.com>
      Change-Id: Ib26fd16e420c35527204b126b9b91e8babcc3a5c
      5b33ad17
    • Alexei Fedorov's avatar
      FVP: Remove re-definition of topology related build options · 94f1c959
      Alexei Fedorov authored
      
      
      This patch removes re-definition of the following FVP build
      options from plat\arm\board\fvp\fvp_def.h:
       'FVP_CLUSTER_COUNT'
       'FVP_MAX_CPUS_PER_CLUSTER'
       'FVP_MAX_PE_PER_CPU'
      which are set in platform.mk.
      
      This fixes a potential problem when a build option set in
      platform.mk file can be re-defined in fvp_def.h header file
      used by other build component with a different makefile which
      does not set this option.
      Ref. GENFW-3505.
      
      Change-Id: I4288629920516acf2c239c7b733f92a0c5a812ff
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      94f1c959
  12. 07 Jan, 2020 3 commits
  13. 03 Jan, 2020 1 commit
    • Vishnu Banavath's avatar
      drivers: add a driver for snoop control unit · c20c0525
      Vishnu Banavath authored
      
      
      The SCU connects one to four Cortex-A5/Cortex-A9 processors
      to the memory system through the AXI interfaces.
      
      The SCU functions are to:
      - maintain data cache coherency between the Cortex-A5/Cortex-A9
        processors
      - initiate L2 AXI memory accesses
      - arbitrate between Cortex-A5/Cortex-A9 processors requesting
        L2 accesses
      - manage ACP accesses.
      
      Snoop Control Unit will enable to snoop on other CPUs caches.
      This is very important when it comes to synchronizing data between
      CPUs. As an example, there is a high chance that data might be
      cache'd and other CPUs can't see the change. In such cases,
      if snoop control unit is enabled, data is synchoronized immediately
      between CPUs and the changes are visible to other CPUs.
      
      This driver provides functionality to enable SCU as well as enabling
      user to know the following
      - number of CPUs present
      - is a particular CPU operating in SMP mode or AMP mode
      - data cache size of a particular CPU
      - does SCU has ACP port
      - is L2CPRESENT
      
      Change-Id: I0d977970154fa60df57caf449200d471f02312a0
      Signed-off-by: default avatarVishnu Banavath <vishnu.banavath@arm.com>
      c20c0525
  14. 20 Dec, 2019 5 commits
    • Paul Beesley's avatar
      spm-mm: Remove mm_svc.h header · 962c44e7
      Paul Beesley authored
      
      
      The contents of this header have been merged into the spm_mm_svc.h
      header file.
      
      Change-Id: I01530b2e4ec1b4c091ce339758025e2216e740a4
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      962c44e7
    • Paul Beesley's avatar
      spm-mm: Refactor spm_svc.h and its contents · 0bf9f567
      Paul Beesley authored
      
      
      Change-Id: I91c192924433226b54d33e57d56d146c1c6df81b
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      0bf9f567
    • Paul Beesley's avatar
      spm-mm: Refactor secure_partition.h and its contents · aeaa225c
      Paul Beesley authored
      
      
      Before adding any new SPM-related components we should first do
      some cleanup around the existing SPM-MM implementation. The aim
      is to make sure that any SPM-MM components have names that clearly
      indicate that they are MM-related. Otherwise, when adding new SPM
      code, it could quickly become confusing as it would be unclear to
      which component the code belongs.
      
      The secure_partition.h header is a clear example of this, as the
      name is generic so it could easily apply to any SPM-related code,
      when it is in fact SPM-MM specific.
      
      This patch renames the file and the two structures defined within
      it, and then modifies any references in files that use the header.
      
      Change-Id: I44bd95fab774c358178b3e81262a16da500fda26
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      aeaa225c
    • Paul Beesley's avatar
      spm: Remove SPM Alpha 1 prototype and support files · 538b0020
      Paul Beesley authored
      
      
      The Secure Partition Manager (SPM) prototype implementation is
      being removed. This is preparatory work for putting in place a
      dispatcher component that, in turn, enables partition managers
      at S-EL2 / S-EL1.
      
      This patch removes:
      
      - The core service files (std_svc/spm)
      - The Resource Descriptor headers (include/services)
      - SPRT protocol support and service definitions
      - SPCI protocol support and service definitions
      
      Change-Id: Iaade6f6422eaf9a71187b1e2a4dffd7fb8766426
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      Signed-off-by: default avatarArtsem Artsemenka <artsem.artsemenka@arm.com>
      538b0020
    • Paul Beesley's avatar
      Remove dependency between SPM_MM and ENABLE_SPM build flags · 3f3c341a
      Paul Beesley authored
      
      
      There are two different implementations of Secure Partition
      management in TF-A. One is based on the "Management Mode" (MM)
      design, the other is based on the Secure Partition Client Interface
      (SPCI) specification. Currently there is a dependency between their
      build flags that shouldn't exist, making further development
      harder than it should be. This patch removes that
      dependency, making the two flags function independently.
      
      Before: ENABLE_SPM=1 is required for using either implementation.
              By default, the SPCI-based implementation is enabled and
              this is overridden if SPM_MM=1.
      
      After: ENABLE_SPM=1 enables the SPCI-based implementation.
             SPM_MM=1 enables the MM-based implementation.
             The two build flags are mutually exclusive.
      
      Note that the name of the ENABLE_SPM flag remains a bit
      ambiguous - this will be improved in a subsequent patch. For this
      patch the intention was to leave the name as-is so that it is
      easier to track the changes that were made.
      
      Change-Id: I8e64ee545d811c7000f27e8dc8ebb977d670608a
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      3f3c341a
  15. 19 Dec, 2019 1 commit
  16. 18 Dec, 2019 1 commit
  17. 17 Dec, 2019 2 commits
  18. 10 Dec, 2019 1 commit
    • Ambroise Vincent's avatar
      arm: gicv3: Fix compiler dependent behavior · d0196911
      Ambroise Vincent authored
      
      
      C99 standard: "What constitutes an access to an object that has
      volatile-qualified type is implementation-defined".
      
      GCC is not considering the cast to void of volatile structures as an
      access and so is not actually issuing reads.
      
      Clang does read those structures by copying them on the stack, which in
      this case creates an overflow because of their large size.
      
      This patch removes the cast to void and instead uses the USED attribute
      to tell the compiler to retain the static variables.
      
      Change-Id: I952b5056e3f6e91841e7ef9558434352710ab80d
      Signed-off-by: default avatarAmbroise Vincent <ambroise.vincent@arm.com>
      	       Zelalem Aweke <zelalem.aweke@arm.com>
      d0196911
  19. 09 Dec, 2019 2 commits
  20. 19 Nov, 2019 1 commit
  21. 18 Nov, 2019 1 commit
    • Louis Mayencourt's avatar
      ROMLIB: Optimize memory layout when ROMLIB is used · e7b39089
      Louis Mayencourt authored
      
      
      ROMLIB extract functions code from BL images to put them inside ROM.
      This has for effect to reduce the size of the BL images.
      
      This patch take this size reduction into consideration to optimize the
      memory layout of BL2.
      A new "PLAT_ARM_BL2_ROMLIB_OPTIMIZATION" macro is defined and used to
      reduce "PLAT_ARM_MAX_BL2_SIZE". This allows to remove the gap between
      BL1 and BL2 when ROMLIB is used and provides more room for BL31.
      
      The current memory gain is 0x6000 for fvp and 0x8000 for juno.
      
      Change-Id: I71c2c2c63b57bce5b22a125efaefc486ff3e87be
      Signed-off-by: default avatarLouis Mayencourt <louis.mayencourt@arm.com>
      e7b39089
  22. 15 Nov, 2019 1 commit