1. 22 Mar, 2020 2 commits
  2. 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
  3. 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
  4. 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
  5. 25 Feb, 2020 1 commit
  6. 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
  7. 31 Jan, 2020 2 commits
  8. 23 Jan, 2020 7 commits
  9. 17 Jan, 2020 4 commits
  10. 12 Jan, 2020 1 commit
  11. 09 Jan, 2020 2 commits
  12. 10 Dec, 2019 2 commits
  13. 28 Nov, 2019 4 commits
    • Jeetesh Burman's avatar
      Tegra194: add support to reset GPU · 2d1f1010
      Jeetesh Burman authored
      
      
      This patch adds macros, to define registers required to support GPU
      reset, for Tegra194 SoCs.
      
      Change-Id: Ifa7e0161b9e8de695a33856193f500b847a03526
      Signed-off-by: default avatarJeetesh Burman <jburman@nvidia.com>
      2d1f1010
    • Steven Kao's avatar
      Tegra194: memctrl: fix logic to check TZDRAM config register access · 95397d96
      Steven Kao authored
      
      
      This patch fixes the logic to check if the previous bootloader has
      disabled access to the TZDRAM configuration registers. The polarity
      for the bit was incorrect in the previous check.
      
      Change-Id: I7a0ba4f7b1714997508ece904c0261ca2c901a03
      Signed-off-by: default avatarSteven Kao <skao@nvidia.com>
      95397d96
    • Varun Wadekar's avatar
      Tegra: introduce plat_enable_console() · 117dbe6c
      Varun Wadekar authored
      
      
      This patch introduces the 'plat_enable_console' handler to allow
      the platform to enable the right console. Tegra194 platform supports
      multiple console, while all the previous platforms support only one
      console.
      
      For Tegra194 platforms, the previous bootloader checks the platform
      config and sets the uart-id boot parameter, to 0xFE. On seeing this
      boot parameter, the platform port uses the proper memory aperture
      base address to communicate with the SPE. This functionality is
      currently protected by a platform macro, ENABLE_CONSOLE_SPE.
      
      Change-Id: I3972aa376d66bd10d868495f561dc08fe32fcb10
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      117dbe6c
    • Varun Wadekar's avatar
      Tegra: include: drivers: introduce spe.h · f0222c23
      Varun Wadekar authored
      
      
      This patch introduces a header file for the spe-console driver. This
      file currently provides a device struct and a registration function
      call for clients.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: Ic65c056f5bd60871d8a3f44f2c1210035f878799
      f0222c23