1. 24 May, 2017 3 commits
    • Antonio Nino Diaz's avatar
      mbedtls: Use `MBEDTLS_SHA256_SMALLER` in ARM platforms · d77b98ca
      Antonio Nino Diaz authored
      
      
      This options enables an implementation of SHA-256 that has a smaller
      code footprint (~1.6 KB less) but is also ~30% slower. For ARM
      platforms, code size is currently considered more important than
      execution speed in the mbed TLS crypto module.
      
      Added a small note about this option to the documentation of the
      authentication framework.
      
      Change-Id: I4c0b221ea5d3466465261316ba07b627fa01b233
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      d77b98ca
    • Antonio Nino Diaz's avatar
      mbedtls: Use `tf_snprintf` instead of `snprintf` · ab1794f5
      Antonio Nino Diaz authored
      
      
      The Trusted Firmware uses a subset of the APIs provided by mbed TLS.
      This subset internally uses `snprintf`, but the only format specifier
      used is '%d', which is supported by `tf_snprintf`.
      
      This patch makes mbed TLS use `tf_snprintf` instead of `snprintf`,
      saving 3 KB in both debug and release builds when TBBR is enabled.
      
      Change-Id: I7f992a21015930d7c0f4660e7a28ceefd60b9597
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      ab1794f5
    • Antonio Nino Diaz's avatar
      Introduce `tf_snprintf` · da5241cb
      Antonio Nino Diaz authored
      
      
      This is a reduced version of `snprintf` that only supports formats '%d',
      '%i' and '%u'. It can be used when the full `snprintf` is not needed in
      order to save memory. If it finds an unknown format specifier, it
      prints an error message and panics.
      
      Change-Id: I2cb06fcdf74cda2c43caf73ae0762a91499fc04e
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      da5241cb
  2. 22 May, 2017 4 commits
  3. 19 May, 2017 2 commits
  4. 18 May, 2017 1 commit
  5. 17 May, 2017 1 commit
  6. 16 May, 2017 6 commits
  7. 15 May, 2017 4 commits
  8. 12 May, 2017 9 commits
    • davidcunado-arm's avatar
      Merge pull request #930 from antonio-nino-diaz-arm/an/fixes-xlat-v2 · 823cc7a9
      davidcunado-arm authored
      Minor fixes to the xlat tables lib v2
      823cc7a9
    • David Cunado's avatar
      Migrate ARM platforms to use TF_MBEDTLS_KEY_ALG · 6a0b0d7f
      David Cunado authored
      
      
      A previous patch superseded the MBEDTLS_KEY_ALG. This patch updates
      the ARM platforms to use the new TF_MBEDTLS_KEY_ALG define.
      
      Change-Id: Ie0e1bc272e127e879ac58e7cfcbe268751d7688e
      Signed-off-by: default avatarDavid Cunado <david.cunado@arm.com>
      6a0b0d7f
    • David Cunado's avatar
      mbedtls: Complete namespace for TF specific macros · 0aff7ad2
      David Cunado authored
      
      
      This patch renames MBEDTLS_KEY_ALG to TF_MBEDTLS_KEY_ALG. This
      completes the migration of TF specific macros so that they do not
      have the MBEDTLS_ suffix (see arm-trusted-firmware#874).
      
      Change-Id: Iad7632477e220b0af987c4db3cf52229fb127d00
      Signed-off-by: default avatarDavid Cunado <david.cunado@arm.com>
      0aff7ad2
    • David Cunado's avatar
      mbedtls: Namespace for TF specific macros · b1883510
      David Cunado authored
      
      
      An earlier patch (arm-trusted-firmware#874) migrated MBEDTLS_ suffixed
      macros to have a TBBR_ suffix to avoid any potential clash with future
      mbedtls macros.
      
      But on reflection the TBBR_ suffix could be confusing as the macros
      are used to drive TF-specific configuration of mbedtls. As such
      this patch migrates these macros from TBBR_suffix to TF_MBEDTLS_
      suffix which more accurately conveys their use.
      
      Change-Id: Ic87642b653ceeaa03d62f724976abd5e12e867d4
      Signed-off-by: default avatarDavid Cunado <david.cunado@arm.com>
      b1883510
    • Soby Mathew's avatar
      AArch32: Rework SMC context save and restore mechanism · b6285d64
      Soby Mathew authored
      
      
      The current SMC context data structure `smc_ctx_t` and related helpers are
      optimized for case when SMC call does not result in world switch. This was
      the case for SP_MIN and BL1 cold boot flow. But the firmware update usecase
      requires world switch as a result of SMC and the current SMC context helpers
      were not helping very much in this regard. Therefore this patch does the
      following changes to improve this:
      
      1. Add monitor stack pointer, `spmon` to `smc_ctx_t`
      
      The C Runtime stack pointer in monitor mode, `sp_mon` is added to the
      SMC context, and the `smc_ctx_t` pointer is cached in `sp_mon` prior
      to exit from Monitor mode. This makes is easier to retrieve the
      context when the next SMC call happens. As a result of this change,
      the SMC context helpers no longer depend on the stack to save and
      restore the register.
      
      This aligns it with the context save and restore mechanism in AArch64.
      
      2. Add SCR in `smc_ctx_t`
      
      Adding the SCR register to `smc_ctx_t` makes it easier to manage this
      register state when switching between non secure and secure world as a
      result of an SMC call.
      
      Change-Id: I5e12a7056107c1701b457b8f7363fdbf892230bf
      Signed-off-by: default avatarSoby Mathew <soby.mathew@arm.com>
      Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
      b6285d64
    • dp-arm's avatar
      Hook up LLVM compiler-rt in the build system · d801fbb0
      dp-arm authored
      
      
      This patch enables compiler-rt for the AArch32 target.  The code is
      not used for AArch64 as the architecture supports the 64-bit division
      and modulo operations natively.
      
      Change-Id: I1703a92872b0bb56ac0b98c67193830683963b13
      Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
      d801fbb0
    • dp-arm's avatar
      Import builtins from LLVM compiler-rt project · 0e14a7fb
      dp-arm authored
      
      
      These are needed to provide division and modulo operations
      for the AArch32 target.
      
      This code is entirely unmodified.  Imported from compiler-rt
      master branch as of May 4 2017.
      
      Change-Id: I001e1809f2afd4bf8d4cc3d2296798809f607144
      Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
      0e14a7fb
    • Sandrine Bailleux's avatar
      Tegra: Break circular dependency in platform header files · 24c287be
      Sandrine Bailleux authored
      
      
      For SoCs T132 and T210, the header file 'platform_def.h' used to include
      'tegra_def.h' and vice versa. This patch breaks this circular dependency
      by making 'tegra_def.h' independent.
      
      Change-Id: I45a00a84e6ab8b93d5e9242a9ff65f03e9102a96
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      24c287be
    • Sandrine Bailleux's avatar
      FVP: Break circular dependency in platform header files · 144c3f5e
      Sandrine Bailleux authored
      
      
      We used to have the following circular dependency in the FVP platform
      header files:
      
       +-> arm_def.h ---> platform_def.h ---> fvp_def.h --+
       |__________________________________________________|
      
      This patch breaks it by not including 'arm_def.h' from 'fvp_def.h'.
      
      Change-Id: I280d906559e3343dd38764029e77c0ea768b4fec
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      144c3f5e
  9. 11 May, 2017 5 commits
  10. 10 May, 2017 5 commits