Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Jan 23, 2024
  2. Jan 22, 2024
  3. Jan 18, 2024
  4. Dec 13, 2023
  5. Dec 03, 2023
  6. Nov 13, 2023
    • Sandrine Bailleux's avatar
      refactor(auth): remove return_if_error() macro · 575c1469
      Sandrine Bailleux authored
      
      The usage of this macro hinders the accuracy of code coverage
      data. Lines of code calling this macro always appear as covered because
      the test condition within it always gets executed; however, the branch
      is not necessarily taken. Consequently, we lose branch coverage
      information on these error code paths.
      
      Besides, it is debatable whether such a simple macro really improves
      code readability or on the contrary obfuscates the code...
      
      For these reasons, this patch inlines the macro code everywhere it was
      called.
      
      It also adds some error messages in all these places to help narrowing
      down authentication failures. These messages only get displayed and
      compiled into the binaries when building TF-A with 'LOG_VERBOSE' level
      of verbosity. We use the same message string everywhere in order to
      limit the memory footprint increase for 'LOG_VERBOSE' builds.
      
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      Change-Id: I461078bb8c6fd6811d2cbefbe3614e17e83796f2
      575c1469
    • Govindraj Raja's avatar
      build(mbedtls): add deprecation notice · 267c106f
      Govindraj Raja authored
      Add a deprecation notice for building TF-A with mbedtls-2.x
      This was notified earlier in TF-A mailing list:
      
      https://lists.trustedfirmware.org/archives/list/tf-a@lists.trustedfirmware.org/message/YDPOPASMGEQBCOI5TKUSD3V3J75NAT7A/
      
      
      
      We will be removing support to build TF-A with mbedtls-2.x after
      TF-A 2.10 release.
      
      Change-Id: I669b423ee9af9f5c5255fce370413fffaf38e8eb
      Signed-off-by: default avatarGovindraj Raja <govindraj.raja@arm.com>
      267c106f
  7. Nov 08, 2023
  8. Oct 27, 2023
    • Govindraj Raja's avatar
      feat(partition): add interface to init gpt · f08460dc
      Govindraj Raja authored
      
      Current interface 'partition_init' accepts parameter image_id
      and returns no value. But the entire partition driver is build
      only to parse and handle GPT partitions, so add new interface
      gpt_partition_init which would return failure to platform code
      if it fails to parse the image.
      
      Change-Id: Iaf574d2ad01a15d0723c1475290c31dc4a078835
      Signed-off-by: default avatarGovindraj Raja <govindraj.raja@arm.com>
      f08460dc
    • Govindraj Raja's avatar
      refactor(partition): convert warn to verbose · 0f23e7eb
      Govindraj Raja authored
      
      Convert all warn messages to verbose messages. As most warning are
      needed during debug only and and won't increase the binary size by
      default.
      
      Change-Id: Icc5d5157f13507ccbc34675c20357117cad98255
      Signed-off-by: default avatarGovindraj Raja <govindraj.raja@arm.com>
      0f23e7eb
    • Govindraj Raja's avatar
      feat(partition): add support to use backup GPT header · ad2dd658
      Govindraj Raja authored
      
      Currently we just use primary GPT header which is located in second
      entry after MBR header, but if this block is corrupted or CRC
      mismatch occurs we could try to use the backup GPT header located at
      LBAn and GPT entries following this from LBA-33.
      
      Add suitable warning messages before returning any errors to identify
      the cause of issue.
      
      Change-Id: I0018ae9eafbacb683a18784d2c8bd917c70f50e1
      Signed-off-by: default avatarGovindraj Raja <govindraj.raja@arm.com>
      ad2dd658
    • Govindraj Raja's avatar
      refactor(partition): get GPT header location from MBR · fce8a70e
      Govindraj Raja authored
      
      GPT header is located in first LBA after MBR entry and mbr header has
      details of beginning of first entry, so use mbr header entry first_lba
      data to locate GPT header rather than GPT_HEADER_OFFSET.
      
      GPT header size is available in gpt_header, so use that
      rather than using DEFAULT_GPT_HEADER_SIZE.
      
      The location of GPT entries is available once we parse gpt_header
      and is available as partitiona_lba use that to load gpt_entries rather
      than GPT_ENTRY_OFFSET.
      
      Change-Id: I3c11f8cc9d4b0b1778a37fe342fb845ea4a4eff1
      Signed-off-by: default avatarGovindraj Raja <govindraj.raja@arm.com>
      fce8a70e
  9. Oct 26, 2023
    • Manish V Badarkhe's avatar
      feat(mbedtls-psa): mbedTLS PSA Crypto with ECDSA · 255ce97d
      Manish V Badarkhe authored
      
      The ECDSA algorithm signature verification in the PSA differs
      from the RSA algorithm in its handling of data formats. In the
      case of RSA, an encoded ASN1.0 buffer is passed to the PSA API,
      which then decodes the buffer. However, for ECDSA, the PSA API
      expects a raw format.
      
      To accomodate this requirement, introduce several static APIs
      that allows to retrieve -
      
      1. ECDSA public key data pointer along with its size, and also,
         the ECC family in PSA format from the public key.
      2. R and S pair of the ECDSA signature along with its size
      
      Change-Id: Icc7d5659aeb3d5c1ab63c3a12c001e68b11a3a86
      Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
      255ce97d
  10. Oct 16, 2023
  11. Oct 14, 2023
  12. Oct 13, 2023
  13. Oct 11, 2023
    • Sandrine Bailleux's avatar
      refactor(console): disable getc() by default · 85bebe18
      Sandrine Bailleux authored
      The ability to read a character from the console constitutes an attack
      vector into TF-A, as it gives attackers a means to inject arbitrary
      data into TF-A. It is dangerous to keep that feature enabled if not
      strictly necessary, especially in production firmware builds.
      
      Thus, we need a way to disable this feature. Moreover, when it is
      disabled, all related code should be eliminated from the firmware
      binaries, such that no remnant/dead getc() code remains in memory,
      which could otherwise be used as a gadget as part of a bigger security
      attack.
      
      This patch disables getc() feature by default. For legitimate getc()
      use cases [1], it can be explicitly enabled by building TF-A with
      ENABLE_CONSOLE_GETC=1.
      
      The following changes are introduced when getc() is disabled:
      
      - The multi-console framework no longer provides the console_getc()
        function.
      
      - If the console driver selected by the platform attempts to register
        a getc() callback into the multi-console framework ...
      85bebe18
  14. Oct 05, 2023
  15. Oct 04, 2023
    • Manish V Badarkhe's avatar
      feat(mbedtls-psa): introduce PSA_CRYPTO build option · 5782b890
      Manish V Badarkhe authored
      
      This is a preparatory patch to provide MbedTLS PSA Crypto
      API support, with below changes -
      
      1. Added a build macro PSA_CRYPTO to enable the MbedTLS PSA
         Crypto API support in the subsequent patches.
      2. Compile necessary PSA crypto files from MbedTLS source code
         when PSA_CRYPTO=1.
      
      Also, marked PSA_CRYPTO as an experimental feature.
      
      Change-Id: I45188f56c5c98b169b2e21e365150b1825c6c450
      Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
      5782b890
  16. Sep 28, 2023
  17. Sep 27, 2023
  18. Sep 25, 2023
    • Madhukar Pappireddy's avatar
      fix(gicv3): map generic interrupt type to GICv3 group · 632e5ffe
      Madhukar Pappireddy authored
      
      The generic interrupt controller identifies an interrupt based on its
      type whereas the GIC uses the notion of groups to identify an
      interrupt.
      
      Currently, they are used interchangeably in GICv3 driver. It did not
      cause any functional issues since the matching type and group had the
      same value for corresponding macros. This patch makes the necessary
      fixes.
      
      The generic interrupt controller APIs, such as
      plat_ic_set_interrupt_type map interrupt type to interrupt group
      supported by the GICv3 IP. Similarly, other generic interrupt
      controller APIs map interrupt group to interrupt type as needed.
      
      This patch also changes the name of the helper functions to use group
      rather than type for handling interrupts.
      
      Change-Id: Ie2d88a3260c71e4ab9c8baacde24cc21e551de3d
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      632e5ffe
    • Madhukar Pappireddy's avatar
      chore(gicv2): use interrupt group instead of type · ab80cf35
      Madhukar Pappireddy authored
      
      The generic interrupt controller identifies an interrupt based on its
      type whereas the GIC uses the notion of groups to identify an
      interrupt.
      
      This patch changes the name of the helper functions to use group
      rather than type for handling interrupts. No functional change in this
      patch.
      
      Change-Id: If13ec65cc6c87c2da73a3d54b033f02635ff924a
      Signed-off-by: default avatarMadhukar Pappireddy <madhukar.pappireddy@arm.com>
      ab80cf35
  19. Sep 18, 2023
    • Yann Gautier's avatar
      fix(st-ddr): express memory size with size_t type · b4e1e8fb
      Yann Gautier authored
      
      Express memory size with size_t type in structures.
      Retrieve value as uint32_t from device tree and then cast it to size_t.
      Combined with uintptr_t use, it ensures a generic algorithm whatever
      the platform architecture, notably within systematic tests. Adapt also
      their prototypes.
      
      Move memory size print outside stm32mp_ddr_check_size() to adapt it to
      related platform.
      
      Signed-off-by: default avatarNicolas Le Bayon <nicolas.le.bayon@st.com>
      Change-Id: Ic6e1a62d7a5e23cef49909a658098c800e7dae3f
      b4e1e8fb
  20. Sep 16, 2023
  21. Sep 13, 2023