Skip to content
  1. Mar 06, 2023
  2. Mar 03, 2023
  3. Mar 02, 2023
  4. Mar 01, 2023
    • Jayanth Dodderi Chidanand's avatar
      fix(cpufeat): resolve build errors due to compiler optimization · e8f0dd58
      Jayanth Dodderi Chidanand authored and Jayanth Dodderi Chidanand's avatar Jayanth Dodderi Chidanand committed
      
      
      Currently most of the architectural feature build flags are set
      to 2(FEATURE_STATE_CHECK) for fvp platform only.
      
      However other platforms still configure them by default to 0, which
      would lead to build failures in cases when compiler configured
      to build TF-A  with zero optimization (CFLAGS='-O0').
      
      This patch addresses such build issues and thereby resolves the failures
      seen under CI-l3 test_configurations.
      
      Change-Id: I45b82b821951bba6b9df08177f7d286e624a4239
      Signed-off-by: Jayanth Dodderi Chidanand's avatarJayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
      e8f0dd58
    • Govindraj Raja's avatar
      fix(mbedtls): fix mbedtls coverity issues · a9edc32c
      Govindraj Raja authored
      
      
      commit (a8eadc51 refactor(mbedtls): avoid including
      MBEDTLS_CONFIG_FILE) avoids using config file directly and relies on
      config file usage from mbedtls version.h
      
      But we could build trusted boot without mbedtls dir so guard version.h
      include in cot_def.h with availability of config file.
      
      Also we refactored in same commit to break dependencies between
      auth_mod.h and cot_def.h, So add cot_def.h include in nxp tbbr
      cot file.
      
      Change-Id: I4779e90c18f04c73d2121c88df6420b4b1109c8b
      Signed-off-by: Govindraj Raja's avatarGovindraj Raja <govindraj.raja@arm.com>
      a9edc32c
  5. Feb 28, 2023
  6. Feb 27, 2023
    • Demi Marie Obenour's avatar
      refactor(auth): clean up certificate length checks · ddd9f675
      Demi Marie Obenour authored
      
      
      The previous code was correct but unnecessarily verbose.
      
      Change-Id: Ia19c667811a7c3b6957a0274d36076b0b16e36b7
      Signed-off-by: default avatarDemi Marie Obenour <demiobenour@gmail.com>
      ddd9f675
    • Demi Marie Obenour's avatar
      refactor(auth): remove code duplication · 6a7104a3
      Demi Marie Obenour authored
      
      
      The unique IDs are handled identically, so just use a for loop to get
      both of them.
      
      Change-Id: I44baaa4747ca7f314d364a79dfcbce97315f5a92
      Signed-off-by: default avatarDemi Marie Obenour <demiobenour@gmail.com>
      6a7104a3
    • Andre Przywara's avatar
      refactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED · fc8d2d39
      Andre Przywara authored
      
      
      At the moment we only support FEAT_TRF to be either unconditionally
      compiled in, or to be not supported at all.
      
      Add support for runtime detection (ENABLE_TRF_FOR_NS=2), by splitting
      is_feat_trf_present() into an ID register reading function and a second
      function to report the support status. That function considers both
      build time settings and runtime information (if needed), and is used
      before we access TRF related registers.
      Also move the context saving code from assembly to C, and use the new
      is_feat_trf_supported() function to guard its execution.
      
      The FVP platform decided to compile in support unconditionally (=1),
      even though FEAT_TRF is an ARMv8.4 feature, so is not available with the
      FVP model's default command line.
      Change that to the now supported dynamic option (=2), so the right
      decision can be made by the code at runtime.
      
      Change-Id: Ia97b01adbe24970a4d837afd463dc5506b7295a3
      Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      fc8d2d39
    • Andre Przywara's avatar
      refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED · ff491036
      Andre Przywara authored
      
      
      At the moment we only support FEAT_BRBE to be either unconditionally
      compiled in, or to be not supported at all.
      
      Add support for runtime detection (ENABLE_BRBE_FOR_NS=2), by splitting
      is_feat_brbe_present() into an ID register reading function and a second
      function to report the support status. That function considers both
      build time settings and runtime information (if needed), and is used
      before we access BRBE related registers.
      
      The FVP platform decided to compile in support unconditionally (=1),
      even though FEAT_BRBE is an ARMv9 feature, so is not available with the
      FVP model's default command line.
      Change that to the now supported dynamic option (=2), so the right
      decision can be made by the code at runtime.
      
      Change-Id: I5f2e2c9648300f65f0fa9a5f8e2f34e73529d053
      Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      ff491036
    • Andre Przywara's avatar
      refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED · f5360cfa
      Andre Przywara authored
      
      
      At the moment we only support FEAT_TRBE to be either unconditionally
      compiled in, or to be not supported at all.
      
      Add support for runtime detection (ENABLE_TRBE_FOR_NS=2), by splitting
      is_feat_trbe_present() into an ID register reading function and a second
      function to report the support status. That function considers both
      build time settings and runtime information (if needed), and is used
      before we access TRBE related registers.
      
      The FVP platform decided to compile in support unconditionally (=1),
      even though FEAT_TRBE is an ARMv9 feature, so is not available with the
      FVP model's default command line.
      Change that to the now supported dynamic option (=2), so the right
      decision can be made by the code at runtime.
      
      Change-Id: Iee7f88ea930119049543a8a4a105389997e7692c
      Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      f5360cfa
    • Andre Przywara's avatar
      fix(cpufeat): context-switch: move FGT availability check to callers · de8c4892
      Andre Przywara authored
      
      
      To be inline with other features, and to allow the availability to be
      checked for different contexts, move the FGT availability check out of
      the save/restore functions. This is instead now checked at the caller.
      
      Change-Id: I96e0638714f9d1b6fdadc1cb989cbd33bd48b1f6
      Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      de8c4892
    • Andre Przywara's avatar
      feat(cpufeat): extend check_feature() to deal with min/max · a4cccb4f
      Andre Przywara authored
      
      
      So far the check_feature() function compares the subfield of a CPU ID
      register against 0, to learn if a feature is enabled or not.
      This is problematic for checks that require a certain revision of a
      feature, so we should check against a minimum version number instead.
      On top of that we might need to add code to support newer versions of a
      feature, so we should be alerted if new hardware introduces a higher
      number.
      
      Extend the check_feature() function to take two extra arguments: the
      minimum version, and the greatest currently known number.
      Then make sure that the CPU ID field is in this range.
      
      Change-Id: I425b68535a2ba9eafd31854e74d142183b521cd5
      Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      a4cccb4f
    • Andre Przywara's avatar
      refactor(cpufeat): wrap CPU ID register field isolation · fd1dd4cb
      Andre Przywara authored
      
      
      Some MISRA test complains about our code to isolate CPU ID register
      fields: the ID registers (and associated masks) are 64 bits wide, but
      the eventual field is always 4 bits wide only, so we use an unsigned
      int to represent that. MISRA dislikes the differing width here.
      
      Since the code to extract a feature field from a CPU ID register is very
      schematic already, provide a wrapper macro to make this more readable,
      and do the proper casting in one central place on the way.
      
      While at it, use the same macro for the AArch32 feature detection side.
      
      Change-Id: Ie102a9e7007a386f5879ec65e159ff041504a4ee
      Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      fd1dd4cb
    • Madhukar Pappireddy's avatar
      Merge changes I960771e6,I291dc627,I57f31664 into integration · 55a32830
      Madhukar Pappireddy authored
      * changes:
        fix(ufs): set the PRDT length field properly
        fix(ufs): flush the entire PRDT
        fix(ufs): only allow using one slot
      55a32830
    • Manish Badarkhe's avatar
      Merge changes from topic "mbedtls3_support" into integration · 766d78b1
      Manish Badarkhe authored
      * changes:
        feat(stm32mp1): add mbedtls-3.3 support config
        refactor(fvp): minor cleanup with TRUSTED_BOARD_BOOT
        style(crypto): add braces for if statement
        feat(fvp): increase BL1_RW and BL2 size
        feat(mbedtls): add support for mbedtls-3.3
        refactor(crypto): avoid using struct mbedtls_pk_rsassa_pss_options
        refactor(mbedtls): avoid including MBEDTLS_CONFIG_FILE
      766d78b1
    • Boyan Karatotev's avatar
      fix(docs): add plantuml as a dependency · 65982a94
      Boyan Karatotev authored
      
      
      This wasn't listed on the web interface configuration. Perhaps it came
      preloaded. Anyway, it's needed for diagrams. Add it back.
      
      Signed-off-by: Boyan Karatotev's avatarBoyan Karatotev <boyan.karatotev@arm.com>
      Change-Id: I20c1eb0e8d5abaa3533169dd9704cbd3b0eb06a5
      65982a94
    • joannafarley-arm's avatar
    • Govindraj Raja's avatar
      feat(stm32mp1): add mbedtls-3.3 support config · c9498c8f
      Govindraj Raja authored
      
      
      Add stm32mp1_mbedtls_config-3.h config file for stm32mp1 builds with
      mbedtls-3.3
      
      Change-Id: I4581cb0ea7b2c7022e71aefd7ff05ee3a72f5883
      Signed-off-by: Govindraj Raja's avatarGovindraj Raja <govindraj.raja@arm.com>
      c9498c8f
    • Michal Simek's avatar
      revert(zynqmp): remove EM SMC handler · 82b70384
      Michal Simek authored
      
      
      EM support was out of SMC SIP range that's why has been moved to SIP
      range 0x3000 by commit acbae399 ("fix(zynqmp): move EM SMC range
      to SIP range").
      But after another investigation was found that this interface has no
      user in any our SW and likely never adopted by anybody else. That's
      why simply remove it. If there is any user it can be added back but
      as TF-A size is challenging removing unused code is very welcome.
      Origin code was added by commit 504925f9 ("xilinx: zynqmp: Add
      support for Error Management").
      
      Change-Id: I2d9222d7dde507400893e06f7f12e1713ce6bc9a
      Signed-off-by: default avatarMichal Simek <michal.simek@amd.com>
      82b70384
  7. Feb 25, 2023
    • Jorge Troncoso's avatar
      fix(ufs): set the PRDT length field properly · 20fdbcf5
      Jorge Troncoso authored
      
      
      The PRDT length field contains the count of the entries in the PRDT. See
      JEDEC Standard No. 223E, section 6.1.1, "UTP Transfer Request
      Descriptor," page 66. Previously we were setting the PRDT length field
      to the number of bytes in the PRDT divided by four (the size in units of
      32 bits). This was incorrect according to the spec.
      
      Signed-off-by: default avatarJorge Troncoso <jatron@google.com>
      Change-Id: I960771e6ce57002872392993042fae9ec505447e
      20fdbcf5
    • Jorge Troncoso's avatar
      fix(ufs): flush the entire PRDT · 83ef8698
      Jorge Troncoso authored
      
      
      Previously, if the image being read exceeded 12,800 KB (or 50 PRDT
      entries of size 256 KB), the UFS driver would not flush the entire
      Physical Region Descriptor Table (PRDT). This would cause the UFS host
      controller to read empty PRDT entries, which eventually would make the
      system crash. This change updates the UFS driver to flush the entire
      PRDT, irrespective of the size of the image being read.
      
      This change also throws an error if the memory allocated for UFS
      descriptors is not sufficient to hold the entire Physical Region
      Descriptor Table (PRDT).
      
      Signed-off-by: default avatarJorge Troncoso <jatron@google.com>
      Change-Id: I291dc62748992481be3cc156ce1474a6e3990ea9
      83ef8698
    • Jorge Troncoso's avatar
      fix(ufs): only allow using one slot · 56db7b8b
      Jorge Troncoso authored
      
      
      Currently the UFS driver places the Command UPIU, Response UPIU, and
      PRDT immediately after the UTP Transfer Request Descriptor. This space
      would normally be reserved for other slots in the UTP Transfer Request
      List, but because we always use slot zero, the other slots in the UTP
      Transfer Request List are never used and this is okay.
      
      Because the Command UPIU, Response UPIU, and PRDT are placed inside the
      UTP Transfer Request List, the UFS driver would break if two or more
      slots were used at the same time. Therefore, in a sense the
      get_empty_slot() function is misleading. It gives developers the
      illusion that they can use two or more slots simultaneously but in
      reality they cannot.
      
      This change deletes the get_empty_slot() function and replaces it with
      is_slot_available() so that only one slot can be used.
      
      Signed-off-by: default avatarJorge Troncoso <jatron@google.com>
      Change-Id: I57f316640a1cdd56493505ede61f3012ceb2f305
      56db7b8b
    • joannafarley-arm's avatar
  8. Feb 24, 2023
  9. Feb 23, 2023
  10. Feb 22, 2023
    • Govindraj Raja's avatar
      refactor(bl31): use elx_panic for sysreg_handler64 · 17d07a55
      Govindraj Raja authored
      
      
      When we reach sysreg_handler64 from any trap handling we are entering
      this path from lower EL and thus we should be calling lower_el_panic
      reporting mechanism to print panic report.
      
      Make report_elx_panic available through assembly func elx_panic which
      could be used for reporting any lower_el_panic.
      
      Change-Id: Ieb260cf20ea327a59db84198b2c6a6bfc9ca9537
      Signed-off-by: Govindraj Raja's avatarGovindraj Raja <govindraj.raja@arm.com>
      17d07a55
Loading