1. 18 Jan, 2019 3 commits
    • 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
  2. 16 Jan, 2019 3 commits
  3. 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
  4. 28 Sep, 2018 1 commit
  5. 22 Aug, 2018 1 commit
  6. 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
  7. 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
  8. 22 Feb, 2018 1 commit
  9. 14 Jul, 2017 1 commit
  10. 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
  11. 03 May, 2017 1 commit
  12. 01 May, 2017 3 commits
  13. 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
  14. 03 Mar, 2017 1 commit
  15. 02 Mar, 2017 2 commits
  16. 28 Feb, 2017 7 commits
  17. 23 Feb, 2017 3 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
    • Varun Wadekar's avatar
      Tegra: enable runtime console · 25caa16d
      Varun Wadekar authored
      
      
      This patch enables the runtime console for all Tegra platforms
      before exiting BL31. This would enable debug/error prints to be
      always displayed on the UART console.
      
      Change-Id: Ic48d61d05b0ab07973d6fc2dc6b68733a42a3f63
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      25caa16d
  18. 22 Feb, 2017 3 commits
    • Varun Wadekar's avatar
      Tegra: init normal/crash console for platforms · e1084216
      Varun Wadekar authored
      
      
      The BL2 fills in the UART controller ID to be used as the normal as
      well as the crash console on Tegra platforms. The controller ID to
      UART controller base address mapping is handled by each Tegra SoC
      the base addresses might change across Tegra chips.
      
      This patch adds the handler to parse the platform params to get the
      UART ID for the per-soc handlers.
      
      Change-Id: I4d167b20a59aaf52a31e2a8edf94d8d6f89598fa
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e1084216
    • Varun Wadekar's avatar
      Tegra: add tzdram_base to plat_params_from_bl2 struct · e0d4158c
      Varun Wadekar authored
      
      
      This patch adds another member, tzdram_base, to the plat_params_from_bl2 struct
      in order to store the TZDRAM carveout base address used to load the Trusted OS.
      The monitor programs the memory controller with the TZDRAM base and size in order
      to deny any accesses from the NS world.
      
      Change-Id: If39b8674d548175d7ccb6525c18d196ae8a8506c
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e0d4158c
    • Varun Wadekar's avatar
      Tegra: sanity check members of the "from_bl2" struct · 08cefa98
      Varun Wadekar authored
      
      
      This patch checks that the pointers to BL3-3 and BL3-2 ep_info
      structs are valid before accessing them. Add some INFO prints
      in the BL3-1 setup path for early debugging purposes.
      
      Change-Id: I62b23fa870f1b2fb783c8de69aab819f1749d15a
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      08cefa98
  19. 18 Jan, 2017 1 commit
  20. 11 Aug, 2015 1 commit
  21. 31 Jul, 2015 1 commit
  22. 17 Jul, 2015 1 commit