1. 24 Jun, 2015 3 commits
  2. 22 Jun, 2015 1 commit
    • Varun Wadekar's avatar
      Add missing features to the Tegra GIC driver · e1e094c7
      Varun Wadekar authored
      
      
      In order to handle secure/non-secure interrupts, overload the plat_ic_*
      functions and copy GIC helper functions from arm_gic.c. Use arm_gic.c
      as the reference to add Tegra's GIC helper functions.
      
      Now that Tegra has its own GIC implementation, we have no use for
      plat_gic.c and arm_gic.c files.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e1e094c7
  3. 19 Jun, 2015 4 commits
  4. 18 Jun, 2015 4 commits
    • danh-arm's avatar
      Merge pull request #320 from danh-arm/rh/timer-api-v10 · 649591bb
      danh-arm authored
      Add delay timer API v10
      649591bb
    • Ryan Harkin's avatar
      FVP: Add SP804 delay timer · b49b3221
      Ryan Harkin authored
      
      
      Add SP804 delay timer support to the FVP BSP.
      
      This commit simply provides the 3 constants needed by the SP804
      delay timer driver and calls sp804_timer_init() in
      bl2_platform_setup(). The BSP does not currently use the delay
      timer functions.
      
      Note that the FVP SP804 is a normal world accessible peripheral
      and should not be used by the secure world after transition
      to the normal world.
      
      Change-Id: I5f91d2ac9eb336fd81943b3bb388860dfb5f2b39
      Co-authored-by: default avatarDan Handley <dan.handley@arm.com>
      b49b3221
    • Ryan Harkin's avatar
      Add SP804 delay timer driver · cc58b2d0
      Ryan Harkin authored
      
      
      Add a delay timer driver for the ARM SP804 dual timer.
      
      This driver only uses the first timer, called timer 1 in the
      SP804 Technical Reference Manual (ARM DDI 0271D).
      
      To use this driver, the BSP must provide three constants:
      
      *   The base address of the SP804 dual timer
      *   The clock multiplier
      *   The clock divider
      
      The BSP is responsible for calling sp804_timer_init(). The SP804
      driver instantiates a constant timer_ops_t and calls the generic
      timer_init().
      
      Change-Id: I49ba0a52bdf6072f403d1d0a20e305151d4bc086
      Co-authored-by: default avatarDan Handley <dan.handley@arm.com>
      cc58b2d0
    • danh-arm's avatar
      Merge pull request #319 from vwadekar/tegra-video-mem-aperture-v3 · 09aa0392
      danh-arm authored
      Reserve a Video Memory aperture in DRAM memory
      09aa0392
  5. 17 Jun, 2015 1 commit
    • Ryan Harkin's avatar
      Add a simple delay timer driver API · 9055c7d1
      Ryan Harkin authored
      
      
      The API is simple. The BSP or specific timer driver creates an
      instance of timer_ops_t, fills in the timer specific data, then calls
      timer_init(). The timer specific data includes a function pointer
      to return the timer value and a clock multiplier/divider. The ratio
      of the multiplier and the divider is the clock frequency in MHz.
      
      After that, mdelay() or udelay() can be called to delay execution for
      the specified time (milliseconds or microseconds, respectively).
      
      Change-Id: Icf8a295e1d25874f789bf28b7412156329dc975c
      Co-authored-by: default avatarDan Handley <dan.handley@arm.com>
      9055c7d1
  6. 12 Jun, 2015 2 commits
  7. 11 Jun, 2015 2 commits
  8. 09 Jun, 2015 4 commits
    • danh-arm's avatar
      Merge pull request #314 from sandrine-bailleux/sb/css-data-structs · 056904cb
      danh-arm authored
      Clarify some CSS data structures
      056904cb
    • danh-arm's avatar
      Merge pull request #312 from jcastillo-arm/jc/tf-issues/308 · 5720b280
      danh-arm authored
      Fix build option 'ARM_TSP_RAM_LOCATION' in user guide
      5720b280
    • Sandrine Bailleux's avatar
      CSS: Remove the constants MHU_SECURE_BASE/SIZE · fe55612b
      Sandrine Bailleux authored
      For CSS based platforms, the constants MHU_SECURE_BASE and
      MHU_SECURE_SIZE used to define the extents of the Trusted Mailboxes.
      As such, they were misnamed because the mailboxes are completely
      unrelated to the MHU hardware.
      
      This patch removes the MHU_SECURE_BASE and MHU_SECURE_SIZE #defines.
      The address of the Trusted Mailboxes is now relative to the base of
      the Trusted SRAM.
      
      This patch also introduces a new constant, SCP_COM_SHARED_MEM_BASE,
      which is the address of the first memory region used for communication
      between AP and SCP. This is used by the BOM and SCPI protocols.
      
      Change-Id: Ib200f057b19816bf05e834d111271c3ea777291f
      fe55612b
    • Sandrine Bailleux's avatar
      CSS: Clarify what the SCP boot config is · 9255da5f
      Sandrine Bailleux authored
      Add a comment explaining what the SCP boot configuration information
      is on CSS based platforms like Juno. Also express its address
      relatively to the base of the Trusted SRAM rather than hard-coding it.
      
      Change-Id: I82cf708a284c8b8212933074ea8c37bdf48b403b
      9255da5f
  9. 08 Jun, 2015 1 commit
    • Juan Castillo's avatar
      Fix build option 'ARM_TSP_RAM_LOCATION' in user guide · e5da24f7
      Juan Castillo authored
      The 'ARM_TSP_RAM_LOCATION_ID' option specified in the user guide
      corresponds to the internal definition not visible to the final
      user. The proper build option is 'ARM_TSP_RAM_LOCATION'. This
      patch fixes it.
      
      Fixes ARM-software/tf-issues#308
      
      Change-Id: Ica8cb72c0c5e8b3503f60b5357d16698e869b1bd
      e5da24f7
  10. 05 Jun, 2015 1 commit
  11. 04 Jun, 2015 3 commits
    • Sandrine Bailleux's avatar
      Introduce PROGRAMMABLE_RESET_ADDRESS build option · bf031bba
      Sandrine Bailleux authored
      This patch introduces a new platform build option, called
      PROGRAMMABLE_RESET_ADDRESS, which tells whether the platform has
      a programmable or fixed reset vector address.
      
      If the reset vector address is fixed then the code relies on the
      platform_get_entrypoint() mailbox mechanism to figure out where
      it is supposed to jump. On the other hand, if it is programmable
      then it is assumed that the platform code will program directly
      the right address into the RVBAR register (instead of using the
      mailbox redirection) so the mailbox is ignored in this case.
      
      Change-Id: If59c3b11fb1f692976e1d8b96c7e2da0ebfba308
      bf031bba
    • Sandrine Bailleux's avatar
      Rationalize reset handling code · 52010cc7
      Sandrine Bailleux authored
      The attempt to run the CPU reset code as soon as possible after reset
      results in highly complex conditional code relating to the
      RESET_TO_BL31 option.
      
      This patch relaxes this requirement a little. In the BL1, BL3-1 and
      PSCI entrypoints code, the sequence of operations is now as follows:
       1) Detect whether it is a cold or warm boot;
       2) For cold boot, detect whether it is the primary or a secondary
          CPU. This is needed to handle multiple CPUs entering cold reset
          simultaneously;
       3) Run the CPU init code.
      
      This patch also abstracts the EL3 registers initialisation done by
      the BL1, BL3-1 and PSCI entrypoints into common code.
      
      This improves code re-use and consolidates the code flows for
      different types of systems.
      
      NOTE: THE FUNCTION plat_secondary_cold_boot() IS NOW EXPECTED TO
      NEVER RETURN. THIS PATCH FORCES PLATFORM PORTS THAT RELIED ON THE
      FORMER RETRY LOOP AT THE CALL SITE TO MODIFY THEIR IMPLEMENTATION.
      OTHERWISE, SECONDARY CPUS WILL PANIC.
      
      Change-Id: If5ecd74d75bee700b1bd718d23d7556b8f863546
      52010cc7
    • Sandrine Bailleux's avatar
      Remove FIRST_RESET_HANDLER_CALL build option · 452b7fa2
      Sandrine Bailleux authored
      This patch removes the FIRST_RESET_HANDLER_CALL build flag and its
      use in ARM development platforms. If a different reset handling
      behavior is required between the first and subsequent invocations
      of the reset handling code, this should be detected at runtime.
      
      On Juno, the platform reset handler is now always compiled in.
      This means it is now executed twice on the cold boot path, first in
      BL1 then in BL3-1, and it has the same behavior in both cases. It is
      also executed twice on the warm boot path, first in BL1 then in the
      PSCI entrypoint code.
      
      Also update the documentation to reflect this change.
      
      NOTE: THIS PATCH MAY FORCE PLATFORM PORTS THAT USE THE
      FIRST_RESET_HANDLER_CALL BUILD OPTION TO FIX THEIR RESET HANDLER.
      
      Change-Id: Ie5c17dbbd0932f5fa3b446efc6e590798a5beae2
      452b7fa2
  12. 03 Jun, 2015 1 commit
  13. 02 Jun, 2015 3 commits
  14. 01 Jun, 2015 1 commit
    • Sandrine Bailleux's avatar
      Always enable CCI coherency in BL3-1 · a6695275
      Sandrine Bailleux authored
      On ARM standard platforms, snoop and DVM requests used to be enabled
      for the primary CPU's cluster only in the first EL3 bootloader.
      In other words, if the platform reset into BL1 then CCI coherency
      would be enabled by BL1 only, and not by BL3-1 again.
      
      However, this doesn't cater for platforms that use BL3-1 along with
      a non-TF ROM bootloader that doesn't enable snoop and DVM requests.
      In this case, CCI coherency is never enabled.
      
      This patch modifies the function bl31_early_platform_setup() on
      ARM standard platforms so that it always enables snoop and DVM
      requests regardless of whether earlier bootloader stages have
      already done it. There is no harm in executing this code twice.
      
      ARM Trusted Firmware Design document updated accordingly.
      
      Change-Id: Idf1bdeb24d2e1947adfbb76a509f10beef224e1c
      a6695275
  15. 29 May, 2015 2 commits
    • 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
    • Varun Wadekar's avatar
      Driver for 16550 UART interface · c13b2e32
      Varun Wadekar authored
      
      
      This patch adds driver for the 16550 UART interface. The driver is exposed
      as a console, which platforms can use to dump their boot/crash logs.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      c13b2e32
  16. 27 May, 2015 1 commit
  17. 20 May, 2015 1 commit
  18. 19 May, 2015 2 commits
    • Achin Gupta's avatar
      Fix reporting of interrupt ID in ARM GIC driver · ca0225a5
      Achin Gupta authored
      The ARM GIC driver treats the entire contents of the GICC_HPPIR as the interrupt
      ID instead of just bits[9:0]. This could result in an SGI being treated as a
      Group 1 interrupt on a GICv2 system.
      
      This patch introduces a mask to retrieve only the ID from a read of GICC_HPPIR,
      GICC_IAR and similar registers. The value read from these registers is masked
      with this constant prior to use as an interrupt ID.
      
      Fixes ARM-software/tf-issues#306
      
      Change-Id: Ie3885157de33b71df9781a41f6ef015a30c4608d
      ca0225a5
    • Dan Handley's avatar
      Fix return type of FVP plat_arm_topology_setup · 12ad4d88
      Dan Handley authored
      Fix the return type of the FVP `plat_arm_topology_setup` function
      to be `void` instead of `int` to match the declaration in
      `plat_arm.h`.
      
      This does not result in any change in behavior.
      
      Change-Id: I62edfa7652b83bd26cffb7d167153959b38e37e7
      12ad4d88
  19. 18 May, 2015 1 commit
  20. 13 May, 2015 2 commits
    • Achin Gupta's avatar
      Fix handling of spurious interrupts in BL3_1 · 5717aae1
      Achin Gupta authored
      There are couple of issues with how the interrupt routing framework in BL3_1
      handles spurious interrupts.
      
      1. In the macro 'handle_interrupt_exception', if a spurious interrupt is
         detected by plat_ic_get_pending_interrupt_type(), then execution jumps to
         'interrupt_exit_\label'. This macro uses the el3_exit() function to return to
         the original exception level. el3_exit() attempts to restore the SPSR_EL3 and
         ELR_EL3 registers with values from the current CPU context. Since these
         registers were not saved in this code path, it programs stale values into
         these registers. This leads to unpredictable behaviour after the execution of
         the ERET instruction.
      
      2. When an interrupt is routed to EL3, it could be de-asserted before the
         GICC_HPPIR is read in plat_ic_get_pending_interrupt_type(). There could be
         another interrupt pending at the same time e.g. a non-secure interrupt. Its
         type will be returned instead of the original interrupt. This would result in
         a call to get_interrupt_type_handler(). The firmware will panic if the
         handler for this type of interrupt has not been registered.
      
      This patch fixes the first problem by saving SPSR_EL3 and ELR_EL3 early in the
      'handle_interrupt_exception' macro, instead of only doing so once the validity
      of the interrupt has been determined.
      
      The second problem is fixed by returning execution back to the lower exception
      level through the 'interrupt_exit_\label' label instead of treating it as an
      error condition. The 'interrupt_error_\label' label has been removed since it is
      no longer used.
      
      Fixes ARM-software/tf-issues#305
      
      Change-Id: I81c729a206d461084db501bb81b44dff435021e8
      5717aae1
    • Soby Mathew's avatar
      PSCI: Set ON_PENDING state early during CPU_ON · 42cae5a1
      Soby Mathew authored
      In the debug build of the function get_power_on_target_afflvl(), there is a
      check to ensure that the CPU is emerging from a SUSPEND or ON_PENDING state.
      The state is checked without acquiring the lock for the CPU node. The state
      could be updated to ON_PENDING in psci_afflvl_on() after the target CPU has
      been powered up. This results in a race condition which could cause the
      check for the ON_PENDING state in get_power_on_target_afflvl() to fail.
      This patch resolves this race condition by setting the state of the target
      CPU to ON_PENDING before the platform port attempts to power it on. The
      target CPU is thus guaranteed to read the correct the state. In case
      the power on operation fails, the state of the CPU is restored to OFF.
      
      Fixes ARM-software/tf-issues#302
      
      Change-Id: I3f2306a78c58d47b1a0fb7e33ab04f917a2d5044
      42cae5a1