1. 12 Mar, 2020 3 commits
    • Max Shvetsov's avatar
      SPMD: Add support for SPCI_ID_GET · ac03ac5e
      Max Shvetsov authored
      
      
      This patch introduces the `SPCI_ID_GET` interface which will return the
      ID of the calling SPCI component. Returns 0 for requests from the
      non-secure world and the SPCI component ID as specified in the manifest
      for secure world requests.
      
      Change-Id: Icf81eb1d0e1d7d5c521571e04972b6e2d356e0d1
      Signed-off-by: default avatarMax Shvetsov <maksims.svecovs@arm.com>
      Signed-off-by: default avatarMarc Bonnici <marc.bonnici@arm.com>
      ac03ac5e
    • Chris Kay's avatar
      juno/sgm: Maximize space allocated to SCP_BL2 · ddc93cba
      Chris Kay authored
      
      
      To accommodate the increasing size of the SCP_BL2 binary, the base
      address of the memory region allocated to SCP_BL2 has been moved
      downwards from its current (mostly) arbitrary address to the beginning
      of the non-shared trusted SRAM.
      
      Change-Id: I086a3765bf3ea88f45525223d765dc0dbad6b434
      Signed-off-by: default avatarChris Kay <chris.kay@arm.com>
      ddc93cba
    • Madhukar Pappireddy's avatar
      plat/arm/fvp: populate pwr domain descriptor dynamically · 6138ffbc
      Madhukar Pappireddy authored
      
      
      The motivation behind this patch and following patches is to extract
      information about the platform in runtime rather than depending on
      compile time macros such as FVP_CLUSTER_COUNT. This partially enables
      us to use a single binary for a family of platforms which all have
      similar hardware capabilities but differ in configurations.
      
      we populate the data structure describing the power domain hierarchy
      of the platform dynamically by querying the number of clusters and cpus
      using fconf getter APIs. Compile time macro such as FVP_CLUSTER_COUNT
      is still needed as it determines the size of related data structures.
      
      Note that the cpu-map node in HW_CONFIG dts represents a logical
      hierarchy of power domains of CPU. However, in reality, the power
      domains may not have been physically built in such hierarchy.
      
      Change-Id: Ibcbb5ca7b2c969f8ad03ab2eab289725245af7a9
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      6138ffbc
  2. 11 Mar, 2020 14 commits
    • Kalyani Chidambaram's avatar
      Tegra210: Remove "unsupported func ID" error msg · b8dbf073
      Kalyani Chidambaram authored
      
      
      The platform sip is reporting a "unsupported function ID" if the
      smc function id is not pmc command. When actually the smc function id
      could be specific to the tegra sip handler.
      This patch removes the error reported.
      
      Change-Id: Ia3c8545d345746c5eea6d75b9e6957ca23ae9ca3
      Signed-off-by: default avatarKalyani Chidambaram <kalyanic@nvidia.com>
      b8dbf073
    • Varun Wadekar's avatar
      Tegra210: support for secure physical timer · f8827c60
      Varun Wadekar authored
      
      
      This patch enables on-chip timer1 interrupts for Tegra210 platforms.
      
      Change-Id: Ic7417dc0e69264d7c28aa012fe2322cd30838f3e
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      f8827c60
    • Varun Wadekar's avatar
      Tegra: smmu: export handlers to read/write SMMU registers · 91dd7edd
      Varun Wadekar authored
      
      
      This patch exports the SMMU register read/write handlers for platforms.
      
      Change-Id: If92f0d3ce820e4997c090b48be7614407bb582da
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      91dd7edd
    • Pritesh Raithatha's avatar
      Tegra: smmu: remove context save sequence · a391d494
      Pritesh Raithatha authored
      
      
      SMMU and MC registers are saved as part of the System Suspend sequence.
      The register list includes some NS world SMMU registers that need to be
      saved by NS world software instead. All that remains as a result are
      the MC registers.
      
      This patch moves code to MC file as a result and renames all the
      variables and defines to use the MC prefix instead of SMMU. The
      Tegra186 and Tegra194 platform ports are updated to provide the MC
      context register list to the parent driver. The memory required for
      context save is reduced due to removal of the SMMU registers.
      
      Change-Id: I83a05079039f52f9ce91c938ada6cd6dfd9c843f
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      a391d494
    • Varun Wadekar's avatar
      Tegra: bpmp: fixup TEGRA_CLK_SE values for Tegra186/Tegra194 · e9044480
      Varun Wadekar authored
      
      
      This patch fixes the SE clock ID being used for Tegra186 and Tegra194
      SoCs. Previous assumption, that both SoCs use the same clock ID, was
      incorrect.
      
      Change-Id: I1ef0da5547ff2e14151b53968cad9cc78fee63bd
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e9044480
    • Pritesh Raithatha's avatar
      Tegra194: memctrl: lock some more MC SID security configs · de3fd9b3
      Pritesh Raithatha authored
      
      
      The platform code already contains the initial set of MC SID
      security configs to be locked during boot. This patch adds some
      more configs to the list. Since the reset value of these registers
      is already as per expectations, there is no need to change it.
      
      MC SID security configs
      - PTCR,
      - MIU6R, MIU6W, MIU7R, MIU7W,
      - MPCORER, MPCOREW,
      - NVDEC1SRD, NVDEC1SRD1, NVDEC1SWR.
      
      Change-Id: Ia9a1f6a6b6d34fb2787298651f7a4792a40b88ab
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      de3fd9b3
    • Jeetesh Burman's avatar
      Tegra194: add SE support to generate SHA256 of TZRAM · 029dd14e
      Jeetesh Burman authored
      
      
      The BL3-1 firmware code is stored in TZSRAM on Tegra194 platforms. This
      memory loses power when we enter System Suspend and so its contents are
      stored to TZDRAM, before entry. This opens up an attack vector where the
      TZDRAM contents might be tampered with when we are in the System Suspend
      mode. To mitigate this attack the SE engine calculates the hash of entire
      TZSRAM and stores it in PMC scratch, before we copy data to TZDRAM. The
      WB0 code will validate the TZDRAM and match the hash with the one in PMC
      scratch.
      
      This patch adds driver for the SE engine, with APIs to calculate the hash
      and store to PMC scratch registers.
      
      Change-Id: I04cc0eb7f54c69d64b6c34fc2ff62e4cfbdd43b2
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      029dd14e
    • Jeetesh Burman's avatar
      Tegra194: store TZDRAM base/size to scratch registers · 2ac7b223
      Jeetesh Burman authored
      
      
      This patch saves the TZDRAM base and size values to secure scratch
      registers, for the WB0. The WB0 reads these values and uses them to
      verify integrity of the TZDRAM aperture.
      
      Change-Id: I2f5fd11c87804d20e2698de33be977991c9f6f33
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      2ac7b223
    • kalyani chidambaram's avatar
      Tegra194: fix warnings for extra parentheses · 6dbe1c8f
      kalyani chidambaram authored
      
      
      armclang displays warnings for extra parentheses, leading to
      build failures as warnings are treated as errors.
      This patch removes the extra parentheses to fix this issue.
      
      Change-Id: Id2fd6a3086590436eecabc55502f40752a018131
      Signed-off-by: default avatarKalyani Chidambaram <kalyanic@nvidia.com>
      6dbe1c8f
    • Madhukar Pappireddy's avatar
      fconf: Extract topology node properties from HW_CONFIG dtb · 4682461d
      Madhukar Pappireddy authored
      
      
      Create, register( and implicitly invoke) fconf_populate_topology()
      function which extracts the topology related properties from dtb into
      the newly created fconf based configuration structure 'soc_topology'.
      Appropriate libfdt APIs are added to jmptbl.i file for use with USE_ROMLIB
      build feature.
      
      A new property which describes the power domain levels is added to the
      HW_CONFIG device tree source files.
      
      This patch also fixes a minor bug in the common device tree file
      fvp-base-gicv3-psci-dynamiq-common.dtsi
      As this file includes fvp-base-gicv3-psci-common.dtsi, it is necessary
      to delete all previous cluster node definitons because DynamIQ based
      models have upto 8 CPUs in each cluster. If not deleted, the final dts
      would have an inaccurate description of SoC topology, i.e., cluster0
      with 8 or more core nodes and cluster1 with 4 core nodes.
      
      Change-Id: I9eb406da3ba4732008a66c01afec7c9fa8ef59bf
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      4682461d
    • Madhukar Pappireddy's avatar
      fconf: necessary modifications to support fconf in BL31 & SP_MIN · 26d1e0c3
      Madhukar Pappireddy authored
      
      
      Necessary infrastructure added to integrate fconf framework in BL31 & SP_MIN.
      Created few populator() functions which parse HW_CONFIG device tree
      and registered them with fconf framework. Many of the changes are
      only applicable for fvp platform.
      
      This patch:
      1. Adds necessary symbols and sections in BL31, SP_MIN linker script
      2. Adds necessary memory map entry for translation in BL31, SP_MIN
      3. Creates an abstraction layer for hardware configuration based on
         fconf framework
      4. Adds necessary changes to build flow (makefiles)
      5. Minimal callback to read hw_config dtb for capturing properties
         related to GIC(interrupt-controller node)
      6. updates the fconf documentation
      
      Change-Id: Ib6292071f674ef093962b9e8ba0d322b7bf919af
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      26d1e0c3
    • Madhukar Pappireddy's avatar
      fconf: enhancements to firmware configuration framework · 25d740c4
      Madhukar Pappireddy authored
      
      
      A populate() function essentially captures the value of a property,
      defined by a platform, into a fconf related c structure. Such a
      callback is usually platform specific and is associated to a specific
      configuration source.
      For example, a populate() function which captures the hardware topology
      of the platform can only parse HW_CONFIG DTB. Hence each populator
      function must be registered with a specific 'config_type' identifier.
      It broadly represents a logical grouping of configuration properties
      which is usually a device tree source file.
      
      Example:
      > TB_FW: properties related to trusted firmware such as IO policies,
      	 base address of other DTBs, mbedtls heap info etc.
      > HW_CONFIG: properties related to hardware configuration of the SoC
      	 such as topology, GIC controller, PSCI hooks, CPU ID etc.
      
      This patch modifies FCONF_REGISTER_POPULATOR macro and fconf_populate()
      to register and invoke the appropriate callbacks selectively based on
      configuration type.
      
      Change-Id: I6f63b1fd7a8729c6c9137d5b63270af1857bb44a
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      25d740c4
    • Chandni Cherukuri's avatar
      n1sdp: Enable the NEOVERSE_N1_EXTERNAL_LLC flag · 303b6d06
      Chandni Cherukuri authored
      
      
      Since N1SDP has a system level cache which is an
      external LLC enable the NEOVERSE_N1_EXTERNAL_LLC flag.
      
      Change-Id: Idb34274e61e7fd9db5485862a0caa497f3e290c7
      Signed-off-by: default avatarChandni Cherukuri <chandni.cherukuri@arm.com>
      303b6d06
    • Masahiro Yamada's avatar
      Factor xlat_table sections in linker scripts out into a header file · 665e71b8
      Masahiro Yamada authored
      
      
      TF-A has so many linker scripts, at least one linker script for each BL
      image, and some platforms have their own ones. They duplicate quite
      similar code (and comments).
      
      When we add some changes to linker scripts, we end up with touching
      so many files. This is not nice in the maintainability perspective.
      
      When you look at Linux kernel, the common code is macrofied in
      include/asm-generic/vmlinux.lds.h, which is included from each arch
      linker script, arch/*/kernel/vmlinux.lds.S
      
      TF-A can follow this approach. Let's factor out the common code into
      include/common/bl_common.ld.h
      
      As a start point, this commit factors out the xlat_table section.
      
      Change-Id: Ifa369e9b48e8e12702535d721cc2a16d12397895
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      665e71b8
  3. 10 Mar, 2020 1 commit
  4. 09 Mar, 2020 10 commits
  5. 06 Mar, 2020 5 commits
  6. 05 Mar, 2020 3 commits
  7. 04 Mar, 2020 1 commit
    • Manish Pandey's avatar
      SPMD: loading Secure Partition payloads · cb3b5344
      Manish Pandey authored
      
      
      This patch implements loading of Secure Partition packages using
      existing framework of loading other bl images.
      
      The current framework uses a statically defined array to store all the
      possible image types and at run time generates a link list and traverse
      through it to load different images.
      
      To load SPs, a new array of fixed size is introduced which will be
      dynamically populated based on number of SPs available in the system
      and it will be appended to the loadable images list.
      
      Change-Id: I8309f63595f2a71b28a73b922d20ccba9c4f6ae4
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      cb3b5344
  8. 03 Mar, 2020 3 commits