1. 19 Jan, 2021 4 commits
  2. 13 Jan, 2021 1 commit
    • Masahisa Kojima's avatar
      qemu/qemu_sbsa: enable secure variable storage · 74c87a4b
      Masahisa Kojima authored
      
      
      This implements support for UEFI secure variable storage
      using standalone MM framework on qemu_sbsa platform.
      
      Non-secure shared memory between UEFI and standalone MM
      is allocated at the top of DRAM.
      DRAM size of qemu_sbsa varies depends on the QEMU parameter,
      so the non-secure shared memory is allocated by trusted firmware
      and passed the base address and size to UEFI through device tree
      "/reserved-memory" node.
      
      Change-Id: I367191f408eb9850b7ec7761ee346b014c539767
      Signed-off-by: default avatarMasahisa Kojima <masahisa.kojima@linaro.org>
      74c87a4b
  3. 01 Dec, 2020 1 commit
  4. 20 Nov, 2020 1 commit
  5. 21 Oct, 2020 1 commit
    • Tomas Pilar's avatar
      plat/qemu_sbsa: Remove cortex_a53 and aem_generic · d1ff30d7
      Tomas Pilar authored
      
      
      The qemu_sbsa platform uses 42bit address size but
      the cortex-a53 only supports 40bit addressing, the
      cpu is incompatible with the platform.
      
      The aem_generic is also not used with qemu_sbsa, in
      fact, the platform currently only properly supports
      the cortex-a57 cpu.
      
      Change-Id: I91c92533116f1c3451d01ca99824e91d3d58df14
      Signed-off-by: default avatarTomas Pilar <tomas@nuviateam.com>
      d1ff30d7
  6. 09 Oct, 2020 1 commit
    • Jimmy Brisson's avatar
      Don't return error information from console_flush · 831b0e98
      Jimmy Brisson authored
      
      
      And from crash_console_flush.
      
      We ignore the error information return by console_flush in _every_
      place where we call it, and casting the return type to void does not
      work around the MISRA violation that this causes. Instead, we collect
      the error information from the driver (to avoid changing that API), and
      don't return it to the caller.
      
      Change-Id: I1e35afe01764d5c8f0efd04f8949d333ffb688c1
      Signed-off-by: default avatarJimmy Brisson <jimmy.brisson@arm.com>
      831b0e98
  7. 07 Sep, 2020 1 commit
    • Manish V Badarkhe's avatar
      plat: Fix build issue for qemu and rpi3 platforms · dad2934c
      Manish V Badarkhe authored
      
      
      Coverity build periodically throws below errors(non-consistently)
      for 'QEMU' and 'RPI3' platforms.
      
      /bin/sh: 1: cannot create build/qemu/debug/rot_key.pem: Directory
      nonexistent
      plat/qemu/qemu/platform.mk:86: recipe for target 'build/qemu/debug/
      rot_key.pem' failed
      make: *** [build/qemu/debug/rot_key.pem] Error 2
      
      /bin/sh: 1: cannot create /work/workspace/workspace/tf-coverity/build
      /rpi3/debug/rot_key.pem: Directory nonexistent
      plat/rpi/rpi3/platform.mk:214: recipe for target '/work/workspace/
      workspace/tf-coverity/build/rpi3/debug/rot_key.pem' failed
      make: *** [/work/workspace/workspace/tf-coverity/build/rpi3/debug/
      rot_key.pem] Error 2
      
      Issue seems to be occurred when 'ROT key' is generated before creating
      the platform build folder(for e.g.build/qemu/debug).
      
      Changes are made to fix this issue by adding orderly dependancy of
      the platform folder for the 'ROT key' creation which ensures that
      platform folder is created before generating 'ROT key'.
      Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
      Change-Id: I20c82172dde84e4c7f2373c0bd095d353f845d38
      dad2934c
  8. 18 Aug, 2020 1 commit
  9. 03 Jun, 2020 1 commit
  10. 19 May, 2020 1 commit
  11. 30 Mar, 2020 1 commit
    • Alexei Fedorov's avatar
      TF-A GICv3 driver: Introduce makefile · a6ea06f5
      Alexei Fedorov authored
      
      
      This patch moves all GICv3 driver files into new added
      'gicv3.mk' makefile for the benefit of the generic driver
      which can evolve in the future without affecting platforms.
      The patch adds GICv3 driver configuration flags
      'GICV3_IMPL', 'GICV3_IMPL_GIC600_MULTICHIP' and
      'GICV3_OVERRIDE_DISTIF_PWR_OPS' described in
      'GICv3 driver options' section of 'build-option.rst'
      document.
      
      NOTE: Platforms with GICv3 driver need to be modified to
      include 'drivers/arm/gic/v3/gicv3.mk' in their makefiles.
      
      Change-Id: If055f6770ff20f5dee5a3c99ae7ced7cdcac5c44
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      a6ea06f5
  12. 10 Mar, 2020 1 commit
  13. 06 Mar, 2020 2 commits
  14. 25 Feb, 2020 1 commit
  15. 07 Feb, 2020 1 commit
    • Jerome Forissier's avatar
      qemu: define ARMV7_SUPPORTS_VFP · e7a54033
      Jerome Forissier authored
      Commit 8f73663b
      
       ("plat/arm: Support for Cortex A5 in FVP Versatile
      Express platform") has conditioned the enabling of the Advanced SIMD
      and floating point features to platforms that have:
      
       (ARM_ARCH_MAJOR > 7) || defined(ARMV7_SUPPORTS_VFP)
      
      QEMU does support VFP so it should set ARMV7_SUPPORTS_VFP.
      Signed-off-by: default avatarJerome Forissier <jerome@forissier.org>
      Change-Id: I3bab7c2ed04766d0628c14094557b2751f60a428
      e7a54033
  16. 29 Jan, 2020 1 commit
  17. 24 Jan, 2020 1 commit
  18. 23 Jan, 2020 2 commits
  19. 01 Oct, 2019 2 commits
    • Radoslaw Biernacki's avatar
      qemu/qemu_sbsa: Adding memory mapping for both FLASH0/FLASH1 · fa405e3b
      Radoslaw Biernacki authored
      This patch adds mapping for secure FLASH0 for qemu/virt and
      qemu/qemu_sbsa platforms. This change is targeted for sbsa but since both
      platforms share common code, changes in common defines was necessary.
      
      For qemu_sbsa, this patch adds necessary mapping in order to boot without
      semi-hosting from secure FLASH0. EFI need to stay in FLASH1 (share it with
      variables) since it need to "run in place" in non secure domain. Changes
      for this are under RFC at edk2-platforms mailing list:
      https://patches.linaro.org/patch/171327/
      
      
      (edk2-platforms/Platform/Qemu/SbsaQemu/SbsaQemu.dsc).
      
      In docs qemu/virt is described as using semi-hosting, therefore this change
      should be orthogonal to existing assumptions while giving possibility to
      store both bl1 and fip in FLASH0 at some point (additional changes required
      for that).
      Signed-off-by: default avatarRadoslaw Biernacki <radoslaw.biernacki@linaro.org>
      Change-Id: I782bc3637c91c01eaee680b3c5c408e24b4b6e28
      fa405e3b
    • Radoslaw Biernacki's avatar
      qemu/qemu_sbsa: Adding Qemu SBSA platform · 558a6f44
      Radoslaw Biernacki authored
      
      
      This patch introduces Qemu SBSA platform.
      Both platform specific files where copied from qemu/qemu with changes for
      DRAM base above 32bit and removal of ARMv7 conditional defines/code.
      Documentation is aligned to rest of SBSA patches along the series and
      planed changes in edk2-platform repo.
      
      Fixes ARM-software/tf-issues#602
      Signed-off-by: default avatarRadoslaw Biernacki <radoslaw.biernacki@linaro.org>
      Change-Id: I8ebc34eedb2268365e479ef05654b2df1b99128c
      558a6f44
  20. 18 Sep, 2019 2 commits
    • Radoslaw Biernacki's avatar
      qemu: Simplify the image size calculation · 9a006ad1
      Radoslaw Biernacki authored
      
      
      Patch introduce the macro NS_IMAGE_MAX_SIZE to simplify the image size
      calculation. Use of additional parenthesis removes the possibility of
      improper calculations due nested macro expansion for subtraction.
      In case of platforms with DRAM window over 32bits, patch also removes
      potential problems with type casting, as meminfo.image_size is uint32_t
      but macro calculations were done in 64bit space.
      Signed-off-by: default avatarRadoslaw Biernacki <radoslaw.biernacki@linaro.org>
      Change-Id: I2d05a2d9dd6000dba6114df53262995cf85af018
      9a006ad1
    • Radoslaw Biernacki's avatar
      qemu: introducing sub-platforms to qemu platform · 301d27d9
      Radoslaw Biernacki authored
      
      
      This commit change the plat/qemu directory structure into:
      
      `-- plat
          `-- qemu
              |-- common    (files shared with all qemu subplatforms)
              |-- qemu      (original qemu platform)
              |-- qemu_sbsa (new sqemu_sbsa platform)
              |-- subplat1
              `-- subplat2
      
      This opens the possibility of adding new qemu sub-platforms which reuse
      existing common platform code. The first platform which will leverage new
      structure will be SBSA platform.
      Signed-off-by: default avatarRadoslaw Biernacki <radoslaw.biernacki@linaro.org>
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      Change-Id: Id0d8133e1fffc1b574b69aa2770ebc02bb837a9b
      301d27d9
  21. 13 Sep, 2019 1 commit
    • Andre Przywara's avatar
      qemu: Move and generalise FDT PSCI fixup · f240728b
      Andre Przywara authored
      
      
      The QEMU platform port scans its device tree to advertise PSCI as the
      CPU enable method. It does this by scanning *every* node in the DT and
      check whether its compatible string starts with "arm,cortex-a". Then it
      sets the enable-method to PSCI, if it doesn't already have one.
      
      Other platforms might want to use this functionality as well, so let's
      move it out of the QEMU platform directory and make it more robust by
      fixing some shortcomings:
      - A compatible string starting with a certain prefix is not a good way
      to find the CPU nodes. For instance a "arm,cortex-a72-pmu" node will
      match as well and is in turn favoured with an enable-method.
      - If the DT already has an enable-method, we won't change this to PSCI.
      
      Those two issues will for instance fail on the Raspberry Pi 4 DT.
      To fix those problems, we adjust the scanning method:
      The DT spec says that all CPU nodes are subnodes of the mandatory
      /cpus node, which is a subnode of the root node. Also each CPU node has
      to have a device_type = "cpu" property. So we find the /cpus node, then
      scan for a subnode with the proper device_type, forcing the
      enable-method to "psci".
      We have to restart this search after a property has been patched, as the
      node offsets might have changed meanwhile.
      
      This allows this routine to be reused for the Raspberry Pi 4 later.
      
      Change-Id: I00cae16cc923d9f8bb96a9b2a2933b9a79b06139
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      f240728b
  22. 01 Aug, 2019 1 commit
    • Julius Werner's avatar
      Switch AARCH32/AARCH64 to __aarch64__ · 402b3cf8
      Julius Werner authored
      
      
      NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.
      
      All common C compilers pre-define the same macros to signal which
      architecture the code is being compiled for: __arm__ for AArch32 (or
      earlier versions) and __aarch64__ for AArch64. There's no need for TF-A
      to define its own custom macros for this. In order to unify code with
      the export headers (which use __aarch64__ to avoid another dependency),
      let's deprecate the AARCH32 and AARCH64 macros and switch the code base
      over to the pre-defined standard macro. (Since it is somewhat
      unintuitive that __arm__ only means AArch32, let's standardize on only
      using __aarch64__.)
      
      Change-Id: Ic77de4b052297d77f38fc95f95f65a8ee70cf200
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      402b3cf8
  23. 26 Jul, 2019 2 commits
  24. 28 Jun, 2019 2 commits
  25. 12 Apr, 2019 1 commit
    • Ambroise Vincent's avatar
      Mbed TLS: Remove weak heap implementation · 2374ab17
      Ambroise Vincent authored
      
      
      The implementation of the heap function plat_get_mbedtls_heap() becomes
      mandatory for platforms supporting TRUSTED_BOARD_BOOT.
      
      The shared Mbed TLS heap default weak function implementation is
      converted to a helper function get_mbedtls_heap_helper() which can be
      used by the platforms for their own function implementation.
      
      Change-Id: Ic8f2994e25e3d9fcd371a21ac459fdcafe07433e
      Signed-off-by: default avatarAmbroise Vincent <ambroise.vincent@arm.com>
      2374ab17
  26. 03 Apr, 2019 1 commit
  27. 01 Feb, 2019 2 commits
  28. 15 Jan, 2019 1 commit
  29. 04 Jan, 2019 1 commit
    • Antonio Nino Diaz's avatar
      Sanitise includes across codebase · 09d40e0e
      Antonio Nino Diaz authored
      Enforce full include path for includes. Deprecate old paths.
      
      The following folders inside include/lib have been left unchanged:
      
      - include/lib/cpus/${ARCH}
      - include/lib/el3_runtime/${ARCH}
      
      The reason for this change is that having a global namespace for
      includes isn't a good idea. It defeats one of the advantages of having
      folders and it introduces problems that are sometimes subtle (because
      you may not know the header you are actually including if there are two
      of them).
      
      For example, this patch had to be created because two headers were
      called the same way: e0ea0928 ("Fix gpio includes of mt8173 platform
      to avoid collision."). More recently, this patch has had similar
      problems: 46f9b2c3 ("drivers: add tzc380 support").
      
      This problem was introduced in commit 4ecca339
      
       ("Move include and
      source files to logical locations"). At that time, there weren't too
      many headers so it wasn't a real issue. However, time has shown that
      this creates problems.
      
      Platforms that want to preserve the way they include headers may add the
      removed paths to PLAT_INCLUDES, but this is discouraged.
      
      Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      09d40e0e
  30. 08 Nov, 2018 1 commit
    • Antonio Nino Diaz's avatar
      Standardise header guards across codebase · c3cf06f1
      Antonio Nino Diaz authored
      
      
      All identifiers, regardless of use, that start with two underscores are
      reserved. This means they can't be used in header guards.
      
      The style that this project is now to use the full name of the file in
      capital letters followed by 'H'. For example, for a file called
      "uart_example.h", the header guard is UART_EXAMPLE_H.
      
      The exceptions are files that are imported from other projects:
      
      - CryptoCell driver
      - dt-bindings folders
      - zlib headers
      
      Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      c3cf06f1