1. 20 Jun, 2019 1 commit
  2. 31 Jan, 2019 2 commits
    • Varun Wadekar's avatar
      Tegra: support for System Suspend using sc7entry-fw binary · 3ca3c27c
      Varun Wadekar authored
      
      
      This patch adds support to enter System Suspend on Tegra210 platforms
      without the traditional BPMP firmware. The BPMP firmware will no longer
      be supported on Tegra210 platforms and its functionality will be
      divided across the CPU and sc7entry-fw.
      
      The sc7entry-fw takes care of performing the hardware sequence required
      to enter System Suspend (SC7 power state) from the COP. The CPU is required
      to load this firmware to the internal RAM of the COP and start the sequence.
      The CPU also make sure that the COP is off after cold boot and is only
      powered on when we want to start the actual System Suspend sequence.
      
      The previous bootloader loads the firmware to TZDRAM and passes its base and
      size as part of the boot parameters. The EL3 layer is supposed to sanitize
      the parameters before touching the firmware blob.
      
      To assist the warmboot code with the PMIC discovery, EL3 is also supposed to
      program PMC's scratch register #210, with appropriate values. Without these
      settings the warmboot code wont be able to get the device out of System
      Suspend.
      
      Change-Id: I5a7b868512dbfd6cfefd55acf3978a1fd7ebf1e2
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      3ca3c27c
    • Varun Wadekar's avatar
      Tegra: organize memory/mmio apertures to decrease memmap latency · 26cf0849
      Varun Wadekar authored
      
      
      This patch organizes the memory and mmio maps linearly, to make the
      mmap_add_region process faster. The microsecond timer has been moved
      to individual platforms instead of making it a common step, as it
      further speeds up the memory map creation process.
      
      Change-Id: I6fdaee392f7ac5d99daa182380ca9116a001f5d6
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      26cf0849
  3. 23 Jan, 2019 2 commits
  4. 18 Jan, 2019 6 commits
    • Harvey Hsieh's avatar
      Tegra: memctrl: clean MC INT status before exit to bootloader · 650d9c52
      Harvey Hsieh authored
      
      
      This patch cleans the Memory controller's interrupt status
      register, before exiting to the non-secure world during
      cold boot. This is required as we observed that the MC's
      arbitration bit is set before exiting the secure world.
      
      Change-Id: Iacd01994d03b3b9cbd7b8a57fe7ab5b04e607a9f
      Signed-off-by: default avatarHarvey Hsieh <hhsieh@nvidia.com>
      650d9c52
    • Varun Wadekar's avatar
      Tegra: trusty: pass profiling base to Trusted OS · db82b619
      Varun Wadekar authored
      
      
      * Previous boot loader passes Shared DRAM address
        to be used by Trusted OS to dump its boot timing records
      * This patch adds support to pass the parameter
        to Trusted OS during cold boot
      
      Change-Id: I9f95bb6de80b1bbd2d2d6ec42619f895d911b8ed
      Signed-off-by: default avatarAkshay Sharan <asharan@nvidia.com>
      db82b619
    • Varun Wadekar's avatar
      Tegra: lib: library for profiling the cold boot path · 087cf68a
      Varun Wadekar authored
      
      
      The non secure world would like to profile the boot path for
      the EL3 and S-EL1 firmwares. To allow it to do that, a non-secure
      DRAM region (4K) is allocated and the base address is passed to
      the EL3 firmware.
      
      This patch adds a library to allow the platform code to store the
      tag:timestamp pair to the shared memory. The tegra platform code
      then uses the `record` method to add timestamps.
      
      Original change by Akshay Sharan <asharan@nvidia.com>
      
      Change-Id: Idbbef9c83ed84a508b04d85a6637775960dc94ba
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      087cf68a
    • Varun Wadekar's avatar
      Tegra: sanity check non-secure DRAM address · 6460ed7a
      Varun Wadekar authored
      
      
      This patch fixes the logic to validate if a non-secure memory address
      overlaps the TZDRAM memory aperture.
      
      Change-Id: I68af7dc6acc705d7b0ee9161c4002376077b46b1
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      6460ed7a
    • Anthony Zhou's avatar
      Tegra: common: fix defects flagged by MISRA scan · 4c994002
      Anthony Zhou authored
      
      
      Macro assert(e) request 'e' is a bool type, if useing other
      type, MISRA report a "The Essential Type Model" violation,
      Add a judgement to fix the defects, if 'e' is not bool type.
      
      Remove unused code [Rule 2.5]
      Fix the essential type model violation [Rule 10.6, 10.7]
      Use local parameter to raplace function parameter [Rule 17.8]
      
      Change-Id: Ifce932addbb0a4b063ef6b38349d886c051d81c0
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      4c994002
    • Varun Wadekar's avatar
      Tegra: fix MISRA defects in tegra_bl31_setup.c · fcf23a14
      Varun Wadekar authored
      
      
      Main fixes:
      
      Add parentheses to avoid implicit operator precedence [Rule 12.1]
      
      Fixed if statement conditional to be essentially boolean [Rule 14.4]
      
      Added curly braces ({}) around if statements in order to
      make them compound [Rule 15.6]
      
      Voided non c-library functions whose return types are not used [Rule 17.7]
      
      Bug 200272157
      
      Change-Id: Ic3ab5a3de95aeb6d2265df940f7fb35ea0f19ab0
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      fcf23a14
  5. 16 Jan, 2019 3 commits
  6. 04 Jan, 2019 1 commit
    • Antonio Nino Diaz's avatar
      Sanitise includes across codebase · 09d40e0e
      Antonio Nino Diaz authored
      Enforce full include path for includes. Deprecate old paths.
      
      The following folders inside include/lib have been left unchanged:
      
      - include/lib/cpus/${ARCH}
      - include/lib/el3_runtime/${ARCH}
      
      The reason for this change is that having a global namespace for
      includes isn't a good idea. It defeats one of the advantages of having
      folders and it introduces problems that are sometimes subtle (because
      you may not know the header you are actually including if there are two
      of them).
      
      For example, this patch had to be created because two headers were
      called the same way: e0ea0928 ("Fix gpio includes of mt8173 platform
      to avoid collision."). More recently, this patch has had similar
      problems: 46f9b2c3 ("drivers: add tzc380 support").
      
      This problem was introduced in commit 4ecca339
      
       ("Move include and
      source files to logical locations"). At that time, there weren't too
      many headers so it wasn't a real issue. However, time has shown that
      this creates problems.
      
      Platforms that want to preserve the way they include headers may add the
      removed paths to PLAT_INCLUDES, but this is discouraged.
      
      Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      09d40e0e
  7. 28 Sep, 2018 1 commit
  8. 22 Aug, 2018 1 commit
  9. 13 Jul, 2018 1 commit
    • Sandrine Bailleux's avatar
      Tegra: Fix up INFO() message · c426fd70
      Sandrine Bailleux authored
      With commit cf24229e
      
       ("Run compiler on debug macros for type
      checking"), the compiler will now always evaluate INFO() macro
      calls, no matter the LOG_LEVEL value. Therefore, any variable
      referenced in the macro has to be be defined.
      
      Address this issue by removing the local variable and using the
      expression it was assigned directly in the INFO() call.
      
      Change-Id: Iedc23b3538c1e162372e85390881e50718e50bf3
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      c426fd70
  10. 27 Mar, 2018 1 commit
    • Joel Hutton's avatar
      Clean usage of void pointers to access symbols · 9f85f9e3
      Joel Hutton authored
      
      
      Void pointers have been used to access linker symbols, by declaring an
      extern pointer, then taking the address of it. This limits symbols
      values to aligned pointer values. To remove this restriction an
      IMPORT_SYM macro has been introduced, which declares it as a char
      pointer and casts it to the required type.
      
      Change-Id: I89877fc3b13ed311817bb8ba79d4872b89bfd3b0
      Signed-off-by: default avatarJoel Hutton <Joel.Hutton@Arm.com>
      9f85f9e3
  11. 22 Feb, 2018 1 commit
  12. 14 Jul, 2017 1 commit
  13. 08 Jun, 2017 1 commit
    • Soren Brinkmann's avatar
      tegra: Fix build errors · d20f189d
      Soren Brinkmann authored
      
      
      The 'impl' variable is guarded by the symbol DEBUG, but used in an INFO
      level print statement. INFO is defined based on LOG_LEVEL. Hence, builds
      would fail when
       - DEBUG=0 && LOG_LEVEL>=LOG_LEVEL_INFO with a variable used but not defined
       - DEBUG=1 && LOG_LEVEL<LOG_LEVEL_INFO with a variable defined but not used
      
      Fixing this by guarding impl with the same condition that guards INFO.
      
      Fixes ARM-software/tf-issues#490
      Signed-off-by: default avatarSoren Brinkmann <soren.brinkmann@xilinx.com>
      d20f189d
  14. 03 May, 2017 1 commit
  15. 01 May, 2017 3 commits
  16. 13 Apr, 2017 2 commits
    • Varun Wadekar's avatar
      Tegra: no need to re-init the same console · e87dac6b
      Varun Wadekar authored
      
      
      This patch stops initialising the same UART console, as a "crash"
      console. The normal and the crash consoles use the same UART port
      and hence the crash console init function now only checks if the
      console is ready to be used.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e87dac6b
    • Varun Wadekar's avatar
      Tegra: memctrl_v1: disable AHB redirection after cold boot · 0c2276e3
      Varun Wadekar authored
      
      
      During boot, USB3 and flash media (SDMMC/SATA) devices need access to
      IRAM. Because these clients connect to the MC and do not have a direct
      path to the IRAM, the MC implements AHB redirection during boot to allow
      path to IRAM. In this mode, accesses to a programmed memory address aperture
      are directed to the AHB bus, allowing access to the IRAM. The AHB aperture
      is defined by the IRAM_BASE_LO and IRAM_BASE_HI registers, which are
      initialized to disable this aperture. Once bootup is complete, we must
      program IRAM base/top, thus disabling access to IRAM.
      
      This patch provides functionality to disable this access. The tegra port
      calls this new function before jumping to the non-secure world during
      cold boot.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      0c2276e3
  17. 03 Mar, 2017 1 commit
  18. 02 Mar, 2017 2 commits
  19. 28 Feb, 2017 7 commits
  20. 23 Feb, 2017 2 commits
    • Varun Wadekar's avatar
      Tegra: memmap BL31's TZDRAM carveout · 260ae46f
      Varun Wadekar authored
      
      
      This patch maps the TZDRAM carveout used by the BL31. In the near
      future BL31 would be running from the TZRAM for security and
      performance reasons. The only downside to this solution is that
      the TZRAM loses its state in System Suspend. So, we map the TZDRAM
      carveout that the BL31 would use to save its state before entering
      System Suspend.
      
      Change-Id: Id5bda7e9864afd270cf86418c703fa61c2cb095f
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      260ae46f
    • Varun Wadekar's avatar
      Tegra: drivers: memctrl: introduce function to secure on-chip TZRAM · 06b19d58
      Varun Wadekar authored
      
      
      This patch introduces a function to secure the on-chip TZRAM memory. The
      Tegra132 and Tegra210 chips do not have a compelling use case to lock the
      TZRAM. The trusted OS owns the TZRAM aperture on these chips and so it
      can take care of locking the aperture. This might not be true for future
      chips and this patch makes the TZRAM programming flexible.
      
      Change-Id: I3ac9f1de1b792ccd23d4ded274784bbab2ea224a
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      06b19d58