1. 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
  2. 07 Apr, 2014 1 commit
  3. 04 Apr, 2014 1 commit
  4. 03 Apr, 2014 1 commit
  5. 01 Apr, 2014 1 commit
  6. 26 Mar, 2014 9 commits
    • Achin Gupta's avatar
      Fix build failure due to a typo in TSPD code · 2eb01d34
      Achin Gupta authored
      This patch fixes a build failure when TSPD support is included. The failure was
      due to a missing semi-colon at the end of a C statement in tspd_common.c
      
      Change-Id: I8fbd0d500bd9145b15f862b8686e570b80fcce8c
      2eb01d34
    • Sandrine Bailleux's avatar
      Build system: Trigger dependency checking only for build targets · 8d2296f3
      Sandrine Bailleux authored
      The Makefile used to specify a blacklist of rules for which
      dependency checking must not be triggered.  This list included
      cleaning rules only, whereas all other non-build targets (e.g.
      help, checkpatch, etc.) should also be included.
      
      This approach seems a bit fragile because it is easy to forget
      some non-building rules in the blacklist, as the experience
      showed us.  It is more robust to specify a whitelist of rules
      for which dependency checking is required.
      
      Fixes ARM-software/tf-issues#112
      
      Change-Id: I030c405abb35972a726a5200396430316d18f963
      8d2296f3
    • 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
    • Soby Mathew's avatar
      Move console functions out of pl011.c · c1df3be7
      Soby Mathew authored
      This commit isolates the accessor functions in pl011.c and builds
      a wrapper layer for console functions.
      
      This also modifies the console driver to use the pl011 FIFO.
      
      Fixes ARM-software/tf-issues#63
      
      Change-Id: I3b402171cd14a927831bf5e5d4bb310b6da0e9a8
      c1df3be7
    • Sandrine Bailleux's avatar
      Build system: Remove last traces of 'PLAT=all' · 08c7ed0f
      Sandrine Bailleux authored
      It used to be possible to build all bootloader binaries for all platforms 
      using 'PLAT=all'. This feature has been removed but there are still some 
      traces of its existence. This patch removes them.
      
      Change-Id: Ic671a5c20c5b64acbd0a912d2e4db8f9d9574610
      08c7ed0f
    • Vikram Kanigiri's avatar
      Fix build by correcting asm helper function usage in TSPD · 31526cb0
      Vikram Kanigiri authored
      This patch fixes a regression failure due to the use of functions by the 
      TSPD code which access system registers with partially qualified names. 
      These functions had been removed in an earlier patch. The relevant code 
      has been updated to access these registers with their fully qualified 
      names.
      
      Fixes ARM-software/tf-issues#119
      
      Change-Id: Ide1bc5036e1b8164a42f7b7fe86186ad860e0ef9
      31526cb0
    • Sandrine Bailleux's avatar
      Separate out BL2, BL3-1 and BL3-2 early exception vectors from BL1 · 6c595b3d
      Sandrine Bailleux authored
      bl1/aarch64/early_exceptions.S used to be re-used by BL2, BL3-1 and
      BL3-2.  There was some early SMC handling code in there that was not
      required by the other bootloader stages.  Therefore this patch
      introduces an even simpler exception vector source file for BL2,
      BL3-1 and BL3-2.
      
      Fixes ARM-software/tf-issues#38
      
      Change-Id: I0244b80e9930b0f8035156a0bf91cc3e9a8f995d
      6c595b3d
    • Vikram Kanigiri's avatar
      Move per cpu exception stack in BL31 to tzfw_normal_stacks · d8b07aa0
      Vikram Kanigiri authored
      Fixes ARM-software/tf-issues#70
      
      Change-Id: I7f024f173fbdecd315076f528b05d6295aff7276
      d8b07aa0
    • Vikram Kanigiri's avatar
      Add standby state support in PSCI cpu_suspend api · d118f9f8
      Vikram Kanigiri authored
      This patch adds support in the generic PSCI implementation to call a
      platform specific function to enter a standby state using an example
      implementation in ARM FVP port
      
      Fixes ARM-software/tf-issues#94
      Change-Id: Ic1263fcf25f28e09162ad29dca954125f9aa8cc9
      d118f9f8
  7. 21 Mar, 2014 8 commits
    • Sandrine Bailleux's avatar
      Semihosting: Fix file mode to load binaries on Windows · 886278e5
      Sandrine Bailleux authored
      Trusted firmware binaries loaded via semihosting used to be
      opened using 'r' mode (i.e. read mode).  This is fine on POSIX
      conforming systems (including Linux) but for Windows it also means
      that the file should be opened in text mode. 'rb' mode must be
      specified instead for binary mode.  On POSIX conforming systems,
      'rb' mode is equivalent to 'r' mode so it does no harm.
      
      Fixes ARM-software/tf-issues#69
      
      Change-Id: Ifa53f2ecfd765f572dea5dd73191f9fe2b2c2011
      886278e5
    • 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
    • Vikram Kanigiri's avatar
      Fix the disable_mmu code · 5132060c
      Vikram Kanigiri authored
      Remove the hard coding of all the MMU related registers with 0 and disable MMU
      by clearing the M and C bit in SCTLR_ELx
      
      Change-Id: I4a0b1bb14a604734b74c32eb31315d8504a7b8d8
      5132060c
    • Sandrine Bailleux's avatar
      TSP: Make the platform-specific makefile mandatory · d1466a2e
      Sandrine Bailleux authored
      The Test Secure-EL1 Payload implementation should always have a
      platform-specific component.  Therefore, there should always
      be a platform-specific sub-makefile for the TSP.  If there is
      none then assume TSP is not supported on this specific platform
      and throw an error at build time if the user tries to compile it.
      
      Change-Id: Ibfbe6e4861cc7786a29f2fc0341035b852925193
      d1466a2e
    • Sandrine Bailleux's avatar
      Fix file_to_uuid() function · 493c8cb2
      Sandrine Bailleux authored
      This patch fixes a bug in the 'file_to_uuid()' function: it used
      to cause an exception by dereferencing a null pointer when
      a given UUID was not found in the UUID array. The fix is to delete
      the final null entry in the UUID array, which is not needed because
      the array is statically declared so its size is known at build time.
      
      Fixes ARM-software/tf-issues#43
      
      Change-Id: I0a003485b88134564c0d36f57c274215d9e16532
      493c8cb2
    • Sandrine Bailleux's avatar
      FIP tool: Fix error message for missing FIP filename · 399aacd6
      Sandrine Bailleux authored
      Previously to this path, the FIP tool used to print the following,
      misleading error message when called without any argument or with
      '--help' option:
      
        ERROR: Too many arguments
      
      This patch fixes this behavior by printing the following error
      message instead:
      
        ERROR: Missing FIP filename
      
      If called with '--help', no error message is printed and only the
      help message is displayed.
      
      Change-Id: Ib281b056f5cd3bc2f66d98be0b0cb2a0aed7c6a8
      399aacd6
    • Sandrine Bailleux's avatar
      FIP tool: Add support for '--help' option. · 89f7b481
      Sandrine Bailleux authored
      Also improve the help message printed by the FIP tool.
      
      Change-Id: If0f802f1083458182ca8ce57e8c104d40eee0dbe
      89f7b481
    • Sandrine Bailleux's avatar
      FIP tool: Small optimisation for option parsing · 12b99ca6
      Sandrine Bailleux authored
      This patch makes use of different values for '--dump' and other
      command-line options. This makes the code simpler and also
      optimises it a bit (because it avoids a string comparison).
      
      Change-Id: I1c8345f210074fc5f962ea0282fd3625775dec69
      12b99ca6
  8. 20 Mar, 2014 4 commits
    • Jeenu Viswambharan's avatar
      Rework bakery lock with WFE/SEV sequence · 82a0aca0
      Jeenu Viswambharan authored
      
      
      Current implementation of Bakery Lock does tight-loop waiting upon lock
      contention.
      
      This commit reworks the implementation to use WFE instruction for
      waiting, and SEV to signal lock availability. It also adds the rationale
      for choosing Bakery Locks instead of exclusion primitives, and more
      comments for the lock algorithm.
      
      Fixes ARM-software/tf-issue#67
      
      Change-Id: Ie351d3dbb27ec8e64dbc9507c84af07bd385a7df
      Co-authored-by: default avatarVikram Kanigiri <vikram.kanigiri@arm.com>
      82a0aca0
    • Jeenu Viswambharan's avatar
      Specify image entry in linker script · 9f98aa1a
      Jeenu Viswambharan authored
      At present, the entry point for each BL image is specified via the
      Makefiles and provided on the command line to the linker. When using a
      link script the entry point should rather be specified via the ENTRY()
      directive in the link script.
      
      This patch updates linker scripts of all BL images to specify the entry
      point using the ENTRY() directive. It also removes the --entry flag
      passed to the linker through Makefile.
      
      Fixes issue ARM-software/tf-issues#66
      
      Change-Id: I1369493ebbacea31885b51185441f6b628cf8da0
      9f98aa1a
    • Jeenu Viswambharan's avatar
      Implement standard calls for TSP · 52538b9b
      Jeenu Viswambharan authored
      This patch adds call count, UID and version information SMC calls for
      the Trusted OS, as specified by the SMC calling convention.
      
      Change-Id: I9a3e84ac1bb046051db975d853dcbe9612aba6a9
      52538b9b
    • Jeenu Viswambharan's avatar
      Implement ARM Standard Service · 64f6ea9b
      Jeenu Viswambharan authored
      This patch implements ARM Standard Service as a runtime service and adds
      support for call count, UID and revision information SMCs. The existing
      PSCI implementation is subsumed by the Standard Service calls and all
      PSCI calls are therefore dispatched by the Standard Service to the PSCI
      handler.
      
      At present, PSCI is the only specification under Standard Service. Thus
      call count returns the number of PSCI calls implemented. As this is the
      initial implementation, a revision number of 0.1 is returned for call
      revision.
      
      Fixes ARM-software/tf-issues#62
      
      Change-Id: I6d4273f72ad6502636efa0f872e288b191a64bc1
      64f6ea9b
  9. 10 Mar, 2014 2 commits
    • 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
    • Jeenu Viswambharan's avatar
      Remove unused 'CPU present' flag · 92a12866
      Jeenu Viswambharan authored
      This patch removes the 'CPU present' flag that's being set but not
      referred or used anywhere else.
      
      Change-Id: Iaf82bdb354134e0b33af16c7ba88eb2259b2682a
      92a12866
  10. 05 Mar, 2014 10 commits
    • Dan Handley's avatar
      Remove change log instructions from contribution.md · 5cfa93d8
      Dan Handley authored
      Remove the instructions to update the change log from
      contribution.md. The change log no longer contains a
      "Detailed changes since last release" section.
      
      Also, update the documentation links following recent
      documentation changes.
      
      Change-Id: Id9df43d666f7f9a60dcc6f663a8a85cdd2ff7cc4
      5cfa93d8
    • Ryan Harkin's avatar
      bl_common: add image_size() · ee9ad785
      Ryan Harkin authored
      
      
      Fixes ARM-software/tf-issues#42
      
      Some callers of load_image() may need to get the size of the image
      before/after loading it.
      
      Change-Id: I8dc067b69fc711433651a560ba5a8c3519445857
      Signed-off-by: default avatarRyan Harkin <ryan.harkin@linaro.org>
      ee9ad785
    • Ryan Harkin's avatar
      fvp: plat_io_storage: remove duplicated code · 48e2ca79
      Ryan Harkin authored
      
      
      Fixes ARM-software/tf-issues#41
      
      The policy functions for each file to be loaded were implemented by
      copy/pasting one method and then varying the data checked.
      
      This patch creates a generic function to check the policy based on the
      data stored in a table.
      
      This removes the amount of duplicated code but also makes the code
      simpler and more efficient.
      
      Change-Id: I1c52eacf6f18a1442dabbb33edd03d4bb8bbeae0
      Signed-off-by: default avatarRyan Harkin <ryan.harkin@linaro.org>
      48e2ca79
    • Jon Medhurst's avatar
      Enable platforms to omit some bootloaders · 4bfc2d21
      Jon Medhurst authored
      
      
      If a platform doesn't specify a BLx_SOURCE variable, then building
      of the corresponding bootloader isn't attempted. Also allow BL3-3 to
      be omitted from the FIP.
      
      Note, this change also removes support for PLAT=all and the 'fip' target
      from the 'all' recipe.
      
      Fixes ARM-software/tf-issues#30
      
      Change-Id: Ibdfead0440256eaf364617ecff65290ca6fe6240
      Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
      4bfc2d21
    • Jon Medhurst's avatar
      Generate build time and date message at link time. · fb052462
      Jon Medhurst authored
      
      
      So it updates each time a bootloader changes, not just when bl*_main.c
      files are recompiled.
      
      Fixes ARM-software/tf-issues#33
      
      Change-Id: Ie8e1a7bd7e1913d2e96ac268606284f76af8c5ab
      Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
      fb052462
    • Jon Medhurst's avatar
      fvp: Make use of the generic MMU translation table setup code · 38aa76a8
      Jon Medhurst authored
      
      
      Change-Id: I559c5a4d86cad55ce3f6ad71285b538d3cfd76dc
      Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
      38aa76a8
    • Jon Medhurst's avatar
      Add generic functions for setting up aarch64 MMU translation tables · c481c269
      Jon Medhurst authored
      
      
      Change-Id: I5b8d040ebc6672e40e4f13925e2fd5bc124103f4
      Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
      c481c269
    • Jon Medhurst's avatar
      Update Makefiles to get proper dependency checking working. · 6d55d109
      Jon Medhurst authored
      
      
      This change requires all platforms to now specify a list of source files
      rather than object files.
      
      New source files should preferably be specified by using the path as
      well and we should add this in the future for all files so we can remove
      use of vpath. This is desirable because vpath hides issues like the fact
      that BL2 currently pulls in a BL1 file bl1/aarch64/early_exceptions.S
      and if in the future we added bl2/aarch64/early_exceptions.S then it's
      likely only one of the two version would be used for both bootloaders.
      
      This change also removes the 'dump' build target and simply gets
      bootloaders to always generate a dump file. At the same time the -x
      option is added so the section headers and symbols table are listed.
      
      Fixes ARM-software/tf-issues#11
      
      Change-Id: Ie38f7be76fed95756c8576cf3f3ea3b7015a18dc
      Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
      6d55d109
    • Jon Medhurst's avatar
      Fix implementation and users of gicd_set_ipriorityr() · cf6eeb8a
      Jon Medhurst authored
      
      
      Make gicd_set_ipriorityr() actually write to the priority register.
      
      Also correct callers of this function which want the highest priority
      to use the value zero as this is the highest priority value according
      to the ARM Generic Interrupt Controller Architecture Specification.
      
      To make this easier to get right, we introduce defines for the lowest
      and highest priorities for secure and non-secure interrupts.
      
      Fixes ARM-software/tf-issues#21
      Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
      cf6eeb8a
    • Jon Medhurst's avatar
      Fix assert in bakery_lock_release() · a4d9f26b
      Jon Medhurst authored
      
      
      bakery_lock_release() expects an mpidr as the first argument however
      bakery_lock_release() is calling it with the 'entry' argument it has
      calculated. Rather than fixing this to pass the mpidr value it would be
      much more efficient to just replace the call with
      
         assert(bakery->owner == entry)
      
      As this leaves no remaining users of bakery_lock_held(), we might as
      well delete it.
      
      Fixes ARM-software/tf-issues#27
      Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
      a4d9f26b
  11. 28 Feb, 2014 1 commit
    • Dan Handley's avatar
      Add v0.3 release documentation · b2388490
      Dan Handley authored
      Update the readme.md and change-log.md with release information.
      
      Also, remove the "Detailed changes since last release" section of
      the change-log.md since the same information can be found in the
      GIT commit messages. Fixes ARM-software/tf-issues#22.
      
      Change-Id: I968cc8aaf588aa5c34ba8f1c12a5b797a46e04f5
      b2388490