1. 23 May, 2014 3 commits
  2. 22 May, 2014 9 commits
    • Dan Handley's avatar
      Allow BL3-2 platform definitions to be optional · 1151c821
      Dan Handley authored
      The generic image loading and IO FIP code no longer forces the
      platform to create BL3-2 (Secure-EL1 Payload) specific
      definitions. The BL3-2 loading code in bl2/bl2main.c is wrapped
      by a #ifdef BL32_BASE blocks, allowing the BL3-2 definitions to
      be optional. Similarly for the name_uuid array defintion in
      drivers/io/io_fip.c.
      
      Also update the porting guide to reflect this change.
      
      The BL3-2 platform definitions remain non-configurably present
      in the FVP port.
      
      Fixes ARM-software/tf-issues#68
      
      Change-Id: Iea28b4e94d87a31f5522f271e290919a8a955460
      1151c821
    • Vikram Kanigiri's avatar
      Add support for BL3-1 as a reset vector · dbad1bac
      Vikram Kanigiri authored
      This change adds optional reset vector support to BL3-1
      which means BL3-1 entry point can detect cold/warm boot,
      initialise primary cpu, set up cci and mail box.
      
      When using BL3-1 as a reset vector it is assumed that
      the BL3-1 platform code can determine the location of
      the BL3-2 images, or load them as there are no parameters
      that can be passed to BL3-1 at reset.
      
      It also fixes the incorrect initialisation of mailbox
      registers on the FVP platform
      
      This feature can be enabled by building the code with
      make variable RESET_TO_BL31 set as 1
      
      Fixes ARM-software/TF-issues#133
      Fixes ARM-software/TF-issues#20
      
      Change-Id: I4e23939b1c518614b899f549f1e8d412538ee570
      dbad1bac
    • Vikram Kanigiri's avatar
      Rework memory information passing to BL3-x images · 6871c5d3
      Vikram Kanigiri authored
      The issues addressed in this patch are:
      
      1. Remove meminfo_t from the common interfaces in BL3-x,
      expecting that platform code will find a suitable mechanism
      to determine the memory extents in these images and provide
      it to the BL3-x images.
      
      2. Remove meminfo_t and bl31_plat_params_t from all FVP BL3-x
      code as the images use link-time information to determine
      memory extents.
      
      meminfo_t is still used by common interface in BL1/BL2 for
      loading images
      
      Change-Id: I4e825ebf6f515b59d84dc2bdddf6edbf15e2d60f
      6871c5d3
    • Vikram Kanigiri's avatar
      Populate BL31 input parameters as per new spec · 4112bfa0
      Vikram Kanigiri authored
      This patch is based on spec published at
      https://github.com/ARM-software/tf-issues/issues/133
      
      It rearranges the bl31_args struct into
      bl31_params and bl31_plat_params which provide the
      information needed for Trusted firmware and platform
      specific data via x0 and x1
      
      On the FVP platform BL3-1 params and BL3-1 plat params
      and its constituents are stored at the start of TZDRAM.
      
      The information about memory availability and size for
      BL3-1, BL3-2 and BL3-3 is moved into platform specific data.
      
      Change-Id: I8b32057a3d0dd3968ea26c2541a0714177820da9
      4112bfa0
    • Vikram Kanigiri's avatar
      Rework handover interface between BL stages · 29fb905d
      Vikram Kanigiri authored
      This patch reworks the handover interface from: BL1 to BL2 and
      BL2 to BL3-1. It removes the raise_el(), change_el(), drop_el()
      and run_image() functions as they catered for code paths that were
      never exercised.
      BL1 calls bl1_run_bl2() to jump into BL2 instead of doing the same
      by calling run_image(). Similarly, BL2 issues the SMC to transfer
      execution to BL3-1 through BL1 directly. Only x0 and x1 are used
      to pass arguments to BL31. These arguments and parameters for
      running BL3-1 are passed through a reference to a
      'el_change_info_t' structure. They were being passed value in
      general purpose registers earlier.
      
      Change-Id: Id4fd019a19a9595de063766d4a66295a2c9307e1
      29fb905d
    • Vikram Kanigiri's avatar
      Introduce macros to manipulate the SPSR · 23ff9baa
      Vikram Kanigiri authored
      This patch introduces macros (SPSR_64 and SPSR_32) to
      create a SPSR for both aarch32 and aarch64 execution
      states. These macros allow the user to set fields
      in the SPSR depending upon its format.
      The make_spsr() function which did not allow
      manipulation of all the fields in the aarch32 SPSR
      has been replaced by these new macros.
      
      Change-Id: I9425dda0923e8d5f03d03ddb8fa0e28392c4c61e
      23ff9baa
    • Andrew Thoelke's avatar
      Merge pull request #91 from linmaonly/lin_dev · 1a4f19e3
      Andrew Thoelke authored
      Address issue 156: 64-bit addresses get truncated
      1a4f19e3
    • Andrew Thoelke's avatar
      Merge pull request #83 from athoelke/at/tf-issues-126 · ba9dbd10
      Andrew Thoelke authored
      Set SCR_EL3.RW correctly before exiting bl31_main
      ba9dbd10
    • Andrew Thoelke's avatar
      Merge pull request #85 from hliebel/hl/bl30-doc · 39f6a68b
      Andrew Thoelke authored
      Improve BL3-0 documentation
      39f6a68b
  3. 20 May, 2014 1 commit
    • Lin Ma's avatar
      Address issue 156: 64-bit addresses get truncated · 444281cc
      Lin Ma authored
      Addresses were declared as "unsigned int" in drivers/arm/peripherals/pl011/pl011.h and in function init_xlation_table. Changed to use "unsigned long" instead
      Fixes ARM-software/tf-issues#156
      444281cc
  4. 19 May, 2014 2 commits
  5. 16 May, 2014 10 commits
    • Jeenu Viswambharan's avatar
      Add build configuration for timer save/restore · 2da8d8bf
      Jeenu Viswambharan authored
      At present, non-secure timer register contents are saved and restored as
      part of world switch by BL3-1. This effectively means that the
      non-secure timer stops, and non-secure timer interrupts are prevented
      from asserting until BL3-1 switches back, introducing latency for
      non-secure services. Often, secure world might depend on alternate
      sources for secure interrupts (secure timer or platform timer) instead
      of non-secure timers, in which case this save and restore is
      unnecessary.
      
      This patch introduces a boolean build-time configuration NS_TIMER_SWITCH
      to choose whether or not to save and restore non-secure timer registers
      upon world switch. The default choice is made not to save and restore
      them.
      
      Fixes ARM-software/tf-issues#148
      
      Change-Id: I1b9d623606acb9797c3e0b02fb5ec7c0a414f37e
      2da8d8bf
    • Jeenu Viswambharan's avatar
      Document summary of build options in user guide · c3c1e9b0
      Jeenu Viswambharan authored
      Change-Id: I6bd077955bf3780168a874705974bbe72ea0f5f1
      c3c1e9b0
    • Jeenu Viswambharan's avatar
      Reorganize build options · e35c4045
      Jeenu Viswambharan authored
      At present, various build options are initialized at various places in
      the Makefile. This patch gathers all build option declarations at the
      top of the Makefile and assigns them default values.
      
      Change-Id: I9f527bc8843bf69c00cb754dc60377bdb407a951
      e35c4045
    • Jeenu Viswambharan's avatar
      Introduce convenience functions to build · 289e0dad
      Jeenu Viswambharan authored
      This patch introduces two convenience functions to the build system:
      
        - assert_boolean: asserts that a given option is assigned either 0 or
          1 as values
      
        - add_define: helps add/append macro definitions to build tool command
          line. This also introduces the variable DEFINES which is used to
          collect and pass all relevant configurations to build tools
      
      Change-Id: I3126894b034470d39858ebb3bd183bda681c7126
      289e0dad
    • Andrew Thoelke's avatar
      Set SCR_EL3.RW correctly before exiting bl31_main · bb5ffdba
      Andrew Thoelke authored
      SCR_EL3.RW was not updated immediately before exiting bl31_main() and
      running BL3-3. If a AArch32 Secure-EL1 Payload had just been
      initialised, then the SCR_EL3.RW bit would be left indicating a
      32-bit BL3-3, which may not be correct.
      
      This patch explicitly sets SCR_EL3.RW appropriately based on the
      provided SPSR_EL3 value for the BL3-3 image.
      
      Fixes ARM-software/tf-issues#126
      
      Change-Id: Ic7716fe8bc87e577c4bfaeb46702e88deedd9895
      bb5ffdba
    • Soby Mathew's avatar
      Rework BL3-1 unhandled exception handling and reporting · a43d431b
      Soby Mathew authored
      This patch implements the register reporting when unhandled exceptions are
      taken in BL3-1. Unhandled exceptions will result in a dump of registers
      to the console, before halting execution by that CPU. The Crash Stack,
      previously called the Exception Stack, is used for this activity.
      This stack is used to preserve the CPU context and runtime stack
      contents for debugging and analysis.
      
      This also introduces the per_cpu_ptr_cache, referenced by tpidr_el3,
      to provide easy access to some of BL3-1 per-cpu data structures.
      Initially, this is used to provide a pointer to the Crash stack.
      
      panic() now prints the the error file and line number in Debug mode
      and prints the PC value in release mode.
      
      The Exception Stack is renamed to Crash Stack with this patch.
      The original intention of exception stack is no longer valid
      since we intend to support several valid exceptions like IRQ
      and FIQ in the trusted firmware context. This stack is now
      utilized for dumping and reporting the system state when a
      crash happens and hence the rename.
      
      Fixes ARM-software/tf-issues#79 Improve reporting of unhandled exception
      
      Change-Id: I260791dc05536b78547412d147193cdccae7811a
      a43d431b
    • Andrew Thoelke's avatar
    • Andrew Thoelke's avatar
    • Andrew Thoelke's avatar
      Merge pull request #68 from jcastillo-arm/jc/tf-issues/137 · 19ea62d3
      Andrew Thoelke authored
      Change-Id: If8744c38c2d5c50caa7454b055e2ba418cf1e8bf
      19ea62d3
    • danh-arm's avatar
      Merge pull request #66 from athoelke/tzc-config-fix · af0a9618
      danh-arm authored
      Fixes for TZC configuration on FVP
      af0a9618
  6. 13 May, 2014 2 commits
    • Sandrine Bailleux's avatar
      fvp: Use the right implem. of plat_report_exception() in BL3-2 · db8989d5
      Sandrine Bailleux authored
      On FVP, the file 'plat/fvp/aarch64/plat_helpers.S' contains an
      FVP-specific implementation of the function 'plat_report_exception()',
      which is meant to override the default implementation. However, this
      file was not included into the BL3-2 image, meaning it was still
      using the default implementation. This patch fixes the FVP makefile
      to compile this file in.
      
      Change-Id: I3d44b9ec3a9de7e2762e0887d3599b185d3e28d2
      db8989d5
    • Juan Castillo's avatar
      Fix C accessors to GIC distributor registers with set/clear semantics · 42a52d89
      Juan Castillo authored
      This patch fixes C accessors to GIC registers that follow a set/clear
      semantic to change the state of an interrupt, instead of read/write/modify.
      These registers are:
        Set-Enable
        Clear-Enable
        Set-Pending
        Clear-Pending
        Set-Active
        Clear-Active
      For instance, to enable an interrupt we write a one to the corresponding bit
      in the Set-Enable register, whereas to disable it we write a one to the
      corresponding bit in the Clear-Enable register.
      
      Fixes ARM-software/tf-issues#137
      
      Change-Id: I3b66bad94d0b28e0fe08c9042bac0bf5ffa07944
      42a52d89
  7. 12 May, 2014 2 commits
    • Achin Gupta's avatar
      Fix broken standby state implementation in PSCI · 317ba090
      Achin Gupta authored
      This patch fixes the broken support for entry into standby states
      introduced under commit-id 'd118f9f8' (tf-issues#94). Upon exit from
      the platform defined standby state instead of returning to the caller
      of the SMC, execution would get stuck in the wfi instruction meant for
      entering a power down state. This patch ensures that exit from a
      standby state and entry into a power down state do not interfere with
      each other.
      
      Fixes ARM-software/tf-issues#154
      
      Change-Id: I56e5df353368e44d6eefc94ffedefe21929f5cfe
      317ba090
    • Andrew Thoelke's avatar
      Fixes for TZC configuration on FVP · 84dbf6ff
      Andrew Thoelke authored
      The TZC configuration on FVP was incorrectly allowing both secure
      and non-secure accesses to the DRAM, which can cause aliasing
      problems for software. It was also not enabling virtio access on
      some models.
      
      This patch fixes both of those issues. The patch also enabless
      non-secure access to the DDR RAM for all devices with defined IDs.
      
      The third region of DDR RAM has been removed from the configuration
      as this is not used in any of the FVP models.
      
      Fixes ARM-software/tf-issues#150
      Fixes ARM-software/tf-issues#151
      
      Change-Id: I60ad5daaf55e14f178affb8afd95d17e7537abd7
      84dbf6ff
  8. 09 May, 2014 2 commits
    • Sandrine Bailleux's avatar
      fvp: Provide per-EL MMU setup functions · b793e431
      Sandrine Bailleux authored
      Instead of having a single version of the MMU setup functions for all
      bootloader images that can execute either in EL3 or in EL1, provide
      separate functions for EL1 and EL3. Each bootloader image can then
      call the appropriate version of these functions. The aim is to reduce
      the amount of code compiled in each BL image by embedding only what's
      needed (e.g. BL1 to embed only EL3 variants).
      
      Change-Id: Ib86831d5450cf778ae78c9c1f7553fe91274c2fa
      b793e431
    • Sandrine Bailleux's avatar
      Introduce IS_IN_ELX() macros · b3254e85
      Sandrine Bailleux authored
      The goal of these macros is to improve code readability by providing
      a concise way to check whether we are running in the expected
      exception level.
      
      Change-Id: If9aebadfb6299a5196e9a582b442f0971d9909b1
      b3254e85
  9. 08 May, 2014 9 commits