1. 30 Jul, 2020 1 commit
    • Andre Przywara's avatar
      arm_fpga: Support uploading a custom command line · fa30f73b
      Andre Przywara authored
      
      
      The command line for BL33 payloads is typically taken from the DTB. On
      "normal" systems the bootloader will put the right version in there, but
      we typically don't use one on the FPGAs.
      To avoid editing (and possibly re-packaging) the DTB for every change in
      the command line, try to read it from some "magic" memory location
      instead. It can be easily placed there by the tool that uploads the
      other payloads to the FPGA's memory. BL31 will then replace the existing
      command line in the DTB with that new string.
      
      To avoid reading garbage, check the memory location for containing a
      magic value. This is conveniently chosen to be a simple ASCII string, so
      it can just preceed the actual command line in a text file:
      --------------------------------
      CMD:console=ttyAMA0,38400n8 debug loglevel=8
      --------------------------------
      
      Change-Id: I5923a80332c9fac3b4afd1a6aaa321233d0f60da
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      fa30f73b
  2. 09 Jul, 2020 2 commits
  3. 09 Jun, 2020 1 commit
    • Andre Przywara's avatar
      GICv3: GIC-600: Detect GIC-600 at runtime · b4ad365a
      Andre Przywara authored
      
      
      The only difference between GIC-500 and GIC-600 relevant to TF-A is the
      differing power management sequence.
      A certain GIC implementation is detectable at runtime, for instance by
      checking the IIDR register. Let's add that test before initiating the
      GIC-600 specific sequence, so the code can be used on both GIC-600 and
      GIC-500 chips alike, without deciding on a GIC chip at compile time.
      
      This means that the GIC-500 "driver" is now redundant. To allow minimal
      platform support, add a switch to disable GIC-600 support.
      
      Change-Id: I17ea97d9fb05874772ebaa13e6678b4ba3415557
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      b4ad365a
  4. 01 Jun, 2020 1 commit
  5. 05 May, 2020 2 commits
    • Andre Przywara's avatar
      arm_fpga: Read generic timer counter frequency from DT · 670c66af
      Andre Przywara authored
      
      
      The ARM Generic Timer DT binding describes an (optional) property to
      declare the counter frequency. Its usage is normally discouraged, as the
      value should be read from the CNTFRQ_EL0 system register.
      
      However in our case we can use it to program this register in the first
      place, which avoids us to hard code a counter frequency into the code.
      We keep some default value in, if the DT lacks that property for
      whatever reason.
      
      Change-Id: I5b71176db413f904f21eb16f3302fbb799cb0305
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      670c66af
    • Andre Przywara's avatar
      arm_fpga: Use Generic UART · 93bb7a0a
      Andre Przywara authored
      
      
      The SCP firmware on the ARM FPGA initialises the UART already. This allows
      us to treat the PL011 as an SBSA Generic UART, which does not require
      any further setup.
      
      This in particular removes the need for any baudrate and base clock related
      settings to be hard coded into the BL31 image.
      
      Change-Id: I16fc943526267356b97166a7068459e06ff77f0f
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      93bb7a0a
  6. 03 Apr, 2020 1 commit
  7. 26 Mar, 2020 4 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 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: 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