1. 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
  2. 31 Jul, 2019 1 commit
  3. 22 Jul, 2019 1 commit
    • Imre Kis's avatar
      Romlib makefile refactoring and script rewriting · d8210dc6
      Imre Kis authored
      
      
      The features of the previously existing gentbl, genvar and genwrappers
      scripts were reimplemented in the romlib_generator.py Python script.
      This resulted in more readable and maintainable code and the script
      introduces additional features that help dependency handling in
      makefiles. The assembly templates were separated from the script logic
      and were collected in the 'templates' directory.
      
      The targets and their dependencies were reorganized in the makefile and
      the dependency handling of included index files is possible now.
      Incremental build is available in case of modifying the index files.
      Signed-off-by: default avatarImre Kis <imre.kis@arm.com>
      Change-Id: I79f65fab9dc5c70d1f6fc8f57b2a3009bf842dc5
      d8210dc6
  4. 18 Jul, 2019 1 commit
    • Julius Werner's avatar
      Introduce lightweight BL platform parameter library · b852d229
      Julius Werner authored
      
      
      This patch adds some common helper code to support a lightweight
      platform parameter passing framework between BLs that has already been
      used on Rockchip platforms but is more widely useful to others as well.
      It can be used as an implementation for the SoC firmware configuration
      file mentioned in the docs, and is primarily intended for platforms
      that only require a handful of values to be passed and want to get by
      without a libfdt dependency. Parameters are stored in a linked list and
      the parameter space is split in generic and vendor-specific parameter
      types. Generic types will be handled by this code whereas
      vendor-specific types have to be handled by a vendor-specific handler
      function that gets passed in.
      
      Change-Id: If3413d44e86b99d417294ce8d33eb2fc77a6183f
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      b852d229
  5. 16 Jul, 2019 1 commit
  6. 12 Jul, 2019 2 commits
  7. 10 Jul, 2019 1 commit
  8. 02 Jul, 2019 10 commits
  9. 20 Jun, 2019 1 commit
  10. 11 Jun, 2019 1 commit
  11. 06 Jun, 2019 3 commits
    • Andrew F. Davis's avatar
      PSCI: Lookup list of parent nodes to lock only once · 74d27d00
      Andrew F. Davis authored
      
      
      When acquiring or releasing the power domain locks for a given CPU the
      parent nodes are looked up by walking the up the PD tree list on both the
      acquire and release path, only one set of lookups is needed. Fetch the
      parent nodes first and pass this list into both the acquire and release
      functions to avoid the double lookup.
      
      This also allows us to not have to do this lookup after coherency has
      been exited during the core power down sequence. The shared struct
      psci_cpu_pd_nodes is not placed in coherent memory like is done
      for psci_non_cpu_pd_nodes and doing so would negatively affect
      performance. With this patch we remove the need to have it in coherent
      memory by moving the access out of psci_release_pwr_domain_locks().
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: I7b9cfa9d31148dea0f5e21091c8b45ef7fe4c4ab
      74d27d00
    • Andre Przywara's avatar
      Neoverse N1: Introduce workaround for Neoverse N1 erratum 1315703 · 5f5d0763
      Andre Przywara authored
      Neoverse N1 erratum 1315703 is a Cat A (rare) erratum [1], present in
      older revisions of the Neoverse N1 processor core.
      The workaround is to set a bit in the implementation defined CPUACTLR2_EL1
      system register, which will disable the load-bypass-store feature.
      
      [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.pjdocpjdoc-466751330-1032/index.html
      
      
      
      Change-Id: I5c708dbe0efa4daa0bcb6bd9622c5efe19c03af9
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      5f5d0763
    • Andrew F. Davis's avatar
      ti: k3: common: Remove coherency workaround for AM65x · 48d6b264
      Andrew F. Davis authored
      
      
      We previously left our caches on during power-down to prevent any
      non-caching accesses to memory that is cached by other cores. Now with
      the last accessed areas all being marked as non-cached by
      USE_COHERENT_MEM we can rely on that to workaround our interconnect
      issues. Remove the old workaround.
      
      Change-Id: Idadb7696d1449499d1edff4f6f62ab3b99d1efb7
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      48d6b264
  12. 04 Jun, 2019 1 commit
    • John Tsichritzis's avatar
      Apply compile-time check for AArch64-only cores · 629d04f5
      John Tsichritzis authored
      
      
      Some cores support only AArch64 mode. In those cores, only a limited
      subset of the AArch32 system registers are implemented. Hence, if TF-A
      is supposed to run on AArch64-only cores, it must be compiled with
      CTX_INCLUDE_AARCH32_REGS=0.
      
      Currently, the default settings for compiling TF-A are with the AArch32
      system registers included. So, if we compile TF-A the default way and
      attempt to run it on an AArch64-only core, we only get a runtime panic.
      
      Now a compile-time check has been added to ensure that this flag has the
      appropriate value when AArch64-only cores are included in the build.
      
      Change-Id: I298ec550037fafc9347baafb056926d149197d4c
      Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
      629d04f5
  13. 28 May, 2019 1 commit
  14. 24 May, 2019 2 commits
    • Alexei Fedorov's avatar
      Add support for Branch Target Identification · 9fc59639
      Alexei Fedorov authored
      
      
      This patch adds the functionality needed for platforms to provide
      Branch Target Identification (BTI) extension, introduced to AArch64
      in Armv8.5-A by adding BTI instruction used to mark valid targets
      for indirect branches. The patch sets new GP bit [50] to the stage 1
      Translation Table Block and Page entries to denote guarded EL3 code
      pages which will cause processor to trap instructions in protected
      pages trying to perform an indirect branch to any instruction other
      than BTI.
      BTI feature is selected by BRANCH_PROTECTION option which supersedes
      the previous ENABLE_PAUTH used for Armv8.3-A Pointer Authentication
      and is disabled by default. Enabling BTI requires compiler support
      and was tested with GCC versions 9.0.0, 9.0.1 and 10.0.0.
      The assembly macros and helpers are modified to accommodate the BTI
      instruction.
      This is an experimental feature.
      Note. The previous ENABLE_PAUTH build option to enable PAuth in EL3
      is now made as an internal flag and BRANCH_PROTECTION flag should be
      used instead to enable Pointer Authentication.
      Note. USE_LIBROM=1 option is currently not supported.
      
      Change-Id: Ifaf4438609b16647dc79468b70cd1f47a623362e
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      9fc59639
    • John Tsichritzis's avatar
      Introduce BTI support in ROMLIB · bbb24f61
      John Tsichritzis authored
      
      
      When TF-A is compiled with BTI enabled, the branches in the ROMLIB
      jumptable must be preceded by a "bti j" instruction.
      
      Moreover, when the additional "bti" instruction is inserted, the
      jumptable entries have a distance of 8 bytes between them instead of 4.
      Hence, the wrappers are also modified accordinly.
      
      If TF-A is compiled without BTI enabled, the ROMLIB jumptable and
      wrappers are generated as before.
      
      Change-Id: Iaa59897668f8e59888d39046233300c2241d8de7
      Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
      bbb24f61
  15. 21 May, 2019 1 commit
  16. 14 May, 2019 1 commit
  17. 13 May, 2019 1 commit
    • Alexei Fedorov's avatar
      Remove .arch directives from spinlock.S · 02a85c11
      Alexei Fedorov authored
      
      
      This patch removes .arch "arm8.1-a" and "armv8-a"
      directives which overwrite ASFLAGS_aarch64 option based
      on ARM_ARCH_MINOR passed to Makefile and cause
      translation errors like
      "selected processor does not support `bti jc'"
      for armv8.5-a targets when BTI support is enabled.
      
      Change-Id: Idca5b66ed1e5d86e2188b0c0f16c3819990957c4
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      02a85c11
  18. 07 May, 2019 2 commits
  19. 03 May, 2019 1 commit
    • John Tsichritzis's avatar
      Add compile-time errors for HW_ASSISTED_COHERENCY flag · 076b5f02
      John Tsichritzis authored
      This patch fixes this issue:
      https://github.com/ARM-software/tf-issues/issues/660
      
      
      
      The introduced changes are the following:
      
      1) Some cores implement cache coherency maintenance operation on the
      hardware level. For those cores, such as - but not only - the DynamIQ
      cores, it is mandatory that TF-A is compiled with the
      HW_ASSISTED_COHERENCY flag. If not, the core behaviour at runtime is
      unpredictable. To prevent this, compile time checks have been added and
      compilation errors are generated, if needed.
      
      2) To enable this change for FVP, a logical separation has been done for
      the core libraries. A system cannot contain cores of both groups, i.e.
      cores that manage coherency on hardware and cores that don't do it. As
      such, depending on the HW_ASSISTED_COHERENCY flag, FVP includes the
      libraries only of the relevant cores.
      
      3) The neoverse_e1.S file has been added to the FVP sources.
      
      Change-Id: I787d15819b2add4ec0d238249e04bf0497dc12f3
      Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
      076b5f02
  20. 30 Apr, 2019 1 commit
    • Louis Mayencourt's avatar
      Add support for default stack-protector flag · fd7b287c
      Louis Mayencourt authored
      
      
      The current stack-protector support is for none, "strong" or "all".
      The default use of the flag enables the stack-protection to all
      functions that declare a character array of eight bytes or more in
      length on their stack.
      This option can be tuned with the --param=ssp-buffer-size=N option.
      
      Change-Id: I11ad9568187d58de1b962b8ae04edd1dc8578fb0
      Signed-off-by: default avatarLouis Mayencourt <louis.mayencourt@arm.com>
      fd7b287c
  21. 25 Apr, 2019 1 commit
  22. 18 Apr, 2019 1 commit
  23. 17 Apr, 2019 3 commits
  24. 12 Apr, 2019 1 commit