1. 31 Aug, 2020 2 commits
  2. 28 Aug, 2020 6 commits
  3. 24 Aug, 2020 2 commits
    • Varun Wadekar's avatar
      Tegra: smmu: add smmu_verify function · 21ec61a9
      Varun Wadekar authored
      
      
      The SMMU configuration can get corrupted or updated by
      external clients during boot without our knowledge.
      
      This patch introduces a "verify" function for the SMMU
      driver, to check that the boot configuration settings are
      intact.  Usually, this function should be called at the
      end of the boot cycle.
      
      This function only calls panic() on silicon platforms.
      
      Change-Id: I2ab45a7f228781e71c73ba1f4ffc49353effe146
      Signed-off-by: default avatarGeorge Bauernschmidt <georgeb@nvidia.com>
      21ec61a9
    • Varun Wadekar's avatar
      Tegra: print GICC registers conditionally · 7cd336ab
      Varun Wadekar authored
      
      
      The GICC interface exists only on the interrupt controllers following
      the GICv2 specification.
      
      This patch prints the GICC register contents from the platform's macro,
      plat_crash_print_regs' only when TEGRA_GICC_BASE is defined. This
      allows platforms using future versions of the GIC specification to
      still use this macro.
      
      Change-Id: Ia5762d0a1ae28c832664d69362a7776e46a22ad1
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      7cd336ab
  4. 18 Aug, 2020 2 commits
  5. 09 Aug, 2020 1 commit
  6. 12 Jun, 2020 3 commits
  7. 20 May, 2020 1 commit
    • Varun Wadekar's avatar
      Tegra: enable SDEI handling · d886628d
      Varun Wadekar authored
      
      
      This patch enables SDEI support for all Tegra platforms, with
      the following configuration settings.
      
      * SGI 8 as the source IRQ
      * Special Private Event 0
      * Three private, dynamic events
      * Three shared, dynamic events
      * Twelve general purpose explicit events
      
      Verified using TFTF SDEI test suite.
      
      ******************************* Summary *******************************
       Test suite 'SDEI'                                               Passed
       =================================
       Tests Skipped : 0
       Tests Passed  : 5
       Tests Failed  : 0
       Tests Crashed : 0
       Total tests   : 5
       =================================
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: I1922069931a7876a4594e53260ee09f2e4f09390
      d886628d
  8. 12 May, 2020 1 commit
    • Varun Wadekar's avatar
      Tegra: introduce support for SMCCC_ARCH_SOC_ID · b5b2923d
      Varun Wadekar authored
      
      
      This patch returns the SOC version and revision values from
      the 'plat_get_soc_version' and 'plat_get_soc_revision' handlers.
      
      Verified using TFTF SMCCC_ARCH_SOC_ID test.
      
      <snip>
      > Executing 'SMCCC_ARCH_SOC_ID test'
        TEST COMPLETE                                                 Passed
      SOC Rev = 0x102
      SOC Ver = 0x36b0019
      <snip>
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: Ibd7101619143b74f6f6660732daeac1a8bca3e44
      b5b2923d
  9. 01 Apr, 2020 1 commit
  10. 22 Mar, 2020 5 commits
  11. 19 Mar, 2020 3 commits
    • Varun Wadekar's avatar
      Tegra186: system resume from TZSRAM memory · 2139c9c8
      Varun Wadekar authored
      
      
      TZSRAM loses power during System suspend, so the entire contents
      are copied to TZDRAM before Sysem Suspend entry. The warmboot code
      verifies and restores the contents to TZSRAM during System Resume.
      
      This patch removes the code that sets up CPU vector to point to
      TZSRAM during System Resume as a result. The trampoline code can
      also be completely removed as a result.
      
      Change-Id: I2830eb1db16efef3dfd96c4e3afc41a307588ca1
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      2139c9c8
    • Varun Wadekar's avatar
      Tegra186: disable PROGRAMMABLE_RESET_ADDRESS · 8336c94d
      Varun Wadekar authored
      
      
      This patch disables the code to program reset vector for secondary
      CPUs to a different entry point, than cold boot. The cold boot entry
      point has the ability to differentiate between a cold boot and a warm
      boot, that is controlled by the PROGRAMMABLE_RESET_ADDRESS macro. By
      reusing the same entry point, we can lock the CPU reset vector during
      cold boot.
      
      Change-Id: Iad400841d57c139469e1d29b5d467197e11958c4
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      8336c94d
    • Kalyani Chidambaram's avatar
      Tegra194: enable dual execution for EL2 and EL3 · d55b8f6a
      Kalyani Chidambaram authored
      
      
      This patch enables dual execution optimized translations for EL2 and EL3
      CPU exception levels.
      
      Change-Id: I28fe98bb05687400f247e94adf44a1f3a85c38b1
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      d55b8f6a
  12. 11 Mar, 2020 6 commits
    • Varun Wadekar's avatar
      Tegra210: support for secure physical timer · f8827c60
      Varun Wadekar authored
      
      
      This patch enables on-chip timer1 interrupts for Tegra210 platforms.
      
      Change-Id: Ic7417dc0e69264d7c28aa012fe2322cd30838f3e
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      f8827c60
    • Varun Wadekar's avatar
      Tegra: smmu: export handlers to read/write SMMU registers · 91dd7edd
      Varun Wadekar authored
      
      
      This patch exports the SMMU register read/write handlers for platforms.
      
      Change-Id: If92f0d3ce820e4997c090b48be7614407bb582da
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      91dd7edd
    • Pritesh Raithatha's avatar
      Tegra: smmu: remove context save sequence · a391d494
      Pritesh Raithatha authored
      
      
      SMMU and MC registers are saved as part of the System Suspend sequence.
      The register list includes some NS world SMMU registers that need to be
      saved by NS world software instead. All that remains as a result are
      the MC registers.
      
      This patch moves code to MC file as a result and renames all the
      variables and defines to use the MC prefix instead of SMMU. The
      Tegra186 and Tegra194 platform ports are updated to provide the MC
      context register list to the parent driver. The memory required for
      context save is reduced due to removal of the SMMU registers.
      
      Change-Id: I83a05079039f52f9ce91c938ada6cd6dfd9c843f
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      a391d494
    • Varun Wadekar's avatar
      Tegra: bpmp: fixup TEGRA_CLK_SE values for Tegra186/Tegra194 · e9044480
      Varun Wadekar authored
      
      
      This patch fixes the SE clock ID being used for Tegra186 and Tegra194
      SoCs. Previous assumption, that both SoCs use the same clock ID, was
      incorrect.
      
      Change-Id: I1ef0da5547ff2e14151b53968cad9cc78fee63bd
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e9044480
    • Jeetesh Burman's avatar
      Tegra194: add SE support to generate SHA256 of TZRAM · 029dd14e
      Jeetesh Burman authored
      
      
      The BL3-1 firmware code is stored in TZSRAM on Tegra194 platforms. This
      memory loses power when we enter System Suspend and so its contents are
      stored to TZDRAM, before entry. This opens up an attack vector where the
      TZDRAM contents might be tampered with when we are in the System Suspend
      mode. To mitigate this attack the SE engine calculates the hash of entire
      TZSRAM and stores it in PMC scratch, before we copy data to TZDRAM. The
      WB0 code will validate the TZDRAM and match the hash with the one in PMC
      scratch.
      
      This patch adds driver for the SE engine, with APIs to calculate the hash
      and store to PMC scratch registers.
      
      Change-Id: I04cc0eb7f54c69d64b6c34fc2ff62e4cfbdd43b2
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      029dd14e
    • Jeetesh Burman's avatar
      Tegra194: store TZDRAM base/size to scratch registers · 2ac7b223
      Jeetesh Burman authored
      
      
      This patch saves the TZDRAM base and size values to secure scratch
      registers, for the WB0. The WB0 reads these values and uses them to
      verify integrity of the TZDRAM aperture.
      
      Change-Id: I2f5fd11c87804d20e2698de33be977991c9f6f33
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      2ac7b223
  13. 09 Mar, 2020 4 commits
    • Jeetesh Burman's avatar
      Tegra186: add SE support to generate SHA256 of TZRAM · 4eed9c84
      Jeetesh Burman authored
      
      
      The BL3-1 firmware code is stored in TZSRAM on Tegra186 platforms. This
      memory loses power when we enter System Suspend and so its contents are
      stored to TZDRAM, before entry. This opens up an attack vector where the
      TZDRAM contents might be tampered with when we are in the System Suspend
      mode. To mitigate this attack the SE engine calculates the hash of entire
      TZSRAM and stores it in PMC scratch, before we copy data to TZDRAM. The
      WB0 code will validate the TZDRAM and match the hash with the one in PMC
      scratch.
      
      This patch adds driver for the SE engine, with APIs to calculate the hash
      and store SE SHA256 hash-result to PMC scratch registers.
      
      Change-Id: Ib487d5629225d3d99bd35d44f0402d6d3cf27ddf
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      4eed9c84
    • Jeetesh Burman's avatar
      Tegra186: add support for bpmp_ipc driver · 3827aa8a
      Jeetesh Burman authored
      
      
      This patch enables the bpmp-ipc driver for Tegra186 platforms,
      to ask BPMP firmware to toggle SE clock.
      
      Change-Id: Ie63587346c4d9b7e54767dbee17d0139fa2818ae
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      3827aa8a
    • Harvey Hsieh's avatar
      Tegra210: SE: add context save support · 41554fb2
      Harvey Hsieh authored
      
      
      Tegra210B01 SoCs support atomic context save for the two SE
      hardware engines. Tegra210 SoCs have support for only one SE
      engine and support a software based save/restore mechanism
      instead.
      
      This patch updates the SE driver to make this change.
      
      Change-Id: Ia5e5ed75d0fe011f17809684bbc2ed2338925946
      Signed-off-by: default avatarHarvey Hsieh <hhsieh@nvidia.com>
      41554fb2
    • kalyani chidambaram's avatar
      Tegra210: update the PMC blacklisted registers · 24902fae
      kalyani chidambaram authored
      
      
      Update the list to include PMC registers that the NS world cannot
      access even with smc calls.
      
      Change-Id: I588179b56ebc0c29200b55e6d61535fd3a7a3b7e
      Signed-off-by: default avatarkalyani chidambaram <kalyanic@nvidia.com>
      24902fae
  14. 25 Feb, 2020 1 commit
  15. 20 Feb, 2020 2 commits
    • Varun Wadekar's avatar
      Tegra: handler to check support for System Suspend · 5d52aea8
      Varun Wadekar authored
      
      
      Tegra210 SoCs need the sc7entry-fw to enter System Suspend mode,
      but there might be certain boards that do not have this firmware
      blob. To stop the NS world from issuing System suspend entry
      commands on such devices, we ned to disable System Suspend from
      the PSCI "features".
      
      This patch removes the System suspend handler from the Tegra PSCI
      ops, so that the framework will disable support for "System Suspend"
      from the PSCI "features".
      
      Original change by: kalyani chidambaram <kalyanic@nvidia.com>
      
      Change-Id: Ie029f82f55990a8b3a6debb73e95e0e218bfd1f5
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      5d52aea8
    • Varun Wadekar's avatar
      Tegra: platform handler to relocate BL32 image · 6f47acdb
      Varun Wadekar authored
      
      
      This patch provides platforms an opportunity to relocate the
      BL32 image, during cold boot. Tegra186 platforms, for example,
      relocate BL32 images to TZDRAM memory as the previous bootloader
      relies on BL31 to do so.
      
      Change-Id: Ibb864901e43aca5bf55d8c79e918b598c12e8a28
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      6f47acdb