1. 22 Jun, 2021 1 commit
  2. 04 Jun, 2021 4 commits
    • Yann Gautier's avatar
      fix(io_stm32image): invalidate cache on local buf · a5bcf824
      Yann Gautier authored
      
      
      When retrieving data from stm32 image file, the header is removed with
      a memcpy that shifts the data to overwrite the useless header for next
      binary.
      
      STM32 binary from boot device:
      |-------------------------------------|
      | header | payload                    |
      |-------------------------------------|
      
      After the memcpy:
      |-------------------------------------|
      | payload                    | remain |
      |-------------------------------------|
      
      But the remaining data after the shifted payload is still in
      the cache. As it is of no use for anyone, just invalidate the cache
      at this address.
      This is required if the DDR is mapped secure in BL2, and the secure
      access is forbidden in BL33, or else TZC-400 issues an error.
      
      Change-Id: Ice2af3b1ca49eccb79bfc62db60437e259d344ca
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      a5bcf824
    • Yann Gautier's avatar
      refactor(io_stm32image): add header size variable · b6561c12
      Yann Gautier authored
      
      
      A variable hdr_sz is created in stm32image_partition_read() function.
      It just represents the size of the stm32 image header but it really
      improves the readability of the function.
      
      Change-Id: I95ec62a78a4b6c6a75b0d8c8aa0faef8bee424da
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      b6561c12
    • Nicolas Le Bayon's avatar
      fix(io_stm32image): uninitialized variable warning · c1d732d0
      Nicolas Le Bayon authored
      
      
      Fixes implementation against build warning reported by GCC:
      
      drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
      drivers/st/io/io_stm32image.c:249:6: error: ‘result’ may be used
      uninitialized in this function [-Werror=maybe-uninitialized]
        int result;
            ^~~~~~
      
      Actually, by construction the current implementation of function
      stm32image_partition_read() does not mandate result to be initialized
      since it always reaches the exit point with a valid value in 'result'.
      Yet, this change prevents compiler from complaining and is more robust
      against future changes in the implementation.
      
      Change-Id: I383575edb605b7535398952a5fdfc266c0068c71
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      Signed-off-by: default avatarNicolas Le Bayon <nicolas.le.bayon@st.com>
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      c1d732d0
    • Vyacheslav Yurkov's avatar
      feat(drivers/st): manage boot part in io_mmc · f3d2750a
      Vyacheslav Yurkov authored
      
      
      Use dedicated read function for boot partition
      Signed-off-by: default avatarVyacheslav Yurkov <uvv.mail@gmail.com>
      Change-Id: If75df7691fce0797205365736fc6e4e3429efdca
      f3d2750a
  3. 11 Feb, 2021 1 commit
  4. 20 Jan, 2021 1 commit
  5. 13 Oct, 2020 1 commit
  6. 12 Oct, 2020 2 commits
  7. 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
  8. 08 Oct, 2020 1 commit
  9. 24 Sep, 2020 5 commits
  10. 08 Jul, 2020 5 commits
  11. 17 Jun, 2020 4 commits
  12. 03 Jun, 2020 1 commit
  13. 01 Jun, 2020 1 commit
    • Etienne Carriere's avatar
      drivers: stm32_reset adapt interface to timeout argument · 45c70e68
      Etienne Carriere authored
      
      
      Changes stm32mp1 reset driver to API to add a timeout argument
      to stm32mp_reset_assert() and stm32mp_reset_deassert() and
      a return value.
      
      With a supplied timeout, the functions wait the target reset state
      is reached before returning. With a timeout of zero, the functions
      simply load target reset state in SoC interface and return without
      waiting.
      
      Helper functions stm32mp_reset_set() and stm32mp_reset_release()
      use a zero timeout and return without a return code.
      
      This change updates few stm32 drivers and plat/stm32mp1 blé_plat_setup.c
      accordingly without any functional change.
      functional change.
      
      Change-Id: Ia1a73a15125d3055fd8739c125b70bcb9562c27f
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      45c70e68
  14. 11 May, 2020 6 commits
  15. 05 May, 2020 1 commit
    • Andre Przywara's avatar
      plat/stm32: Use generic fdt_get_reg_props_by_name() · 7ad6d362
      Andre Przywara authored
      
      
      The STM32 platform port parse DT nodes to find base address to
      peripherals. It does this by using its own implementation, even though
      this functionality is generic and actually widely useful outside of the
      STM32 code.
      
      Re-implement fdt_get_reg_props_by_name() on top of the newly introduced
      fdt_get_reg_props_by_index() function, and move it to fdt_wrapper.c.
      This is removes the assumption that #address-cells and #size-cells are
      always one.
      
      Change-Id: I6d584930262c732b6e0356d98aea50b2654f789d
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      7ad6d362
  16. 29 Apr, 2020 1 commit
    • Andre Przywara's avatar
      plat/stm32: Implement fdt_read_uint32_default() as a wrapper · be858cff
      Andre Przywara authored
      
      
      The STM32 platform code uses its own set of FDT helper functions,
      although some of them are fairly generic.
      
      Remove the implementation of fdt_read_uint32_default() and implement it
      on top of the newly introduced fdt_read_uint32() function, then convert
      all users over.
      
      This also fixes two callers, which were slightly abusing the "default"
      semantic.
      
      Change-Id: I570533362b4846e58dd797a92347de3e0e5abb75
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      be858cff
  17. 28 Apr, 2020 1 commit
    • Andre Przywara's avatar
      plat/stm32: Use generic fdt_read_uint32_array() implementation · 52a616b4
      Andre Przywara authored
      
      
      The device tree parsing code for the STM32 platform is using its own FDT
      helper functions, some of them being rather generic.
      In particular the existing fdt_read_uint32_array() implementation is now
      almost identical to the new generic code in fdt_wrappers.c, so we can
      remove the ST specific version and adjust the existing callers.
      
      Compared to the original ST implementation the new version takes a
      pointer to the DTB as the first argument, and also swaps the order of
      the number of cells and the pointer.
      
      Change-Id: Id06b0f1ba4db1ad1f733be40e82c34f46638551a
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      52a616b4
  18. 26 Mar, 2020 1 commit
    • Yann Gautier's avatar
      stm32mp1: dynamically map DDR later and non-cacheable during its test · 84686ba3
      Yann Gautier authored
      
      
      A speculative accesses to DDR could be done whereas it was not reachable
      and could lead to bus stall.
      To correct this the dynamic mapping in MMU is used.
      A first mapping is done for DDR tests with MT_NON_CACHEABLE attribute,
      once DDR access is setup. It is then unmapped and a new mapping DDR is done
      with cacheable attribute (through MT_MEMORY) to speed-up BL33 (or OP-TEE)
      load.
      
      The disabling of cache during DDR tests is also removed, as now useless.
      A call to new functions stm32mp_{,un}map_ddr_non_cacheable() is done
      instead.
      
      PLAT_XLAT_TABLES_DYNAMIC is activated globally as used in BL2 and BL32.
      
      BL33 max size is also updated to take into account the secure and shared
      memory areas. Those are used in OP-TEE case.
      
      Change-Id: I22c48b4a48255ee264991c34ecbb15bfe87e67c3
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      84686ba3
  19. 23 Mar, 2020 2 commits