1. 26 Oct, 2018 1 commit
    • Antonio Nino Diaz's avatar
      xlat: Fix compatibility between v1 and v2 · 03987d01
      Antonio Nino Diaz authored
      
      
      There are several platforms using arm_setup_page_tables(), which is
      supposed to be Arm platform only. This creates several dependency
      problems between platforms.
      
      This patch adds the definition XLAT_TABLES_LIB_V2 to the xlat tables lib
      v2 makefile. This way it is possible to detect from C code which version
      is being used and include the correct header.
      
      The file arm_xlat_tables.h has been renamed to xlat_tables_compat.h and
      moved to a common folder. This way, when in doubt, this header can be
      used to guarantee compatibility, as it includes the correct header based
      on XLAT_TABLES_LIB_V2.
      
      This patch also removes the usage of ARM_XLAT_TABLES_V1 from QEMU (so
      that is now locked in xlat lib v2) and ZynqMP (where it was added as a
      workaround).
      
      Change-Id: Ie1e22a23b44c549603d1402a237a70d0120d3e04
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      03987d01
  2. 25 Oct, 2018 1 commit
    • Antonio Nino Diaz's avatar
      plat/arm: Make crash console functions strong · c02c69f8
      Antonio Nino Diaz authored
      
      
      In Arm platforms the crash console doesn't print anything if the crash
      happens early enough. This happens in all images, not only BL1. The
      reason is that they the files ``plat/common/aarch64/platform_helpers.S``
      and ``plat/arm/common/aarch64/arm_helpers.S``, and the crash console
      functions are defined as weak in both files. In practice, the linker
      can pick the one in ``plat/common``, which simply switches the multi
      console to crash mode when it wants to initialize the crash console.
      In the case of Arm platforms, there are no console drivers registered
      at that point, so nothing is printed.
      
      This patch makes the functions in plat/arm strong so that they override
      the weak functions in plat/common.
      
      Change-Id: Id358db7d2567d7df0951790a695636cf6c9ac57f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      c02c69f8
  3. 23 Oct, 2018 1 commit
    • Antonio Nino Diaz's avatar
      tzc: Fix MISRA defects · af6491f8
      Antonio Nino Diaz authored
      
      
      The definitions FAIL_CONTROL_*_SHIFT were incorrect, they have been
      fixed.
      
      The types tzc_region_attributes_t and tzc_action_t have been removed and
      replaced by unsigned int because it is not allowed to do logical
      operations on enums.
      
      Also, fix some address definitions in arm_def.h.
      
      Change-Id: Id37941d76883f9fe5045a5f0a4224c133c504d8b
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      af6491f8
  4. 11 Oct, 2018 1 commit
  5. 10 Oct, 2018 2 commits
    • John Tsichritzis's avatar
      Replace S-EL3 references by EL3 · a6238326
      John Tsichritzis authored
      
      
      The "Secure" prefix (S-ELx) is valid only for S-EL0 and S-EL1 but is
      meaningless for EL3, since EL3 is always secure. Hence, the "S" prefix
      has been removed from wherever it was used as "S-EL3".
      
      Change-Id: Icdeac9506d763f9f83d7297c7113aec7b85e9dbe
      Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
      a6238326
    • Antonio Nino Diaz's avatar
      plat/arm: Move norflash driver to drivers/ folder · aa7877c4
      Antonio Nino Diaz authored
      
      
      This way it can be reused by other platforms if needed.
      
      Note that this driver is designed to work with the Versatile Express NOR
      flash of Juno and FVP. In said platforms, the memory is organized as an
      interleaved memory of two chips with a 16 bit word.
      
      Any platform that wishes to reuse it with a different configuration will
      need to modify the driver so that it is more generic.
      
      Change-Id: Ic721758425864e0cf42b7b9b04bf0d9513b6022e
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      aa7877c4
  6. 09 Oct, 2018 1 commit
  7. 03 Oct, 2018 4 commits
  8. 28 Sep, 2018 1 commit
  9. 21 Sep, 2018 2 commits
  10. 18 Sep, 2018 1 commit
  11. 07 Sep, 2018 4 commits
    • Sathees Balya's avatar
      juno: Revert FWU update detect mechanism · 4da6f6cd
      Sathees Balya authored
      The patch 7b56928a
      
       unified the FWU mechanism on FVP and Juno
      platforms due to issues with MCC firmware not preserving the
      NVFLAGS. With MCCv150 firmware, this issue is resolved. Also
      writing to the NOR flash while executing from the same flash
      in Bypass mode had some stability issues. Hence, since the
      MCC firmware issue is resolved, this patch reverts to the
      NVFLAGS mechanism to detect FWU. Also, with the introduction
      of SDS (Shared Data Structure) by the SCP, the reset syndrome
      needs to queried from the appropriate SDS field.
      
      Change-Id: If9c08f1afaaa4fcf197f3186887068103855f554
      Signed-off-by: default avatarSathees Balya <sathees.balya@arm.com>
      Signed-off-by: default avatarSoby Mathew <Soby.Mathew@arm.com>
      4da6f6cd
    • John Tsichritzis's avatar
      Add cache flush after BL1 writes heap info to DTB · 63cc2658
      John Tsichritzis authored
      
      
      A cache flush is added in BL1, in Mbed TLS shared heap code. Thus, we
      ensure that the heap info written to the DTB always gets written back to
      memory.  Hence, sharing this info with other images is guaranteed.
      
      Change-Id: I0faada31fe7a83854cd5e2cf277ba519e3f050d5
      Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
      63cc2658
    • John Tsichritzis's avatar
      Additional runtime check for DTB presence in BL2 · a606031e
      John Tsichritzis authored
      
      
      In Mbed TLS shared heap code, an additional sanity check is introduced
      in BL2. Currently, when BL2 shares heap with BL1, it expects the heap
      info to be found in the DTB. If for any reason the DTB is missing, BL2
      cannot have the heap address and, hence, Mbed TLS cannot proceed. So,
      BL2 cannot continue executing and it will eventually crash.  With this
      change we ensure that if the DTB is missing BL2 will panic() instead of
      having an unpredictable crash.
      
      Change-Id: I3045ae43e54b7fe53f23e7c2d4d00e3477b6a446
      Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
      a606031e
    • John Tsichritzis's avatar
      Slight improvements in Mbed TLS shared heap helpers · 7af2dd2e
      John Tsichritzis authored
      
      
      This patch, firstly, makes the error messages consistent to how printed
      strings are usually formatted. Secondly, it removes an unnecessary #if
      directive.
      
      Change-Id: Idbb8ef0070562634766b683ac65f8160c9d109e6
      Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
      7af2dd2e
  12. 04 Sep, 2018 1 commit
    • John Tsichritzis's avatar
      Support shared Mbed TLS heap for FVP · ba597da7
      John Tsichritzis authored
      
      
      This patch introduces the shared Mbed TLS heap optimisation for Arm
      platforms. The objective is the Mbed TLS heap to be shared between BL1
      and BL2 so as to not allocate the heap memory twice. To achieve that,
      the patch introduces all the necessary helpers for implementing this
      optimisation. It also applies it for FVP.
      
      Change-Id: I6d85eaa1361517b7490956b2ac50f5fa0d0bb008
      Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
      ba597da7
  13. 30 Aug, 2018 2 commits
  14. 23 Aug, 2018 1 commit
  15. 20 Aug, 2018 1 commit
  16. 10 Aug, 2018 1 commit
  17. 06 Aug, 2018 1 commit
  18. 03 Aug, 2018 2 commits
  19. 01 Aug, 2018 1 commit
    • Daniel Boulby's avatar
      Fix build for SEPARATE_CODE_AND_RODATA=0 · 2ecaafd2
      Daniel Boulby authored
      
      
      TF won't build since no memory region is specified
      for when SEPARATE_CODE_AND_RODATA=0 it still relies on
      the ARM_MAP_BL_RO_DATA region which is never defined for
      this case. Create memory region combining code and RO data for
      when the build flag SEPARATE_CODE_AND_RODATA=0 to fix this
      
      Change-Id: I6c129eb0833497710cce55e76b8908ce03e0a638
      Signed-off-by: default avatarDaniel Boulby <daniel.boulby@arm.com>
      2ecaafd2
  20. 26 Jul, 2018 1 commit
  21. 24 Jul, 2018 3 commits
  22. 12 Jul, 2018 1 commit
  23. 11 Jul, 2018 2 commits
  24. 26 Jun, 2018 1 commit
  25. 21 Jun, 2018 1 commit
  26. 20 Jun, 2018 1 commit
    • Soby Mathew's avatar
      ARM Platforms: Update CNTFRQ register in CNTCTLBase frame · 342d6220
      Soby Mathew authored
      
      
      Currently TF-A doesn't initialise CNTFRQ register in CNTCTLBase
      frame of the system timer. ARM ARM states that "The instance of
      the register in the CNTCTLBase frame must be programmed with this
      value as part of system initialization."
      
      The psci_arch_setup() updates the CNTFRQ system register but
      according to the ARM ARM, this instance of the register is
      independent of the memory mapped instance. This is only an issue
      for Normal world software which relies on the memory mapped
      instance rather than the system register one.
      
      This patch resolves the issue for ARM platforms.
      
      The patch also solves a related issue on Juno, wherein
      CNTBaseN.CNTFRQ can be written and does not reflect the value of
      the register in CNTCTLBase frame. Hence this patch additionally
      updates CNTFRQ register in the Non Secure frame of the CNTBaseN.
      
      Fixes ARM-Software/tf-issues#593
      
      Change-Id: I09cebb6633688b34d5b1bc349fbde4751025b350
      Signed-off-by: default avatarSoby Mathew <soby.mathew@arm.com>
      342d6220
  27. 19 Jun, 2018 1 commit
    • Antonio Nino Diaz's avatar
      plat/arm: Migrate AArch64 port to the multi console driver · 88a0523e
      Antonio Nino Diaz authored
      
      
      The old API is deprecated and will eventually be removed.
      
      Arm platforms now use the multi console driver for boot and runtime
      consoles. However, the crash console uses the direct console API because
      it doesn't need any memory access to work. This makes it more robust
      during crashes.
      
      The AArch32 port of the Trusted Firmware doesn't support this new API
      yet, so it is only enabled in AArch64 builds. Because of this, the
      common code must maintain compatibility with both systems. SP_MIN
      doesn't have to be updated because it's only used in AArch32 builds.
      The TSP is only used in AArch64, so it only needs to support the new
      API without keeping support for the old one.
      
      Special care must be taken because of PSCI_SYSTEM_SUSPEND. In Juno, this
      causes the UARTs to reset (except for the one used by the TSP). This
      means that they must be unregistered when suspending and re-registered
      when resuming. This wasn't a problem with the old driver because it just
      restarted the UART, and there were no problems associated with
      registering and unregistering consoles.
      
      The size reserved for BL2 has been increased.
      
      Change-Id: Icefd117dd1eb9c498921181a21318c2d2435c441
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      88a0523e