1. 13 Apr, 2017 1 commit
  2. 07 Apr, 2017 3 commits
    • Varun Wadekar's avatar
      Tegra: allow platforms to override plat_core_pos_by_mpidr() · ae8ac2d2
      Varun Wadekar authored
      
      
      This patch makes the default implementation of plat_core_pos_by_mpidr()
      as weakly linked, so that platforms can override it with their own.
      
      Tegra186, for one, does not have CPU IDs 2 and 3, so it has its own
      implementation of plat_core_pos_by_mpidr().
      
      Change-Id: I7a5319869c01ede3775386cb95af1431792f74b3
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      ae8ac2d2
    • Varun Wadekar's avatar
      Tegra: memctrl_v2: config to enable SMMU device · 16c7cd01
      Varun Wadekar authored
      
      
      This patch adds a config to the memory controller driver to enable SMMU
      device init during boot. Tegra186 platforms keeps it enabled by default,
      but future platforms might not support it.
      
      Change-Id: Iebe1c60a25fc1cfb4c97a507e121d6685a49cb83
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      16c7cd01
    • Varun Wadekar's avatar
      Tegra186: read activity monitor's clock counter values · 691bc22d
      Varun Wadekar authored
      
      
      This patch adds a new SMC function ID to read the refclk and coreclk
      clock counter values from the Activity Monitor. The non-secure world
      requires this information to calculate the CPU's frequency.
      
      Formula: "freq = (delta_coreclk / delta_refclk) * refclk_freq"
      
      The following CPU registers have to be set by the non-secure driver
      before issuing the SMC:
      
      X1 = MPIDR of the target core
      X2 = MIDR of the target core
      
      Change-Id: I296d835def1f5788c17640c0c456b8f8f0e90824
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      691bc22d
  3. 30 Mar, 2017 6 commits
  4. 23 Mar, 2017 2 commits
    • Varun Wadekar's avatar
      Tegra186: check MCE firmware version during boot · 5cb89c56
      Varun Wadekar authored
      
      
      This patch checks that the system is running with the supported MCE
      firmware during boot. In case the firmware version does not match the
      interface header version, then the system halts.
      
      Change-Id: Ib82013fd1c1668efd6f0e4f36cd3662d339ac076
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      5cb89c56
    • Varun Wadekar's avatar
      Tegra186: re-configure MSS' client settings · e64ce3ab
      Varun Wadekar authored
      
      
      This patch reprograms MSS to make ROC deal with ordering of
      MC traffic after boot and system suspend exit. This is needed
      as device boots with MSS having all control but POR wants ROC
      to deal with the ordering. Performance is expected to improve
      with ROC but since no one has really tested the performance,
      keep the option configurable for now by introducing a platform
      level makefile variable.
      
      Change-Id: I2e782fea138ccf9d281eb043a6b2c3bb97c839a7
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e64ce3ab
  5. 22 Mar, 2017 1 commit
    • Varun Wadekar's avatar
      Tegra186: implement support for System Suspend · 50402b17
      Varun Wadekar authored
      
      
      This patch adds the chip level support for System Suspend entry
      and exit. As part of the entry sequence we first query the MCE
      firmware to check if it is safe to enter system suspend. Once
      we get a green light, we save hardware block settings and enter
      the power state. As expected, all the hardware settings are
      restored once we exit the power state.
      
      Change-Id: I6d192d7568d6a555eb10efdfd45f6d79c20f74ea
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      50402b17
  6. 20 Mar, 2017 5 commits
  7. 28 Feb, 2017 1 commit
    • Varun Wadekar's avatar
      Tegra: GIC: enable FIQ interrupt handling · d3360301
      Varun Wadekar authored
      
      
      Tegra chips support multiple FIQ interrupt sources. These interrupts
      are enabled in the GICD/GICC interfaces by the tegra_gic driver. A
      new FIQ handler would be added in a subsequent change which can be
      registered by the platform code.
      
      This patch adds the GIC programming as part of the tegra_gic_setup()
      which now takes an array of all the FIQ interrupts to be enabled for
      the platform. The Tegra132 and Tegra210 platforms right now do not
      register for any FIQ interrupts themselves, but will definitely use
      this support in the future.
      
      Change-Id: I0ea164be901cd6681167028fea0567399f18d4b8
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      d3360301
  8. 22 Feb, 2017 1 commit
    • 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
  9. 20 May, 2016 1 commit
  10. 21 Apr, 2016 1 commit
    • Yatharth Kochar's avatar
      Move `plat_get_syscnt_freq()` to arm_common.c · c073fda1
      Yatharth Kochar authored
      This patch moves the definition for `plat_get_syscnt_freq()`
      from arm_bl31_setup.c to arm_common.c. This could be useful
      in case a delay timer needs to be installed based on the
      generic timer in other BLs.
      This patch also modifies the return type for this function
      from `uint64_t` to `unsigned long long` within ARM and other
      platform files.
      
      Change-Id: Iccdfa811948e660d4fdcaae60ad1d700e4eda80d
      c073fda1
  11. 04 Dec, 2015 1 commit
  12. 24 Jul, 2015 1 commit
    • Varun Wadekar's avatar
      Tegra: Support for Tegra's T132 platforms · e7d4caa2
      Varun Wadekar authored
      
      
      This patch implements support for T132 (Denver CPU) based Tegra
      platforms.
      
      The following features have been added:
      
      * SiP calls to switch T132 CPU's AARCH mode
      * Complete PSCI support, including 'System Suspend'
      * Platform specific MMIO settings
      * Locking of CPU vector registers
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e7d4caa2
  13. 29 May, 2015 1 commit
    • Varun Wadekar's avatar
      Support for NVIDIA's Tegra T210 SoCs · 08438e24
      Varun Wadekar authored
      
      
      T210 is the latest chip in the Tegra family of SoCs from NVIDIA. It is an
      ARM v8 dual-cluster (A57/A53) SoC, with any one of the clusters being active
      at a given point in time.
      
      This patch adds support to boot the Trusted Firmware on T210 SoCs. The patch
      also adds support to boot secondary CPUs, enter/exit core power states for
      all CPUs in the slow/fast clusters. The support to switch between clusters
      is still not available in this patch and would be available later.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      08438e24
  14. 31 Mar, 2015 1 commit
  15. 15 Aug, 2014 1 commit
    • Achin Gupta's avatar
      Unmask SError interrupt and clear SCR_EL3.EA bit · 0c8d4fef
      Achin Gupta authored
      This patch disables routing of external aborts from lower exception levels to
      EL3 and ensures that a SError interrupt generated as a result of execution in
      EL3 is taken locally instead of a lower exception level.
      
      The SError interrupt is enabled in the TSP code only when the operation has not
      been directly initiated by the normal world. This is to prevent the possibility
      of an asynchronous external abort which originated in normal world from being
      taken when execution is in S-EL1.
      
      Fixes ARM-software/tf-issues#153
      
      Change-Id: I157b996c75996d12fd86d27e98bc73dd8bce6cd5
      0c8d4fef
  16. 28 Jul, 2014 1 commit
    • Achin Gupta's avatar
      Simplify management of SCTLR_EL3 and SCTLR_EL1 · ec3c1003
      Achin Gupta authored
      This patch reworks the manner in which the M,A, C, SA, I, WXN & EE bits of
      SCTLR_EL3 & SCTLR_EL1 are managed. The EE bit is cleared immediately after reset
      in EL3. The I, A and SA bits are set next in EL3 and immediately upon entry in
      S-EL1. These bits are no longer managed in the blX_arch_setup() functions. They
      do not have to be saved and restored either. The M, WXN and optionally the C
      bit are set in the enable_mmu_elX() function. This is done during both the warm
      and cold boot paths.
      
      Fixes ARM-software/tf-issues#226
      
      Change-Id: Ie894d1a07b8697c116960d858cd138c50bc7a069
      ec3c1003
  17. 24 Jun, 2014 1 commit
  18. 23 Jun, 2014 1 commit
    • Andrew Thoelke's avatar
      Initialise CPU contexts from entry_point_info · 167a9357
      Andrew Thoelke authored
      Consolidate all BL3-1 CPU context initialization for cold boot, PSCI
      and SPDs into two functions:
      *  The first uses entry_point_info to initialize the relevant
         cpu_context for first entry into a lower exception level on a CPU
      *  The second populates the EL1 and EL2 system registers as needed
         from the cpu_context to ensure correct entry into the lower EL
      
      This patch alters the way that BL3-1 determines which exception level
      is used when first entering EL1 or EL2 during cold boot - this is now
      fully determined by the SPSR value in the entry_point_info for BL3-3,
      as set up by the platform code in BL2 (or otherwise provided to BL3-1).
      
      In the situation that EL1 (or svc mode) is selected for a processor
      that supports EL2, the context management code will now configure all
      essential EL2 register state to ensure correct execution of EL1. This
      allows the platform code to run non-secure EL1 payloads directly
      without requiring a small EL2 stub or OS loader.
      
      Change-Id: If9fbb2417e82d2226e47568203d5a369f39d3b0f
      167a9357
  19. 07 May, 2014 2 commits
    • Andrew Thoelke's avatar
      Correct usage of data and instruction barriers · 8cec598b
      Andrew Thoelke authored
      The current code does not always use data and instruction
      barriers as required by the architecture and frequently uses
      barriers excessively due to their inclusion in all of the
      write_*() helper functions.
      
      Barriers should be used explicitly in assembler or C code
      when modifying processor state that requires the barriers in
      order to enable review of correctness of the code.
      
      This patch removes the barriers from the helper functions and
      introduces them as necessary elsewhere in the code.
      
      PORTING NOTE: check any port of Trusted Firmware for use of
      system register helper functions for reliance on the previous
      barrier behaviour and add explicit barriers as necessary.
      
      Fixes ARM-software/tf-issues#92
      
      Change-Id: Ie63e187404ff10e0bdcb39292dd9066cb84c53bf
      8cec598b
    • Andrew Thoelke's avatar
      Set processor endianness immediately after RESET · 40fd0725
      Andrew Thoelke authored
      SCTLR_EL3.EE is being configured too late in bl1_arch_setup() and
      bl31_arch_setup() after data accesses have already occured on
      the cold and warm boot paths.
      
      This control bit must be configured immediately on CPU reset to
      match the endian state of the firmware (little endian).
      
      Fixes ARM-software/tf-issues#145
      
      Change-Id: Ie12e46fbbed6baf024c30beb50751591bb8c8655
      40fd0725
  20. 06 May, 2014 1 commit
    • Dan Handley's avatar
      Reduce deep nesting of header files · 97043ac9
      Dan Handley authored
      Reduce the number of header files included from other header
      files as much as possible without splitting the files. Use forward
      declarations where possible. This allows removal of some unnecessary
      "#ifndef __ASSEMBLY__" statements.
      
      Also, review the .c and .S files for which header files really need
      including and reorder the #include statements alphabetically.
      
      Fixes ARM-software/tf-issues#31
      
      Change-Id: Iec92fb976334c77453e010b60bcf56f3be72bd3e
      97043ac9
  21. 08 Apr, 2014 2 commits
    • Sandrine Bailleux's avatar
      Define frequency of system counter in platform code · 9e86490f
      Sandrine Bailleux authored
      BL3-1 architecture setup code programs the system counter frequency
      into the CNTFRQ_EL0 register. This frequency is defined by the
      platform, though. This patch introduces a new platform hook that
      the architecture setup code can call to retrieve this information.
      In the ARM FVP port, this returns the first entry of the frequency
      modes table from the memory mapped generic timer.
      
      All system counter setup code has been removed from BL1 as some
      platforms may not have initialized the system counters at this stage.
      The platform specific settings done exclusively in BL1 have been moved
      to BL3-1. In the ARM FVP port, this consists in enabling and
      initializing the System level generic timer. Also, the frequency change
      request in the counter control register has been set to 0 to make it
      explicit it's using the base frequency. The CNTCR_FCREQ() macro has been
      fixed in this context to give an entry number rather than a bitmask.
      
      In future, when support for firmware update is implemented, there
      is a case where BL1 platform specific code will need to program
      the counter frequency. This should be implemented at that time.
      
      This patch also updates the relevant documentation.
      
      It properly fixes ARM-software/tf-issues#24
      
      Change-Id: If95639b279f75d66ac0576c48a6614b5ccb0e84b
      9e86490f
    • Sandrine Bailleux's avatar
      Revert "Move architecture timer setup to platform-specific code" · 65a9c0e9
      Sandrine Bailleux authored
      This reverts commit 1c297bf0
      because it introduced a bug: the CNTFRQ_EL0 register was no
      longer programmed by all CPUs.  bl31_platform_setup() function
      is invoked only in the cold boot path and consequently only
      on the primary cpu.
      
      A subsequent commit will correctly implement the necessary changes
      to the counter frequency setup code.
      
      Fixes ARM-software/tf-issues#125
      
      Conflicts:
      
      	docs/firmware-design.md
      	plat/fvp/bl31_plat_setup.c
      
      Change-Id: Ib584ad7ed069707ac04cf86717f836136ad3ab54
      65a9c0e9
  22. 21 Mar, 2014 1 commit
    • Vikram Kanigiri's avatar
      Remove partially qualified asm helper functions · 6ba0b6d6
      Vikram Kanigiri authored
      Each ARM Trusted Firmware image should know in which EL it is running
      and it should use the corresponding register directly instead of reading
      currentEL and knowing which asm register to read/write
      
      Change-Id: Ief35630190b6f07c8fbb7ba6cb20db308f002945
      6ba0b6d6
  23. 10 Mar, 2014 1 commit
    • Jeenu Viswambharan's avatar
      Move architecture timer setup to platform-specific code · 1c297bf0
      Jeenu Viswambharan authored
      At present, bl1_arch_setup() and bl31_arch_setup() program the counter
      frequency using a value from the memory mapped generic timer. The
      generic timer however is not necessarily present on all ARM systems
      (although it is architected to be present on all server systems).
      
      This patch moves the timer setup to platform-specific code and updates
      the relevant documentation. Also, CNTR.FCREQ is set as the specification
      requires the bit corresponding to the counter's frequency to be set when
      enabling. Since we intend to use the base frequency, set bit 8.
      
      Fixes ARM-software/tf-issues#24
      
      Change-Id: I32c52cf882253e01f49056f47c58c23e6f422652
      1c297bf0
  24. 17 Jan, 2014 2 commits
    • Harry Liebel's avatar
      Do not trap access to floating point registers · 4f603683
      Harry Liebel authored
      Traps when accessing architectural features are disabled by clearing bits
      in CPTR_EL3 during early boot, including accesses to floating point
      registers. The value of this register was previously undetermined, causing
      unwanted traps to EL3. Future EL3 code (for example, context save/restore
      code) may use floating point registers, although they are not used by current
      code.
      
      Also, the '-mgeneral-regs-only' flag is enabled in the GCC settings to
      prevent generation of code that uses floating point registers.
      
      Change-Id: I9a03675f6387bbbee81a6f2c9ccf81150db03747
      4f603683
    • Dan Handley's avatar
      Update year in copyright text to 2014 · e83b0cad
      Dan Handley authored
      Change-Id: Ic7fb61aabae1d515b9e6baf3dd003807ff42da60
      e83b0cad
  25. 05 Dec, 2013 1 commit
    • Dan Handley's avatar
      Enable third party contributions · ab2d31ed
      Dan Handley authored
      - Add instructions for contributing to ARM Trusted Firmware.
      
      - Update copyright text in all files to acknowledge contributors.
      
      Change-Id: I9311aac81b00c6c167d2f8c889aea403b84450e5
      ab2d31ed