1. 16 Jul, 2020 1 commit
    • Etienne Carriere's avatar
      stm32mp1: SCMI clock and reset service in SP_MIN · fdaaaeb4
      Etienne Carriere authored
      
      
      This change implements platform services for stm32mp1 to expose clock
      and reset controllers over SCMI clock and reset domain protocols
      in sp_min firmware.
      
      Requests execution use a fastcall SMC context using a SiP function ID.
      The setup allows the create SCMI channels by assigning a specific
      SiP SMC function ID for each channel/agent identifier defined. In this
      change, stm32mp1 exposes a single channel and hence expects single
      agent at a time.
      
      The input payload in copied in secure memory before the message
      in passed through the SCMI server drivers. BL32/sp_min is invoked
      for a single SCMI message processing and always returns with a
      synchronous response message passed back to the caller agent.
      
      This change fixes and updates STM32_COMMON_SIP_NUM_CALLS that was
      previously wrongly set 4 whereas only 1 SiP SMC function ID was to
      be counted. STM32_COMMON_SIP_NUM_CALLS is now set to 3 since the
      2 added SiP SMC function IDs for SCMI services.
      
      Change-Id: Icb428775856b9aec00538172aea4cf11e609b033
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      fdaaaeb4
  2. 08 Jul, 2020 1 commit
    • Etienne Carriere's avatar
      stm32mp1: register shared resource per IOMEM address · 0651b5b7
      Etienne Carriere authored
      
      
      Introduce helper functions stm32mp_register_secure_periph_iomem()
      and stm32mp_register_non_secure_periph_iomem() for drivers to
      register a resource as secure or non-secure based on its SoC
      interface registers base address.
      
      These functions are stubbed when shared resources driver is not
      embedded (!STM32MP_SHARED_RESOURCES) so that drivers embedded
      in other BL stages do not bother whether they shall register or
      not their resources.
      
      Change-Id: Icebd05a930afc5964bc4677357da5d1b23666066
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      0651b5b7
  3. 23 Jun, 2020 2 commits
    • Etienne Carriere's avatar
      stm32mp1: use last page of SYSRAM as SCMI shared memory · 0754143a
      Etienne Carriere authored
      
      
      SCMI shared memory is used to exchange message payloads between
      secure SCMI services and non-secure SCMI agents. It is mapped
      uncached (device) mainly to conform to existing support in
      the Linux kernel. Note that executive messages are mostly short
      (few 32bit words) hence not using cache will not penalize much
      performances.
      
      Platform stm32mp1 shall configure ETZPC to harden properly the
      secure and non-secure areas of the SYSRAM address space, that before
      CPU accesses the shared memory when mapped non-secure.
      
      This change defines STM32MP_SEC_SYSRAM_BASE/STM32MP_SEC_SYSRAM_SIZE and
      STM32MP_NS_SYSRAM_BASE/STM32MP_NS_SYSRAM_SIZE.
      
      Change-Id: I71ff02a359b9668ae1c5a71b5f102cf3d310f289
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      0754143a
    • Etienne Carriere's avatar
      stm32mp1: shared resources: define resource identifiers · eafe0eb0
      Etienne Carriere authored
      
      
      Define enum stm32mp_shres for platform stm32mp1. The enumerated
      type defines all resources that can be assigned to secure or
      non-secure worlds at run time for the platform.
      
      Change-Id: I5de20d72735856645f1efd0993643278e8d35bcb
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      eafe0eb0
  4. 03 Jun, 2020 1 commit
  5. 26 Mar, 2020 1 commit
  6. 28 Jan, 2020 1 commit
    • Madhukar Pappireddy's avatar
      Enable -Wredundant-decls warning check · ca661a00
      Madhukar Pappireddy authored
      
      
      This flag warns if anything is declared more than once in the same
      scope, even in cases where multiple declaration is valid and changes
      nothing.
      
      Consequently, this patch also fixes the issues reported by this
      flag. Consider the following two lines of code from two different source
      files(bl_common.h and bl31_plat_setup.c):
      
      IMPORT_SYM(uintptr_t, __RO_START__, BL_CODE_BASE);
      IMPORT_SYM(unsigned long, __RO_START__, BL2_RO_BASE);
      
      The IMPORT_SYM macro which actually imports a linker symbol as a C expression.
      The macro defines the __RO_START__ as an extern variable twice, one for each
      instance. __RO_START__ symbol is defined by the linker script to mark the start
      of the Read-Only area of the memory map.
      
      Essentially, the platform code redefines the linker symbol with a different
      (relevant) name rather than using the standard symbol. A simple solution to
      fix this issue in the platform code for redundant declarations warning is
      to remove the second IMPORT_SYM and replace it with following assignment
      
      static const unsigned long BL2_RO_BASE = BL_CODE_BASE;
      
      Change-Id: If4835d1ee462d52b75e5afd2a59b64828707c5aa
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      ca661a00
  7. 20 Jan, 2020 4 commits
  8. 23 Sep, 2019 1 commit
    • Lionel Debieve's avatar
      stm32mp1: add authentication support for stm32image · 4bdb1a7a
      Lionel Debieve authored
      
      
      This commit adds authentication binary support for STM32MP1.
      It prints the bootrom authentication result if signed
      image is used and authenticates the next loaded STM32 images.
      It also enables the dynamic translation table support
      (PLAT_XLAT_TABLES_DYNAMIC) to use bootrom services.
      Signed-off-by: default avatarLionel Debieve <lionel.debieve@st.com>
      Change-Id: Iba706519e0dc6b6fae1f3dd498383351f0f75f51
      4bdb1a7a
  9. 02 Sep, 2019 4 commits
  10. 01 Aug, 2019 1 commit
    • Julius Werner's avatar
      Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__ · d5dfdeb6
      Julius Werner authored
      
      
      NOTE: __ASSEMBLY__ macro is now deprecated in favor of __ASSEMBLER__.
      
      All common C compilers predefine a macro called __ASSEMBLER__ when
      preprocessing a .S file. There is no reason for TF-A to define it's own
      __ASSEMBLY__ macro for this purpose instead. To unify code with the
      export headers (which use __ASSEMBLER__ to avoid one extra dependency),
      let's deprecate __ASSEMBLY__ and switch the code base over to the
      predefined standard.
      
      Change-Id: Id7d0ec8cf330195da80499c68562b65cb5ab7417
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      d5dfdeb6
  11. 17 Jun, 2019 3 commits
  12. 23 Apr, 2019 2 commits
    • Yann Gautier's avatar
      stm32mp1: add OP-TEE support · 1989a19c
      Yann Gautier authored
      
      
      Support booting OP-TEE as BL32 boot stage and secure runtime
      service.
      
      OP-TEE executes in internal RAM and uses a secure DDR area to store
      the pager pagestore. Memory mapping and TZC are configured accordingly
      prior OP-TEE boot. OP-TEE image is expected in OP-TEE v2 format where
      a header file describes the effective boot images. This change
      post processes header file content to get OP-TEE load addresses
      and set OP-TEE boot arguments.
      
      Change-Id: I02ef8b915e4be3e95b27029357d799d70e01cd44
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      1989a19c
    • Yann Gautier's avatar
      stm32mp1: remove useless define · 4d95beda
      Yann Gautier authored
      
      
      Remove STM32MP_DDR_SPEED_DFLT that is not used in STM32MP1 TF-A code.
      
      Change-Id: I780cdc4e93a8a9d997d50f67cfc582acd4a353d6
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      4d95beda
  13. 20 Feb, 2019 1 commit
  14. 14 Feb, 2019 6 commits
  15. 18 Jan, 2019 3 commits
  16. 07 Jan, 2019 1 commit
  17. 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
  18. 15 Oct, 2018 1 commit
  19. 24 Jul, 2018 3 commits