1. 18 Jun, 2021 1 commit
  2. 12 May, 2021 1 commit
  3. 21 Apr, 2021 1 commit
    • Yann Gautier's avatar
      Add PIE support for AARCH32 · 4324a14b
      Yann Gautier authored
      
      
      Only BL32 (SP_min) is supported at the moment, BL1 and BL2_AT_EL3 are just
      stubbed with _pie_fixup_size=0.
      The changes are an adaptation for AARCH32 on what has been done for
      PIE support on AARCH64.
      The RELA_SECTION is redefined for AARCH32, as the created section is
      .rel.dyn and the symbols are .rel*.
      
      Change-Id: I92bafe70e6b77735f6f890f32f2b637b98cf01b9
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      4324a14b
  4. 08 Apr, 2021 1 commit
  5. 18 Mar, 2021 1 commit
    • Chris Kay's avatar
      arch: Enable `FEAT_SB` for supported non-Armv8.5-A platforms · 4e04478a
      Chris Kay authored
      
      
      The speculation barrier feature (`FEAT_SB`) was introduced with and
      made mandatory in the Armv8.5-A extension. It was retroactively made
      optional in prior extensions, but the checks in our code-base do not
      reflect that, assuming that it is only available in Armv8.5-A or later.
      
      This change introduces the `ENABLE_FEAT_SB` definition, which derives
      support for the `sb` instruction in the assembler from the feature
      flags passed to it. Note that we assume that if this feature is enabled
      then all the cores in the system support it - enabling speculation
      barriers for only a subset of the cores is unsupported.
      Signed-off-by: default avatarChris Kay <chris.kay@arm.com>
      Change-Id: I978ed38829385b221b10ba56d49b78f4756e20ea
      4e04478a
  6. 25 Feb, 2021 1 commit
  7. 05 Feb, 2021 1 commit
  8. 15 Jan, 2021 1 commit
  9. 08 Jan, 2021 1 commit
    • Pali Rohár's avatar
      Makefile: Fix ${FIP_NAME} to be rebuilt only when needed · 4727fd13
      Pali Rohár authored
      
      
      Currently ${FIP_DEPS} as prerequisite for ${BUILD_PLAT}/${FIP_NAME}
      contains .PHONY targets check_$(1) and therefore ${BUILD_PLAT}/${FIP_NAME}
      is always rebuilt even when other file target prerequisites are not
      changed.
      
      These changes fix above issue and ${BUILD_PLAT}/${FIP_NAME} target is
      rebuilt only when its prerequisites are changed.
      
      There are 3 changes:
      
      Content of check_$(1) target is moved into check_$(1)_cmd variable so it
      can be easily reused.
      
      .PHONY check_$(1) targets are not put into ${FIP_DEPS} and ${FWU_FIP_DEPS}
      dependencies anymore and required checks which are in ${CHECK_FIP_CMD} and
      ${CHECK_FWU_FIP_CMD} variables are executed as part of targets
      ${BUILD_PLAT}/${FIP_NAME} and ${BUILD_PLAT}/${FWU_FIP_NAME} itself.
      
      To ensure that ${BUILD_PLAT}/${FIP_NAME} and ${BUILD_PLAT}/${FWU_FIP_NAME}
      are rebuilt even when additional dependency file image added by
      TOOL_ADD_IMG is changed, this file image (if exists) is added as file
      dependency to ${FIP_DEPS} and ${FWU_FIP_DEPS}. If it does not exist then
      FORCE target is added to ensure that FIP/FWU_FIP is rebuilt. Command
      ${CHECK_FIP_CMD}/${CHECK_FWU_FIP_CMD} will then thrown an error message if
      the file is required but not present.
      
      So this change ensures that if BL33 image is updated then final FIP image
      is updated too. And if BL33 image is not specified or does not exist and is
      required to be present then check_$(1)_cmd call from ${CHECK_FIP_CMD} would
      ensure that error message is thrown during build.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I635cf82e2b667ff57e2af83500d4aca71d235e3e
      4727fd13
  10. 07 Jan, 2021 1 commit
    • Pali Rohár's avatar
      Makefile: Do not mark file targets as .PHONY target · a9812206
      Pali Rohár authored
      
      
      Only non-file targets should be set a .PHONY. Otherwise if file target is
      set as .PHONY then targets which depends on those file .PHONY targets would
      be always rebuilt even when their prerequisites are not changed.
      
      File target which needs to be always rebuilt can be specified in Make
      system via having a prerequisite on some .PHONY target, instead of marking
      whole target as .PHONY. In Makefile projects it is common to create empty
      .PHONY target named FORCE for this purpose.
      
      This patch changes all file targets which are set as .PHONY to depends on
      new .PHONY target FORCE, to ensure that these file targets are always
      rebuilt (as before). Basically they are those targets which calls external
      make subprocess.
      
      After FORCE target is specified in main Makefile, remove it from other
      Makefile files to prevent duplicate definitions.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: Iee3b4e0de93879b95eb29a1745a041538412e69e
      a9812206
  11. 11 Dec, 2020 1 commit
    • Javier Almansa Sobrino's avatar
      Add support for FEAT_MTPMU for Armv8.6 · 0063dd17
      Javier Almansa Sobrino authored
      
      
      If FEAT_PMUv3 is implemented and PMEVTYPER<n>(_EL0).MT bit is implemented
      as well, it is possible to control whether PMU counters take into account
      events happening on other threads.
      
      If FEAT_MTPMU is implemented, EL3 (or EL2) can override the MT bit
      leaving it to effective state of 0 regardless of any write to it.
      
      This patch introduces the DISABLE_MTPMU flag, which allows to diable
      multithread event count from EL3 (or EL2). The flag is disabled
      by default so the behavior is consistent with those architectures
      that do not implement FEAT_MTPMU.
      Signed-off-by: default avatarJavier Almansa Sobrino <javier.almansasobrino@arm.com>
      Change-Id: Iee3a8470ae8ba13316af1bd40c8d4aa86e0cb85e
      0063dd17
  12. 10 Dec, 2020 1 commit
  13. 17 Nov, 2020 1 commit
  14. 20 Oct, 2020 1 commit
  15. 12 Oct, 2020 2 commits
  16. 14 Sep, 2020 2 commits
  17. 23 Aug, 2020 1 commit
  18. 17 Aug, 2020 1 commit
  19. 14 Aug, 2020 1 commit
    • Ruari Phipps's avatar
      SPM: Alter sp_gen.mk entry depending on owner of partition · 1e7528ec
      Ruari Phipps authored
      
      
      With recently introduced dualroot CoT for SPs where they are owned
      either by SiP or by Platform. SiP owned SPs index starts at SP_PKG1_ID
      while Plat owned SPs index starts at SP_PKG5_ID.
      
      This patch modifies SP makefile generator script to take CoT as an
      argument and if it is "dualroot" then generates SP_PKG in order
      mentioned above, otherwise generates it sequentially.
      Signed-off-by: default avatarRuari Phipps <ruari.phipps@arm.com>
      Change-Id: Iffad1131787be650a9462f6f8cc09b603cddb3b8
      1e7528ec
  20. 04 Aug, 2020 1 commit
    • Grant Likely's avatar
      Use abspath to dereference $BUILD_BASE · 29214e95
      Grant Likely authored
      
      
      If the user tries to change BUILD_BASE to put the build products outside
      the build tree the compile will fail due to hard coded assumptions that
      $BUILD_BASE is a relative path. Fix by using $(abspath $(BUILD_BASE))
      to rationalize to an absolute path every time and remove the relative
      path assumptions.
      
      This patch also adds documentation that BUILD_BASE can be specified by
      the user.
      Signed-off-by: default avatarGrant Likely <grant.likely@arm.com>
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      Change-Id: Ib1af874de658484aaffc672f30029b852d2489c8
      29214e95
  21. 30 Jul, 2020 2 commits
  22. 09 Jul, 2020 1 commit
  23. 29 Jun, 2020 1 commit
    • Sami Mujawar's avatar
      Fix makefile to build on a Windows host PC · 4a565bd8
      Sami Mujawar authored
      
      
      The TF-A firmware build system is capable of building on both Unix like
      and Windows host PCs. The commit ID 7ff088 "Enable MTE support" updated
      the Makefile to conditionally enable the MTE support if the AArch64
      architecture revision was greater than 8.5. However, the Makefile changes
      were dependent on shell commands that are only available on unix shells,
      resulting in build failures on a Windows host PC.
      
      This patch fixes the Makefile by using a more portable approach for
      comparing the architecture revision.
      
      Change-Id: Icb56cbecd8af5b0b9056d105970ff4a6edd1755a
      Signed-off-by: default avatarSami Mujawar <sami.mujawar@arm.com>
      4a565bd8
  24. 19 Jun, 2020 1 commit
  25. 12 Jun, 2020 1 commit
  26. 09 Jun, 2020 1 commit
  27. 08 Jun, 2020 1 commit
  28. 15 May, 2020 1 commit
  29. 14 May, 2020 1 commit
    • Manish V Badarkhe's avatar
      Implement workaround for AT speculative behaviour · 45aecff0
      Manish V Badarkhe authored
      During context switching from higher EL (EL2 or higher)
      to lower EL can cause incorrect translation in TLB due to
      speculative execution of AT instruction using out-of-context
      translation regime.
      
      Workaround is implemented as below during EL's (EL1 or EL2)
      "context_restore" operation:
      1. Disable page table walk using SCTLR.M and TCR.EPD0 & EPD1
         bits for EL1 or EL2 (stage1 and stage2 disabled)
      2. Save all system registers except TCR and SCTLR (for EL1 and EL2)
      3. Do memory barrier operation (isb) to ensure all
         system register writes are done.
      4. Restore TCR and SCTLR registers (for EL1 and EL2)
      
      Errata details are available for various CPUs as below:
      Cortex-A76: 1165522
      Cortex-A72: 1319367
      Cortex-A57: 1319537
      Cortex-A55: 1530923
      Cortex-A53: 1530924
      
      More details can be found in mail-chain:
      https://lists.trustedfirmware.org/pipermail/tf-a/2020-April/000445.html
      
      
      
      Currently, Workaround is implemented as build option which is default
      disabled.
      Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
      Change-Id: If8545e61f782cb0c2dda7ffbaf50681c825bd2f0
      45aecff0
  30. 25 Apr, 2020 1 commit
  31. 20 Apr, 2020 1 commit
  32. 02 Apr, 2020 1 commit
    • Masahiro Yamada's avatar
      Pass more -D options to BL*_CPPFLAGS instead of BL*_CFLAGS · 9cefb4b1
      Masahiro Yamada authored
      Commit d5e97a1d ("Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3
      globally for C files") does not have commit 848a7e8c ("Build:
      introduce per-BL CPPFLAGS and ASFLAGS") as an ancestor because
      they were pulled almost at the same time.
      
      This is a follow-up conversion to be consistent with commit
      11a3c5ee
      
       ("plat: pass -D option to BL*_CPPFLAGS instead of
      BL*_CFLAGS").
      
      With this change, the command line option, IMAGE_AT_EL3, will be
      passed to .S files as well.
      
      I remove the definition in include/lib/cpus/aarch64/cpu_macros.S
      
      Otherwise, the following error would happen.
      
        include/lib/cpus/aarch64/cpu_macros.S:29:0: error: "IMAGE_AT_EL3" redefined [-Werror]
      
      Change-Id: I943c8f22356483c2ae3c57b515c69243a8fa6889
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      9cefb4b1
  33. 01 Apr, 2020 2 commits
    • Gilad Ben-Yossef's avatar
      cryptocell: add support for Cryptocell 713 · 4501843f
      Gilad Ben-Yossef authored
      
      
      Add Crypto 713 support as crypto module and NVM counter provider.
      
      As files under include/drivers/arm/cryptocell/713/ are copied verbatim
      from the CryptoCell SBROM lib project they are filtered from checkpatch
      coding style check.
      Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
      Change-Id: I7c361772f00ca7d96481f81ac6cbb2704467e52c
      4501843f
    • Manish V Badarkhe's avatar
      Enable MTE support · 7ff088d1
      Manish V Badarkhe authored
      
      
      Enable MTE support by adding memory tag option in Makefile
      This option is available only when ARMv8.5-MemTag is implemented
      
      MTE options are added in latest clang and armclang compiler which
      support below options:
      for clang <version 11.0.0>
      1. -march=arm8.5-a+memtag
      2. -fsanitize=memtag
      
      for armclang <version 6.12>
      1. -march=arm8.5-a+memtag
      2. -mmemtag-stack
      
      Set the option SUPPORT_STACK_MEMTAG=yes to enable memory stack tagging.
      Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
      Change-Id: I4e0bbde4e9769ce03ead6f550158e22f32c1c413
      7ff088d1
  34. 31 Mar, 2020 2 commits
    • Ahmad Fatoum's avatar
      Makefile: don't use $(CC) before value is explicit set · 32b209bf
      Ahmad Fatoum authored
      Unless specified in the environment, $(CC) expands to some generic
      host C compiler like cc or c99. We set our own value for $(CC), but
      only few lines later.
      
      Move the first use of the $(CC) variable behind the definition to
      correct this.
      
      Change-Id: I45344e063d21ddfe22b7ad77954e85c1c46087bd
      Fixes: 1684b873
      
       ("Use clang assembler when clang compiler is used")
      Signed-off-by: default avatarAhmad Fatoum <a.fatoum@pengutronix.de>
      32b209bf
    • Masahiro Yamada's avatar
      Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files · d5e97a1d
      Masahiro Yamada authored
      
      
      The build system defines the IMAGE_BL* macro when compiling each image.
      This is useful to distinguish which image the current file is being
      built for by using #if defined(IMAGE_BL2) or #if defined(IMAGE_BL31),
      or whatever.
      
      There are some cases where we are more interested in which exception
      level the current file is being built for.
      
      include/lib/cpus/{aarch32,aarch64}/cpu_macros.S defines IMAGE_AT_EL3,
      but we do not have it globally.
      
      Pass IMAGE_AT_EL1 or IMAGE_AT_EL3 to BL*_CFLAGS so that it is available
      from all C code.
      
      The library code (libc.a, libmbedtls.a, etc.) is exceptional cases,
      where the code can be shared between BL images.
      
      Other than that, we know the exception level at the build time, and
      this macro will be useful in the shared code.
      
      Change-Id: I7c8a1da10726906adfba981cfe8464dff111d6b0
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      d5e97a1d
  35. 25 Mar, 2020 1 commit