1. 09 Apr, 2019 1 commit
    • Paul Beesley's avatar
      services/spm: Fix service UUID lookup · 00e51ca3
      Paul Beesley authored
      The spm_sp_get_by_uuid() function is used to look up the secure
      partition that provides a given service.
      Within this function, memcmp() is used to compare the service
      UUIDs but it uses the size of the rdsvc->uuid pointer instead of
      the size of its content (missing dereference). This means that only
      a partial comparison is performed as UUIDs are 128 bits in length and
      rdsvc->uuid is a uint32_t typed pointer.
      Instead, use the size of the array pointed to by the svc_uuid parameter,
      which will be the full 128 bits, for the comparison.
      Change-Id: I258fb0cca3bf19f97b8f2a4c133981647cd050e4
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
  2. 03 Apr, 2019 4 commits
    • Ambroise Vincent's avatar
      Makefile: remove extra include paths in INCLUDES · 6e756f6d
      Ambroise Vincent authored
      Now it is needed to use the full path of the common header files.
      Commit 09d40e0e ("Sanitise includes across codebase") provides more
      Change-Id: Ifedc79d9f664d208ba565f5736612a3edd94c647
      Signed-off-by: default avatarAmbroise Vincent <ambroise.vincent@arm.com>
    • Antonio Nino Diaz's avatar
      SPM: Adjust size of virtual address space per partition · 75f364b3
      Antonio Nino Diaz authored
      Rather than using a fixed virtual address space size, read all regions
      in the resource description of each partition and restrict the virtual
      address space size to the one the partition actually needs.
      This also allows SPM to take advantage of the extension ARMv8.4-TTST if
      the virtual address space size is small enough.
      Change-Id: I8646aa95e659136b58b44b040364cdee631f7e82
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
    • Antonio Nino Diaz's avatar
      SPM: Refactor xlat context creation · 014df18b
      Antonio Nino Diaz authored
      Right now the virtual address space is fixed to
      PLAT_VIRT_ADDR_SPACE_SIZE, so all base translation tables are the same
      size and need the same alignment. The current code allocates the exact
      space needed by this initial table.
      However, a following patch is going to allow each partition to choose
      the size of its address space based on the memory regions defined in
      their resource description, so it isn't possible to determine this at
      build time. As this optimization no longer applies, it has to be
      Change-Id: Ia8d19f4981e1017e4ffe0ba136de73d701044cb0
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
    • Antonio Nino Diaz's avatar
      SPM: Move shim layer to TTBR1_EL1 · 6de6965b
      Antonio Nino Diaz authored
      This gives each Secure Partition complete freedom on its address space.
      Previously, the memory used by the exception vectors was reserved and
      couldn't be used. Also, it always had to be mapped, forcing SPM to
      generate translation tables that included the exception vectors as well
      as the Partition memory regions. With this change, partitions can reduce
      their address space size easily.
      Change-Id: I67fb5e9bdf2870b73347f23bff702fab0a8f8711
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
  3. 02 Apr, 2019 1 commit
  4. 01 Apr, 2019 3 commits
  5. 04 Mar, 2019 1 commit
  6. 27 Feb, 2019 1 commit
  7. 14 Feb, 2019 1 commit
  8. 12 Feb, 2019 2 commits
  9. 08 Feb, 2019 1 commit
    • Antonio Nino Diaz's avatar
      Make setjmp.h prototypes comply with the C standard · e0566305
      Antonio Nino Diaz authored
      Instead of having a custom implementation of setjmp() and longjmp() it
      is better to follow the C standard.
      The comments in setjmp.h are no longer needed as there are no deviations
      from the expected one, so they have been removed.
      All SDEI code that relied on them has been fixed to use the new function
      prototypes and structs.
      Change-Id: I6cd2e21cb5a5bcf81ba12283f2e4c067bd5172ca
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
  10. 06 Feb, 2019 1 commit
  11. 05 Feb, 2019 1 commit
  12. 31 Jan, 2019 3 commits
    • Stephen Wolfe's avatar
      spd: trusty: pass max affinity level to Trusty · 1ffaaec9
      Stephen Wolfe authored
      During System Suspend, the entire system loses its state. To allow Trusty
      to save/restore its context and allow its TAs to participate in the suspend
      process, it needs to look at the max affinity level being suspended. This
      patch passes the max affinity level to Trusty to enable to do so.
      Change-Id: If7838dae10c3f5a694baedb15ec56fbad41f2b36
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
    • Mihir Joshi's avatar
      spd: tlkd: remove unwanted assert on System Suspend entry · 278d599c
      Mihir Joshi authored
      c_rt_ctx is used to store current SP before the system goes
      into suspend. The assert for its value being zero is not
      really necessary as the value gets over-written eventually.
      This patch removes assert(tlk_ctx->c_rt_ctx == 0) from the
      System Suspend path, as a result.
      Change-Id: If41f15e74ebbbfd82958d8e179114899b2ffb0a7
      Signed-off-by: default avatarMihir Joshi <mihirj@nvidia.com>
    • Mihir Joshi's avatar
      tlkd: support new TLK SMCs · 7bc05f52
      Mihir Joshi authored
      This patch adds support to handle following TLK SMCs:
      These SMCs need to be supported in ATF in order to forward them to
      TLK. Otherwise, these functionalities won't work.
      TLK_SS_REGISTER_HANDLER: This SMC is issued by TLK Linux Driver to
      set up secure storage buffers.
      TLK_REGISTER_NS_DRAM_RANGES: Cboot performs this SMC during boot to
      pass NS memory ranges to TLK.
      TLK_SET_ROOT_OF_TRUST: Cboot performs this SMC during boot to pass
      Verified Boot parameters to TLK.
      Change-Id: I18af35f6dd6f510dfc22c1d1d1d07f643c7b82bc
      Reviewed-on: https://git-master.nvidia.com/r/1643851Signed-off-by: default avatarMihir Joshi <mihirj@nvidia.com>
  13. 30 Jan, 2019 1 commit
  14. 24 Jan, 2019 1 commit
  15. 23 Jan, 2019 1 commit
    • Anthony Zhou's avatar
      spd: trusty : fix defects flagged by MISRA scan · 591054a3
      Anthony Zhou authored
      Main Fixes:
      Use int32_t replace int [Rule 4.6]
      Added explicit casts (e.g. 0U) to integers in order for them to be
        compatible with whatever operation they're used in [Rule 10.1]
      Force operands of an operator to the same type category [Rule 10.4]
      Fixed if statement conditional to be essentially boolean [Rule 14.4]
      Voided non c-library functions whose return types are not used
      [Rule 17.7]
      Change-Id: I98caa330c371757eb2dfb9438448cb99115ed907
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
  16. 22 Jan, 2019 2 commits
  17. 15 Jan, 2019 3 commits
  18. 08 Jan, 2019 2 commits
  19. 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>
  20. 11 Dec, 2018 9 commits