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. 24 Jul, 2020 1 commit
  3. 05 May, 2020 1 commit
    • 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
  4. 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
  5. 26 Mar, 2020 4 commits
    • 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: 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