1. 08 Jul, 2020 3 commits
    • Etienne Carriere's avatar
      stm32mp1: register shared resource per GPIO bank/pin · ec8f4212
      Etienne Carriere authored
      
      
      Introduce helper functions stm32mp_register_secure_gpio() and
      stm32mp_register_non_secure_gpio() for drivers to register a
      GPIO pin as secure or non-secure.
      
      These functions are stubbed when shared resource driver is not
      embedded in the BL image so that drivers do not bother whether they
      shall register or not their resources.
      
      Change-Id: I1fe98576c072ae31f75427c9ac5c9f6c4f1b6ed1
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      ec8f4212
    • 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
    • Etienne Carriere's avatar
      stm32mp1: shared resources: peripheral registering · 68450c94
      Etienne Carriere authored
      
      
      Define helper functions stm32mp_register_secure_periph() and
      stm32mp_register_non_secure_periph() for platform drivers to
      register a shared resource assigned to respectively secure
      or non-secure world.
      
      Some resources are related to clock resources. When a resource is
      registered as secure, ensure its clock dependencies are also
      registered as secure. Registering a non-secure resource does not
      mandate its clock dependencies are also registered as non-secure.
      
      Change-Id: I74975be8976b8d3bf18dcc807541a072803af6e3
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      68450c94
  2. 23 Jun, 2020 2 commits
    • Etienne Carriere's avatar
      stm32mp1: shared resources: apply registered configuration · 5f038ac6
      Etienne Carriere authored
      
      
      BL32/SP_MIN configures platform security hardening from the shared
      resources driver.  At the end of SP_MIN initialization, all shared
      resources shall be assigned to secure or non-secure world by
      drivers. A lock prevent from further change on the resource
      assignation. By definition, resources not registered are assign
      to non-secure world since not claimed by any component on the BL.
      
      No functional change as all resources are currently in state
      SHRES_UNREGISTERED hence assigned to non-secure world as prior
      this change in stm32mp1_etzpc_early_setup() and
      sp_min_platform_setup().
      
      Change-Id: Ic41fab47216c3b8b7a6a75b8358cfcec411ed941
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      5f038ac6
    • Etienne Carriere's avatar
      stm32mp1: introduce shared resources support · 47cf5d3f
      Etienne Carriere authored
      
      
      STM32MP1 SoC includes peripheral interfaces that can be assigned to
      the secure world, or that can be opened to the non-secure world.
      
      This change introduces the basics of a driver that manages such
      resources which assignation is done at run time. It currently offers
      API functions that state whether a service exposed to non-secure
      world has permission to access a targeted clock or reset controller.
      
      Change-Id: Iff20028f41586bc501085488c03546ffe31046d8
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      47cf5d3f