1. 23 Feb, 2017 7 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: allow individual SoCs to restore their settings · 102e4087
      Varun Wadekar authored
      
      
      This patch uses the Memory controller driver's handler to restore
      its settings and moves the other chip specific code to their own
      'pwr_domain_on_finish' handlers.
      
      Change-Id: I3c9d23bdab9e2e3c05034ff6812cf941ccd7a75e
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      102e4087
    • Varun Wadekar's avatar
      Tegra: enable PSCI extended state ID processing · 990c1e01
      Varun Wadekar authored
      
      
      This patch enables the PSCI_EXTENDED_STATE_ID macro. Tegra platforms
      have moved on to using the extended state ID for CPU_SUSPEND, where
      the NS world passes the state ID and wakeup time as part of the
      state ID field.
      
      Change-Id: Ie8b0fec285d8b2330bc26ff239a4f628425c9fcf
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      990c1e01
    • 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
    • Varun Wadekar's avatar
      Tegra: PM: soc-specific system off handler · 31a4957c
      Varun Wadekar authored
      
      
      This patch introduces a power down handler which can be overriden
      by SoCs to customise the power down process. The current SoCs do
      not have a way of powering down the entire system as external PMIC
      chips are involved in the process.
      
      But future SoCs will have a way to power off the entire system
      without talking to an external PMIC.
      
      Change-Id: Ie7750714141a29cb0a1a616fafc531c4f11d0985
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      31a4957c
    • Varun Wadekar's avatar
      Tegra: handlers for common and SoC-specific SiP calls · d288ab24
      Varun Wadekar authored
      
      
      This patch implements a handler for common SiP calls. A weak
      implementation for the SoC-specific handler has been provided
      which can be overridden by SoCs to implement any custom SiP
      calls.
      
      Change-Id: I45122892a84ea35d7b44be0f35dc15f6bb95193e
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      d288ab24
  2. 22 Feb, 2017 8 commits
  3. 06 Feb, 2017 2 commits
    • Douglas Raillard's avatar
      Replace some memset call by zeromem · 32f0d3c6
      Douglas Raillard authored
      
      
      Replace all use of memset by zeromem when zeroing moderately-sized
      structure by applying the following transformation:
      memset(x, 0, sizeof(x)) => zeromem(x, sizeof(x))
      
      As the Trusted Firmware is compiled with -ffreestanding, it forbids the
      compiler from using __builtin_memset and forces it to generate calls to
      the slow memset implementation. Zeromem is a near drop in replacement
      for this use case, with a more efficient implementation on both AArch32
      and AArch64.
      
      Change-Id: Ia7f3a90e888b96d056881be09f0b4d65b41aa79e
      Signed-off-by: default avatarDouglas Raillard <douglas.raillard@arm.com>
      32f0d3c6
    • Douglas Raillard's avatar
      Introduce unified API to zero memory · 308d359b
      Douglas Raillard authored
      
      
      Introduce zeromem_dczva function on AArch64 that can handle unaligned
      addresses and make use of DC ZVA instruction to zero a whole block at a
      time. This zeroing takes place directly in the cache to speed it up
      without doing external memory access.
      
      Remove the zeromem16 function on AArch64 and replace it with an alias to
      zeromem. This zeromem16 function is now deprecated.
      
      Remove the 16-bytes alignment constraint on __BSS_START__ in
      firmware-design.md as it is now not mandatory anymore (it used to comply
      with zeromem16 requirements).
      
      Change the 16-bytes alignment constraints in SP min's linker script to a
      8-bytes alignment constraint as the AArch32 zeromem implementation is now
      more efficient on 8-bytes aligned addresses.
      
      Introduce zero_normalmem and zeromem helpers in platform agnostic header
      that are implemented this way:
      * AArch32:
      	* zero_normalmem: zero using usual data access
      	* zeromem: alias for zero_normalmem
      * AArch64:
      	* zero_normalmem: zero normal memory  using DC ZVA instruction
      	                  (needs MMU enabled)
      	* zeromem: zero using usual data access
      
      Usage guidelines: in most cases, zero_normalmem should be preferred.
      
      There are 2 scenarios where zeromem (or memset) must be used instead:
      * Code that must run with MMU disabled (which means all memory is
        considered device memory for data accesses).
      * Code that fills device memory with null bytes.
      
      Optionally, the following rule can be applied if performance is
      important:
      * Code zeroing small areas (few bytes) that are not secrets should use
        memset to take advantage of compiler optimizations.
      
        Note: Code zeroing security-related critical information should use
        zero_normalmem/zeromem instead of memset to avoid removal by
        compilers' optimizations in some cases or misbehaving versions of GCC.
      
      Fixes ARM-software/tf-issues#408
      
      Change-Id: Iafd9663fc1070413c3e1904e54091cf60effaa82
      Signed-off-by: default avatarDouglas Raillard <douglas.raillard@arm.com>
      308d359b
  4. 18 Jan, 2017 1 commit
  5. 09 Aug, 2016 1 commit
  6. 19 Jul, 2016 1 commit
    • Soby Mathew's avatar
      Include `plat_psci_common.c` from the new location · bb2162f1
      Soby Mathew authored
      The `plat_psci_common.c` was moved to the new location `plat/common`
      and a stub file was retained at previous location for compatibility. This
      patch modifies the platform makefiles to include the file from the new
      location.
      
      Change-Id: Iabddeeb824e9a5d72d176d7c644735966c8c0699
      bb2162f1
  7. 13 Apr, 2016 1 commit
    • Soby Mathew's avatar
      Migrate platform ports to the new xlat_tables library · 3e4b8fdc
      Soby Mathew authored
      This patch modifies the upstream platform port makefiles to use the new
      xlat_tables library files. This patch also makes mmap region setup common
      between AArch64 and AArch32 for FVP platform port. The file `fvp_common.c`
      is moved from the `plat/arm/board/fvp/aarch64` folder to the parent folder
      as it is not specific to AArch64.
      
      Change-Id: Id2e9aac45e46227b6f83cccfd1e915404018ea0b
      3e4b8fdc
  8. 21 Jan, 2016 1 commit
    • Juan Castillo's avatar
      Disable PL011 UART before configuring it · 9400b40e
      Juan Castillo authored
      The PL011 TRM (ARM DDI 0183G) specifies that the UART must be
      disabled before any of the control registers are programmed. The
      PL011 driver included in TF does not disable the UART, so the
      initialization in BL2 and BL31 is violating this requirement
      (and potentially in BL1 if the UART is enabled after reset).
      
      This patch modifies the initialization function in the PL011
      console driver to disable the UART before programming the
      control registers.
      
      Register clobber list and documentation updated.
      
      Fixes ARM-software/tf-issues#300
      
      Change-Id: I839b2d681d48b03f821ac53663a6a78e8b30a1a1
      9400b40e
  9. 04 Dec, 2015 1 commit
  10. 25 Nov, 2015 1 commit
  11. 10 Nov, 2015 1 commit
  12. 14 Sep, 2015 1 commit
    • Vikram Kanigiri's avatar
      Tegra: Perform cache maintenance on video carveout memory · e3616819
      Vikram Kanigiri authored
      Currently, the non-overlapping video memory carveout region is cleared after
      disabling the MMU at EL3. If at any exception level the carveout region is being
      marked as cacheable, this zeroing of memory will not have an affect on the
      cached lines. Hence, we first invalidate the dirty lines and update the memory
      and invalidate again so that both caches and memory is zeroed out.
      
      Change-Id: If3b2d139ab7227f6799c0911d59e079849dc86aa
      e3616819
  13. 26 Aug, 2015 1 commit
  14. 24 Aug, 2015 1 commit
    • Varun Wadekar's avatar
      Tegra210: wait for 512 timer ticks before retention entry · b42192bc
      Varun Wadekar authored
      
      
      This patch programs the CPUECTLR_EL1 and L2ECTLR_EL1 registers,
      so that the core waits for 512 generic timer CNTVALUEB ticks before
      entering retention state, after executing a WFI instruction.
      
      This functionality is configurable and can be enabled for platforms
      by setting the newly defined 'ENABLE_L2_DYNAMIC_RETENTION' and
      'ENABLE_CPU_DYNAMIC_RETENTION' flag.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      b42192bc
  15. 11 Aug, 2015 1 commit
  16. 31 Jul, 2015 1 commit
  17. 24 Jul, 2015 3 commits
  18. 17 Jul, 2015 6 commits
  19. 06 Jul, 2015 1 commit