1. 17 Apr, 2020 1 commit
  2. 14 Apr, 2020 1 commit
    • Aditya Angadi's avatar
      plat/arm/sgi: update mmap and xlat count · def3b54b
      Aditya Angadi authored
      
      
      A single chip platform requires five mmap entries and a corresponding
      number of translation tables. For every additional chip in the system,
      three additional mmap entries are required to map the shared SRAM and
      the IO regions. A corresponding number of additional translation
      tables are required as well.
      
      Change-Id: I1332a1305f2af62181387cf36954f6fb0e6f11ed
      Signed-off-by: default avatarAditya Angadi <aditya.angadi@arm.com>
      def3b54b
  3. 09 Apr, 2020 1 commit
    • Andre Przywara's avatar
      arm_fpga: Remove bogus timer initialisation · a82ea1db
      Andre Przywara authored
      
      
      The arm_fpga platform code contains an dubious line to initialise some
      timer. On closer inspection this turn out to be bogus, as this was only
      needed on some special (older) FPGA board, and is actually not needed on
      the current model. Also the base address was wrong anyways.
      
      Remove the code entirely.
      
      Change-Id: I02e71aea645051b5addb42d972d7a79f04b81106
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      a82ea1db
  4. 07 Apr, 2020 3 commits
  5. 03 Apr, 2020 1 commit
  6. 02 Apr, 2020 3 commits
  7. 31 Mar, 2020 1 commit
  8. 30 Mar, 2020 3 commits
  9. 27 Mar, 2020 1 commit
  10. 26 Mar, 2020 8 commits
    • Oliver Swede's avatar
      plat/arm/board/arm_fpga: Compile with additional CPU libraries · 4b5793c9
      Oliver Swede authored
      
      
      This change is part of the goal of enabling the port to be compatible
      with multiple FPGA images.
      
      BL31 behaves differently depending on whether or not the CPUs in the
      system use cache coherency, and as a result any CPU libraries that are
      compiled together must serve processors that are consistent in this
      regard.
      
      This compiles a different set of CPU libraries depending on whether or
      not the HW_ASSISTED_COHERENCY is enabled at build-time to indicate the
      CPUs support hardware-level support for cache coherency. This build
      flag is used in the makefile in the same way as the Arm FVP port.
      Signed-off-by: default avatarOliver Swede <oli.swede@arm.com>
      Change-Id: I18300b4443176b89767015e3688c0f315a91c27e
      4b5793c9
    • Oliver Swede's avatar
      plat/arm/board/arm_fpga: Enable position-independent execution · 62056e4e
      Oliver Swede authored
      
      
      This allows the BL31 port to run with position-independent execution
      enabled so that it can be ran from any address in the system.
      This increases the flexibility of the image, allowing it to be ran from
      other locations rather than only its hardcoded absolute address
      (currently set to the typical DRAM base of 2GB). This may be useful for
      future images that describe system configurations with other memory
      layouts (e.g. where SRAM is included).
      
      It does this by setting ENABLE_PIE=1 and changing the absolute
      address to 0. The load address of bl31.bin can then be specified by
      the -l [load address] argument in the fpga-run command (additionally,
      this address is required by any preceding payloads that specify the
      start address. For ELF payloads this is usually extracted automatically
      by reading the entrypoint address in the header, however bl31.bin is a
      different file format so has this additional dependency).
      Signed-off-by: default avatarOliver Swede <oli.swede@arm.com>
      Change-Id: Idd74787796ab0cf605fe2701163d9c4b3223a143
      62056e4e
    • Oliver Swede's avatar
      plat/arm/board/arm_fpga: Enable port for alternative cluster configurations · e726c758
      Oliver Swede authored
      
      
      This change is part of the goal of enabling the port to be compatible
      with multiple FPGA images.
      
      The BL31 port that is uploaded as a payload to the FPGA with an image
      should cater for a wide variety of system configurations. This patch
      makes the necessary changes to enable it to function with images whose
      cluster configurations may be larger (either by utilizing more
      clusters, more CPUs per cluster, more threads in each CPU, or a
      combination) than the initial image being used for testing.
      
      As part of this, the hard-coded values that configure the size of the
      array describing the topology of the power domain tree are increased
      to max. 8 clusters, max. 8 cores per cluster & max 4 threads per core.
      This ensures the port works with cluster configurations up to these
      sizes. When there are too many entries for the number of available PEs,
      e.g. if there is a variable number of CPUs between clusters, then there
      will be empty entries in the array. This is permitted and the PSCI
      library will still function as expected. While this increases its size,
      this shouldn't be an issue in the context of the size of BL31, and is
      worth the trade-off for the extra compatibility.
      Signed-off-by: default avatarOliver Swede <oli.swede@arm.com>
      Change-Id: I7d4ae1e20b2e99fdbac428d122a2cf9445394363
      e726c758
    • Oliver Swede's avatar
      plat/arm/board/arm_fpga: Initialize the Generic Interrupt Controller · 87762bce
      Oliver Swede authored
      
      
      This initializes the GIC using the Arm GIC drivers in TF-A.
      The initial FPGA image uses a GIC600 implementation, and so that its
      power controller is enabled, this platform port calls the corresponding
      implementation-specific routines.
      Signed-off-by: default avatarOliver Swede <oli.swede@arm.com>
      Change-Id: I88d5a073eead4b653b1ca73273182cd98a95e4c5
      87762bce
    • Oliver Swede's avatar
      plat/arm/board/arm_fpga: Initialize the System Counter · 2d696d18
      Oliver Swede authored
      
      
      This sets the frequency of the system counter so that the Delay Timer
      driver programs the correct value to CNTCRL. This value depends on
      the FPGA image being used, and is 10MHz for the initial test image.
      Once configured, the BL31 platform setup sequence then enables the
      system counter.
      Signed-off-by: default avatarOliver Swede <oli.swede@arm.com>
      Change-Id: Ieb036a36fd990f350b5953357424a255b8ac5d5a
      2d696d18
    • Oliver Swede's avatar
      plat/arm/board/arm_fpga: Add PSCI implementation for FPGA images · 7ee4db6e
      Oliver Swede authored
      
      
      This adds a basic PSCI implementation allow secondary CPUs to be
      released from an initial state and continue through to the warm boot
      entrypoint.
      
      Each secondary CPU is kept in a holding pen, whereby it polls the value
      representing its hold state, by reading this from an array that acts as
      a table for all the PEs. The hold states are initially set to 0 for all
      cores to indicate that the executing core should continue polling.
      To prevent the secondary CPUs from interfering with the platform's
      initialization, they are only updated by the primary CPU once the cold
      boot sequence has completed and fpga_pwr_domain_on(mpidr) is called.
      The polling target CPU will then read 1 (which indicates that it should
      branch to the warm reset entrypoint) and then jump to that address
      rather than continue polling.
      
      In addition to the initial polling behaviour of the secondary CPUs
      before their warm boot reset sequence, they are also placed in a
      low-power wfe() state at the end of each poll; accordingly, the PSCI
      fpga_pwr_domain_on(mpidr) function also signals an event to all cores
      (after updating the target CPU's hold entry) to wake them from this
      state, allowing any secondary CPUs that are still polling to check
      their hold state again.
      This method is in accordance with both the PSCI and Linux kernel
      recommendations, as the lessened overhead reduces the energy
      consumption associated with the busy-loop.
      
      The table of hold entries is implemented by a global array as shared SRAM
      (which is used by other platforms in similar implementations) is not
      available on the FPGA images.
      Signed-off-by: default avatarOliver Swede <oli.swede@arm.com>
      Change-Id: I65cfd1892f8be1dfcb285f0e1e94e7a9870cdf5a
      7ee4db6e
    • Oliver Swede's avatar
      plat/arm/board/arm_fpga: Use preloaded BL33 alternative boot flow · 5cfe699f
      Oliver Swede authored
      This makes use of the PRELOADED_BL33_BASE flag to indicate to BL31 that
      the BL33 payload (kernel) has already been loaded and resides in memory;
      BL31 will then jump to the non-secure address.
      
      For this port the BL33 payload is the Linux kernel, and in accordance
      with the pre-kernel setup requirements (as specified in the `Booting
      AArch64 Linux' documentation:
      https://www.kernel.org/doc/Documentation/arm64/booting.txt
      
      ),
      this change also sets up the primary CPU's registers x0-x3 so they are
      the expected values, which includes the address of the DTB at x0.
      
      An external linker script is currently required to combine BL31, the
      BL33 payload, and any other software images to create an ELF file that
      can be uploaded to the FPGA board along with the bit file. It therefore
      has dependencies on the value of PRELOADED_BL33_BASE (kernel base) and
      the DTB base (plus any other relevant base addresses used to
      distinguish the different ELF sections), both of which are set in this
      patch.
      Signed-off-by: default avatarOliver Swede <oli.swede@arm.com>
      Change-Id: If7ae8ee82d1e09fb05f553f6077ae13680dbf66b
      5cfe699f
    • Oliver Swede's avatar
      plat/arm/board/arm_fpga: Enable basic BL31 port for an FPGA image · 536d906a
      Oliver Swede authored
      
      
      This adds the minimal functions and definitions to create a basic
      BL31 port for an initial FPGA image, in order for the port to be
      uploaded to one the FPGA boards operated by an internal group within
      Arm, such that BL31 runs as a payload for an image.
      
      Future changes will enable the port for a wide range of system
      configurations running on the FPGA boards to ensure compatibility with
      multiple FPGA images.
      
      It is expected that this will replace the FPGA fork of the Linux kernel
      bootwrapper by performing similar secure-world initialization and setup
      through the use of drivers and other well-established methods, before
      passing control to the kernel, which will act as the BL33 payload and
      run in EL2NS.
      
      This change introduces a basic, loadable port with the console
      initialized by setting the baud rate and base address of the UART as
      configured by the Zeus image.
      
      It is a BL31-only port, and RESET_TO_BL31 is enabled to reflect this.
      Signed-off-by: default avatarOliver Swede <oli.swede@arm.com>
      Change-Id: I1817ad81be00afddcdbbda1ab70eb697203178e2
      536d906a
  11. 25 Mar, 2020 1 commit
  12. 23 Mar, 2020 1 commit
  13. 19 Mar, 2020 2 commits
    • Manish Pandey's avatar
      fvp: use two instances of Cactus at S-EL1 · 161dbc43
      Manish Pandey authored
      
      
      To demonstrate communication between SP's two instances of Cactus at
      S-EL1 has been used.
      This patch replaces Ivy SP with cactus-secondary SP which aligns with
      changes in tf-a-tests repository.
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      Change-Id: Iee84f1f7f023b7c4f23fbc13682a42614a7f3707
      161dbc43
    • Olivier Deprez's avatar
      spmc: manifest changes to support two sample cactus secure partitions · 3d5ed6de
      Olivier Deprez authored
      
      
      When using the SPM Dispatcher, the SPMC sits as a BL32 component
      (BL32_IMAGE_ID). The SPMC manifest is passed as the TOS fw config
      component (TOS_FW_CONFIG_ID). It defines platform specific attributes
      (memory range and physical CPU layout) as well as the attributes for
      each secure partition (mostly load address). This manifest is passed
      to the SPMC on boot up. An SP package contains the SP dtb in the SPCI
      defined partition manifest format. As the SPMC manifest was enriched
      it needs an increase of tos_fw-config max-size in fvp_fw_config dts.
      Signed-off-by: default avatarOlivier Deprez <olivier.deprez@arm.com>
      Change-Id: Ia1dce00c6c4cbaa118fa56617980d32e2956a94e
      3d5ed6de
  14. 17 Mar, 2020 2 commits
  15. 16 Mar, 2020 1 commit
    • Louis Mayencourt's avatar
      fconf: Clean Arm IO · a6de824f
      Louis Mayencourt authored
      
      
      Merge the previously introduced arm_fconf_io_storage into arm_io_storage. This
      removes the duplicate io_policies and functions definition.
      
      This patch:
      - replace arm_io_storage.c with the content of arm_fconf_io_storage.c
      - rename the USE_FCONF_BASED_IO option into ARM_IO_IN_DTB.
      - use the ARM_IO_IN_DTB option to compile out io_policies moved in dtb.
      - propagate DEFINES when parsing dts.
      - use ARM_IO_IN_DTB to include or not uuid nodes in fw_config dtb.
      - set the ARM_IO_IN_DTB to 0 by default for fvp. This ensure that the behavior
        of fvp stays the same as it was before the introduction of fconf.
      
      Change-Id: Ia774a96d1d3a2bccad29f7ce2e2b4c21b26c080e
      Signed-off-by: default avatarLouis Mayencourt <louis.mayencourt@arm.com>
      a6de824f
  16. 13 Mar, 2020 1 commit
  17. 12 Mar, 2020 4 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
    • Aditya Angadi's avatar
      board/rddaniel: add NSAID sources for TZC400 driver · 01efae04
      Aditya Angadi authored
      
      
      Add CLCD, HDLCD, PCI and VIRTIO devices as source interfaces for TZC
      filter unit to enable DMA for these devices.
      
      Change-Id: Ifad2e56b18605311936e03cfcccda573cac7e60a
      Signed-off-by: default avatarAditya Angadi <aditya.angadi@arm.com>
      01efae04
    • 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
  18. 11 Mar, 2020 5 commits
    • 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
    • Vijayenthiran Subramaniam's avatar
      plat/arm/sgi: mark remote chip shared ram as non-cacheable · 4ea9e587
      Vijayenthiran Subramaniam authored
      
      
      Shared RAM region in the remote chip's memory is used as one of the
      mailbox region (SCMI payload area) through which the AP core on the
      local chip and SCP core on the remote chip exchange SCMI protocol
      message during the initialization. Mark this region as non-cacheable in
      the MMAP entry to prevent local AP core from reading stale data from the
      cache.
      
      Change-Id: I7e9dc5fbcc3b40e9bcff5499f15abd2aadaed385
      Signed-off-by: default avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
      4ea9e587
    • 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