1. 01 Sep, 2015 1 commit
    • Vikram Kanigiri's avatar
      Configure all secure interrupts on ARM platforms · a7270d35
      Vikram Kanigiri authored
      ARM TF configures all interrupts as non-secure except those which
      are present in irq_sec_array. This patch updates the irq_sec_array
      with the missing secure interrupts for ARM platforms.
      
      It also updates the documentation to be inline with the latest
      implementation.
      
      Fixes ARM-software/tf-issues#312
      
      Change-Id: I39956c56a319086e3929d1fa89030b4ec4b01fcc
      a7270d35
  2. 22 Jun, 2015 1 commit
    • Soby Mathew's avatar
      PSCI: Add SYSTEM_SUSPEND API support · c0aff0e0
      Soby Mathew authored
      This patch adds support for SYSTEM_SUSPEND API as mentioned in the PSCI 1.0
      specification. This API, on being invoked on the last running core on a
      supported platform, will put the system into a low power mode with memory
      retention.
      
      The psci_afflvl_suspend() internal API has been reused as most of the actions
      to suspend a system are the same as invoking the PSCI CPU_SUSPEND API with the
      target affinity level as 'system'. This API needs the 'power state' parameter
      for the target low power state. This parameter is not passed by the caller of
      the SYSTEM_SUSPEND API. Hence, the platform needs to implement the
      get_sys_suspend_power_state() platform function to provide this information.
      Also, the platform also needs to add support for suspending the system to the
      existing 'plat_pm_ops' functions: affinst_suspend() and
      affinst_suspend_finish().
      
      Change-Id: Ib6bf10809cb4e9b92f463755608889aedd83cef5
      c0aff0e0
  3. 04 Jun, 2015 2 commits
    • 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
  4. 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
  5. 28 Apr, 2015 1 commit
    • Dan Handley's avatar
      Doc updates following platform port reorganization · 4a75b84a
      Dan Handley authored
      Update the User Guide, Porting Guide and Firmware Design documents
      to align them with the recent changes made to the FVP and Juno
      platform ports.
      
      Also fix some other historical inaccuracies.
      
      Change-Id: I37aba4805f9044b1a047996d3e396c75f4a09176
      4a75b84a
  6. 03 Feb, 2015 1 commit
    • Achin Gupta's avatar
      Documentation for version 1.1 · 130ed88d
      Achin Gupta authored
      Final updates to readme.md and change-log.md for ARM Trusted Firmware version
      1.1. Also increment the version in the Makefile.
      
      Change-Id: Ib001a6ec9a9c570985841d06f0ff80ed76c2996b
      130ed88d
  7. 02 Feb, 2015 1 commit
  8. 30 Jan, 2015 1 commit
    • Soby Mathew's avatar
      Fix the Cortex-A57 reset handler register usage · 683f788f
      Soby Mathew authored
      The CPU specific reset handlers no longer have the freedom
      of using any general purpose register because it is being invoked
      by the BL3-1 entry point in addition to BL1. The Cortex-A57 CPU
      specific reset handler was overwriting x20 register which was being
      used by the BL3-1 entry point to save the entry point information.
      This patch fixes this bug by reworking the register allocation in the
      Cortex-A57 reset handler to avoid using x20. The patch also
      explicitly mentions the register clobber list for each of the
      callee functions invoked by the reset handler
      
      Change-Id: I28fcff8e742aeed883eaec8f6c4ee2bd3fce30df
      683f788f
  9. 26 Jan, 2015 3 commits
    • Yatharth Kochar's avatar
      Call reset handlers upon BL3-1 entry. · 79a97b2e
      Yatharth Kochar authored
      This patch adds support to call the reset_handler() function in BL3-1 in the
      cold and warm boot paths when another Boot ROM reset_handler() has already run.
      
      This means the BL1 and BL3-1 versions of the CPU and platform specific reset
      handlers may execute different code to each other. This enables a developer to
      perform additional actions or undo actions already performed during the first
      call of the reset handlers e.g. apply additional errata workarounds.
      
      Typically, the reset handler will be first called from the BL1 Boot ROM. Any
      additional functionality can be added to the reset handler when it is called
      from BL3-1 resident in RW memory. The constant FIRST_RESET_HANDLER_CALL is used
      to identify whether this is the first version of the reset handler code to be
      executed or an overridden version of the code.
      
      The Cortex-A57 errata workarounds are applied only if they have not already been
      applied.
      
      Fixes ARM-software/tf-issue#275
      
      Change-Id: Id295f106e4fda23d6736debdade2ac7f2a9a9053
      79a97b2e
    • Soby Mathew's avatar
      Increment the PSCI VERSION to 1.0 · e8ca7d1e
      Soby Mathew authored
      This patch:
      
         * Bumps the PSCI VERSION to 1.0. This means that
           the PSCI_VERSION API will now return the value 0x00010000
           to indicate the version as 1.0. The firmware remains
           compatible with PSCI v0.2 clients.
      
         * The firmware design guide is updated to document the
           APIs supported by the Trusted Firmware generic code.
      
         * The FVP Device Tree Sources (dts) and Blobs(dtb) are also
           updated to add "psci-1.0" and "psci-0.2" to the list of
           compatible PSCI versions.
      
      Change-Id: Iafc2f549c92651dcd65d7e24a8aae35790d00f8a
      e8ca7d1e
    • Juan Castillo's avatar
      FVP: Allow BL3-2 to sit in the secure region of DRAM · 513dd3a0
      Juan Castillo authored
      This patch allows the secure payload (BL3-2) to be loaded in the
      DRAM region secured by the TrustZone controller (top 16 MB of DRAM1).
      
      The location of BL3-2 can be selected at build time by setting the
      build flag FVP_TSP_RAM_LOCATION to one of the following options:
      
        - 'tsram' : Trusted SRAM (this is the default option)
        - 'tdram' : Trusted DRAM
        - 'dram'  : Secure region in DRAM1 (top 16MB configured by the
                    TrustZone controller)
      
      The number of MMU tables in BL3-2 depends on its location in
      memory: 3 in case it is loaded in DRAM, 2 otherwise.
      
      Documentation updated accordingly.
      
      Fixes ARM-software/tf-issues#212
      
      Change-Id: I371eef3a4159f06a0c9e3c6c1f4c905b2f93803a
      513dd3a0
  10. 22 Jan, 2015 1 commit
    • Soby Mathew's avatar
      Remove coherent memory from the BL memory maps · ab8707e6
      Soby Mathew authored
      This patch extends the build option `USE_COHERENT_MEMORY` to
      conditionally remove coherent memory from the memory maps of
      all boot loader stages. The patch also adds necessary
      documentation for coherent memory removal in firmware-design,
      porting and user guides.
      
      Fixes ARM-Software/tf-issues#106
      
      Change-Id: I260e8768c6a5c2efc402f5804a80657d8ce38773
      ab8707e6
  11. 12 Jan, 2015 1 commit
    • Juan Castillo's avatar
      Juno: Add support for image overlaying in Trusted SRAM · 1217d28d
      Juan Castillo authored
      This patch allows the BL3-1 NOBITS section to overlap the BL1 R/W
      section since the former will always be used after the latter.
      Similarly, the BL3-2 NOBITS section can overlay the BL2 image
      when BL3-2 is loaded in Trusted SRAM.
      
      Due to the current size of the images, there is no actual overlap.
      Nevertheless, this reorganization may help to optimise the Trusted
      SRAM usage when the images size grows.
      
      Note that because BL3-1 NOBITS section is allowed to overlap the
      BL1 R/W section, BL1 global variables will remain valid only until
      execution reaches the BL3-1 entry point during a cold boot.
      
      Documentation updated accordingly.
      
      Fixes ARM-software/tf-issues#254
      
      Change-Id: Id538f4d1c7f1f7858108280fd7b97e138572b879
      1217d28d
  12. 07 Jan, 2015 1 commit
  13. 29 Oct, 2014 1 commit
    • Soby Mathew's avatar
      Optimize Cortex-A57 cluster power down sequence on Juno · 5541bb3f
      Soby Mathew authored
      This patch optimizes the Cortex-A57 cluster power down sequence by not
      flushing the Level1 data cache. The L1 data cache and the L2 unified
      cache are inclusive. A flush of the L2 by set/way flushes any dirty
      lines from the L1 as well. This is a known safe deviation from the
      Cortex-A57 TRM defined power down sequence. This optimization can be
      enabled by the platform through the 'SKIP_A57_L1_FLUSH_PWR_DWN' build
      flag. Each Cortex-A57 based platform must make its own decision on
      whether to use the optimization.
      
      This patch also renames the cpu-errata-workarounds.md to
      cpu-specific-build-macros.md as this facilitates documentation
      of both CPU Specific errata and CPU Specific Optimization
      build macros.
      
      Change-Id: I299b9fe79e9a7e08e8a0dffb7d345f9a00a71480
      5541bb3f
  14. 22 Oct, 2014 1 commit
    • Juan Castillo's avatar
      FVP: keep shared data in Trusted SRAM · 20d51cad
      Juan Castillo authored
      This patch deprecates the build option to relocate the shared data
      into Trusted DRAM in FVP. After this change, shared data is always
      located at the base of Trusted SRAM. This reduces the complexity
      of the memory map and the number of combinations in the build
      options.
      
      Fixes ARM-software/tf-issues#257
      
      Change-Id: I68426472567b9d8c6d22d8884cb816f6b61bcbd3
      20d51cad
  15. 14 Oct, 2014 1 commit
    • Juan Castillo's avatar
      Juno: Reserve some DDR-DRAM for secure use · 740134e6
      Juan Castillo authored
      This patch configures the TrustZone Controller in Juno to split
      the 2GB DDR-DRAM memory at 0x80000000 into Secure and Non-Secure
      regions:
      
      - Secure DDR-DRAM: top 16 MB, except for the last 2 MB which are
        used by the SCP for DDR retraining
      - Non-Secure DDR-DRAM: remaining DRAM starting at base address
      
      Build option PLAT_TSP_LOCATION selects the location of the secure
      payload (BL3-2):
      
      - 'tsram' : Trusted SRAM (default option)
      - 'dram'  : Secure region in the DDR-DRAM (set by the TrustZone
                  controller)
      
      The MMU memory map has been updated to give BL2 permission to load
      BL3-2 into the DDR-DRAM secure region.
      
      Fixes ARM-software/tf-issues#233
      
      Change-Id: I6843fc32ef90aadd3ea6ac4c7f314f8ecbd5d07b
      740134e6
  16. 16 Sep, 2014 1 commit
    • Soby Mathew's avatar
      Add support for specifying pre-built BL binaries in Makefile · 27713fb4
      Soby Mathew authored
      This patch adds support for supplying pre-built BL binaries for BL2,
      BL3-1 and BL3-2 during trusted firmware build. Specifying BLx = <path_to_BLx>
      in the build command line, where 'x' is any one of BL2, BL3-1 or BL3-2, will
      skip building that BL stage from source and include the specified binary in
      final fip image.
      
      This patch also makes BL3-3 binary for FIP optional depending on the
      value of 'NEED_BL33' flag which is defined by the platform.
      
      Fixes ARM-software/tf-issues#244
      Fixes ARM-software/tf-issues#245
      
      Change-Id: I3ebe1d4901f8b857e8bb51372290978a3323bfe7
      27713fb4
  17. 27 Aug, 2014 2 commits
  18. 20 Aug, 2014 1 commit
  19. 14 Aug, 2014 1 commit
    • Juan Castillo's avatar
      FVP: make usage of Trusted DRAM optional at build time · 186c1d4b
      Juan Castillo authored
      This patch groups the current contents of the Trusted DRAM region at
      address 0x00_0600_0000 (entrypoint mailboxes and BL3-1 parameters) in
      a single shared memory area that may be allocated to Trusted SRAM
      (default) or Trusted DRAM at build time by setting the
      FVP_SHARED_DATA_LOCATION make variable. The size of this shared
      memory is 4096 bytes.
      
      The combination 'Shared data in Trusted SRAM + TSP in Trusted DRAM'
      is not currently supported due to restrictions in the maximum number
      of mmu tables that can be created.
      
      Documentation has been updated to reflect these changes.
      
      Fixes ARM-software/tf-issues#100
      
      Change-Id: I26ff04d33ce4cacf8d770d1a1e24132b4fc53ff0
      186c1d4b
  20. 11 Aug, 2014 1 commit
    • Soby Mathew's avatar
      Add compilation macro for each BL stage · 27905d0a
      Soby Mathew authored
      This patch defines a compile time macro for each boot loader stage
      which allows compilation of code only for a specific stage.
      
      Change-Id: I3a4068404cd3dc26d652556ca9ca7afea8dd28ef
      27905d0a
  21. 01 Aug, 2014 1 commit
    • Vikram Kanigiri's avatar
      Support asynchronous method for BL3-2 initialization · faaa2e76
      Vikram Kanigiri authored
      This patch adds support for BL3-2 initialization by asynchronous
      method where BL3-1 transfers control to BL3-2 using world switch.
      After BL3-2 initialization, it transfers control to BL3-3 via SPD
      service handler. The SPD service handler initializes the CPU context
      to BL3-3 entrypoint depending on the return function indentifier from
      TSP initialization.
      
      Fixes ARM-software/TF-issues#184
      
      Change-Id: I7b135c2ceeb356d3bb5b6a287932e96ac67c7a34
      faaa2e76
  22. 11 Jul, 2014 1 commit
    • Sandrine Bailleux's avatar
      Update the documentation about the memory layout on FVP · 46d49f63
      Sandrine Bailleux authored
      Update the "Memory layout on FVP platforms" section in the Firmware
      Design document to reflect the overlaying of BL1 and BL2 images
      by BL3-1 and BL3-2.
      
      Also update the Porting Guide document to mention the
      BL31_PROGBITS_LIMIT and BL32_PROGBITS_LIMIT constants.
      
      Change-Id: I0b23dae5b5b4490a01be7ff7aa80567cff34bda8
      46d49f63
  23. 03 Jun, 2014 2 commits
  24. 02 Jun, 2014 1 commit
  25. 23 May, 2014 1 commit
    • Sandrine Bailleux's avatar
      doc: Update information about the memory layout · 638363eb
      Sandrine Bailleux authored
      Rework the "Memory layout on FVP platforms" section in the Firmware
      Design document. Add information about where the TSP image fits
      in the memory layout when present.
      
      Add documentation for the base addresses of each bootloader image
      in the porting guide.
      
      Change-Id: I4afb2605e008a1cb28c44a697804f2cb6bb4c9aa
      638363eb
  26. 19 May, 2014 1 commit
    • Harry Liebel's avatar
      Improve BL3-0 documentation · 36eb6a75
      Harry Liebel authored
      Provide some information about the expected use of BL3-0.
      
      Fixes ARM-software/tf-issues#144
      
      Change-Id: I5c8d59a675578394be89481ae4ec39ca37522750
      36eb6a75
  27. 24 Apr, 2014 1 commit
  28. 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
  29. 26 Mar, 2014 1 commit
    • Vikram Kanigiri's avatar
      Initialise UART console in all bootloader stages · 0796fe01
      Vikram Kanigiri authored
      This patch reworks the console driver to ensure that each bootloader stage
      initializes it independently. As a result, both BL3-1 and BL2 platform code
      now calls console_init() instead of relying on BL1 to perform console setup
      
      Fixes ARM-software/tf-issues#120
      
      Change-Id: Ic4d66e0375e40a2fc7434afcabc8bbb4715c14ab
      0796fe01
  30. 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
  31. 28 Feb, 2014 4 commits
    • Dan Handley's avatar
      Consolidate design and porting documentation · 57de6d72
      Dan Handley authored
      Consolidate firmware-design.md and porting-guide.pm so
      that recently added sections fit better with
      pre-existing sections. Make the documentation more
      consistent in use of terminology.
      
      Change-Id: Id87050b096122fbd845189dc2fe1cd17c3003468
      57de6d72
    • Dan Handley's avatar
      Add EL3 runtime services and SPD documentation · 5e1e9200
      Dan Handley authored
      1. Add design information on EL3 runtime services and
      Secure-EL1 Payload Dispatchers (SPD) to
      firmware-design.md.
      
      2. Create new EL3 runtime service writer's guide
      (rt-svc-writers-guide.md) to ease creation of new
      runtime services.
      
      Change-Id: I670aeb5fc246e25c6e599a15139aac886a0074fd
      5e1e9200
    • Dan Handley's avatar
      Separate firmware design out of user-guide.md · 247f60bc
      Dan Handley authored
      Move the firmware design documentation out of user-guide.md
      and into a new file - firmware-design.md. Reformat the
      section headers.
      
      Change-Id: I664815dd47011c7c1cf2202aa4472a8fd78ebb92
      247f60bc
    • Dan Handley's avatar
      Update versions of dependencies in user-guide.md · 3505c044
      Dan Handley authored
      1. Update user-guide.md with the latest versions of dependent
      components required by the tested configurations of ARM Trusted
      Firmware. This includes the tested versions of Fixed Virtual
      Platforms (FVPs), toolchain, EFI Development Kit 2(EDK2),
      Linux kernel and Linux file system.
      
      2. Remove the instructions to configure the Cortex Base FVP
      with the legacy GICv2 memory map as this is no longer supported
      since version 5.3 of the Base FVPs.
      
      3. General tidyup of "Using the software" section.
      
      Change-Id: If8264cd29036b59dc5ff435b5f8b1d072dd36ef0
      3505c044