1. 07 Apr, 2020 2 commits
    • Alexei Fedorov's avatar
      FVP: Add support for GICv4 extension · e6e10ecc
      Alexei Fedorov authored
      
      
      This patch adds support for GICv4 extension for FVP platform.
      
      Change-Id: Ia389b61266af669b1ca9b999a8b76476cab214f4
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      e6e10ecc
    • Manish V Badarkhe's avatar
      Increase maximum size of BL2 image · 9dfe46c2
      Manish V Badarkhe authored
      
      
      Increased the maximum size of BL2 image in order to
      accommodate the BL2 image when TF-A build with no compiler
      optimization for ARM platform.
      
      Note: As of now, "no compiler optimization" build works
      only when TRUSTED_BOOT_BOARD option is set to 0.
      
      This change is verified using below CI configuration:
      1. juno-no-optimize-default:juno-linux.uboot
      2. fvp-no-optimize-default,fvp-default:fvp-tftf-fip.tftf-aemv8a-debug
      
      Change-Id: I5932621237f8acd1b510682388f3ba78eae90ea4
      Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
      9dfe46c2
  2. 03 Apr, 2020 1 commit
  3. 02 Apr, 2020 2 commits
  4. 31 Mar, 2020 1 commit
  5. 30 Mar, 2020 3 commits
  6. 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
  7. 25 Mar, 2020 1 commit
  8. 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
  9. 17 Mar, 2020 1 commit
    • Madhukar Pappireddy's avatar
      FVP: In BL31/SP_MIN, map only the needed DRAM region statically · 493545b3
      Madhukar Pappireddy authored
      
      
      Rather than creating entry in plat_arm_mmap array to map the
      entire DRAM region in BL31/SP_MIN, only map a smaller region holding
      HW_CONFIG DTB. Consequently, an increase in number of sub-translation
      tables(level-2 and level-3) i.e., MAX_XLAT_TABLES is necessary to map
      the new region in memory.
      
      In order to accommodate the increased code size in BL31 i.e.,
      PROGBITS, the max size of BL31 image is increased by 0x1000(4K).
      
      Change-Id: I540b8ee550588e22a3a9fb218183d2ab8061c851
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      493545b3
  10. 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
  11. 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
  12. 11 Mar, 2020 3 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
    • 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
  13. 10 Mar, 2020 1 commit
  14. 03 Mar, 2020 2 commits
  15. 25 Feb, 2020 1 commit
    • Alexei Fedorov's avatar
      FVP: Fix incorrect GIC mapping · b3c431f3
      Alexei Fedorov authored
      
      
      This patch fixes incorrect setting for DEVICE1_SIZE
      for FVP platforms with more than 8 PEs.
      The current value of 0x200000 supports only 8 PEs
      and causes exception for FVP platforms with the greater
      number of PEs, e.g. FVP_Base_Cortex_A65AEx8 with 16 PEs
      in one cluster.
      
      Change-Id: Ie6391509fe6eeafb8ba779303636cd762e7d21b2
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      b3c431f3
  16. 24 Feb, 2020 5 commits
    • Petre-Ionut Tudor's avatar
      Read-only xlat tables for BL31 memory · 60e8f3cf
      Petre-Ionut Tudor authored
      
      
      This patch introduces a build flag which allows the xlat tables
      to be mapped in a read-only region within BL31 memory. It makes it
      much harder for someone who has acquired the ability to write to
      arbitrary secure memory addresses to gain control of the
      translation tables.
      
      The memory attributes of the descriptors describing the tables
      themselves are changed to read-only secure data. This change
      happens at the end of BL31 runtime setup. Until this point, the
      tables have read-write permissions. This gives a window of
      opportunity for changes to be made to the tables with the MMU on
      (e.g. reclaiming init code). No changes can be made to the tables
      with the MMU turned on from this point onwards. This change is also
      enabled for sp_min and tspd.
      
      To make all this possible, the base table was moved to .rodata. The
      penalty we pay is that now .rodata must be aligned to the size of
      the base table (512B alignment). Still, this is better than putting
      the base table with the higher level tables in the xlat_table
      section, as that would cost us a full 4KB page.
      
      Changing the tables from read-write to read-only cannot be done with
      the MMU on, as the break-before-make sequence would invalidate the
      descriptor which resolves the level 3 page table where that very
      descriptor is located. This would make the translation required for
      writing the changes impossible, generating an MMU fault.
      
      The caches are also flushed.
      Signed-off-by: default avatarPetre-Ionut Tudor <petre-ionut.tudor@arm.com>
      Change-Id: Ibe5de307e6dc94c67d6186139ac3973516430466
      60e8f3cf
    • Sandrine Bailleux's avatar
      plat/arm: Retrieve the right ROTPK when using the dualroot CoT · d25625ca
      Sandrine Bailleux authored
      
      
      The dualroot chain of trust involves 2 root-of-trust public keys:
      - The classic ROTPK.
      - The platform ROTPK (a.k.a. PROTPK).
      
      Use the cookie argument as a key ID for plat_get_rotpk_info() to return the
      appropriate one. This only applies if we are using the dualroot CoT ; if using
      the TBBR one, the behaviour is unchanged.
      
      Change-Id: I400707a87ec01afd5922b68db31d652d787f79bd
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      d25625ca
    • Sandrine Bailleux's avatar
      plat/arm: Pass cookie argument down to arm_get_rotpk_info() · 88005701
      Sandrine Bailleux authored
      
      
      The cookie will be leveraged in the next commit.
      
      Change-Id: Ie8bad275d856d84c27466461cf815529dd860446
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      88005701
    • Sandrine Bailleux's avatar
      plat/arm: Add support for dualroot CoT · 1035a706
      Sandrine Bailleux authored
      
      
      - Use the development PROTPK if using the dualroot CoT.
      
        Note that unlike the ROTPK, the PROTPK key hash file is not generated
        from the key file, instead it has to be provided. This might be
        enhanced in the future.
      
      - Define a CoT build flag for the platform code to provide different
        implementations where needed.
      
      Change-Id: Iaaf25183b94e77a99a5d8d875831d90c102a97ea
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      1035a706
    • Sandrine Bailleux's avatar
      plat/arm: Provide some PROTK files for development · 32e26c06
      Sandrine Bailleux authored
      
      
      When using the new dualroot chain of trust, a new root of trust key is
      needed to authenticate the images belonging to the platform owner.
      Provide a development one to deploy this on Arm platforms.
      
      Change-Id: I481145e09aa564822d474cb47d38ec211dd24efd
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      32e26c06
  17. 19 Feb, 2020 2 commits