1. 12 Oct, 2016 1 commit
    • dp-arm's avatar
      Add PMF instrumentation points in TF · 872be88a
      dp-arm authored
      
      
      In order to quantify the overall time spent in the PSCI software
      implementation, an initial collection of PMF instrumentation points
      has been added.
      
      Instrumentation has been added to the following code paths:
      
      - Entry to PSCI SMC handler.  The timestamp is captured as early
        as possible during the runtime exception and stored in memory
        before entering the PSCI SMC handler.
      
      - Exit from PSCI SMC handler.  The timestamp is captured after
        normal return from the PSCI SMC handler or if a low power state
        was requested it is captured in the bl31 warm boot path before
        return to normal world.
      
      - Entry to low power state.  The timestamp is captured before entry
        to a low power state which implies either standby or power down.
        As these power states are mutually exclusive, only one timestamp
        is defined to describe both.  It is possible to differentiate between
        the two power states using the PSCI STAT interface.
      
      - Exit from low power state.  The timestamp is captured after a standby
        or power up operation has completed.
      
      To calculate the number of cycles spent running code in Trusted Firmware
      one can perform the following calculation:
      
      (exit_psci - enter_psci) - (exit_low_pwr - enter_low_pwr).
      
      The resulting number of cycles can be converted to time given the
      frequency of the counter.
      
      Change-Id: Ie3b8f3d16409b6703747093b3a2d5c7429ad0166
      Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
      872be88a
  2. 14 Sep, 2016 2 commits
    • dp-arm's avatar
      Ensure PMF service timestamps are properly aligned on a cache line boundary · 2d84b46e
      dp-arm authored
      When using more than a single service in PMF, it is necessary that the
      per-service timestamps begin on a cache line boundary.  Previously it
      was possible that two services shared a cache line for their
      timestamps.  This made it difficult to reason about cache maintenance
      operations within a single service and required a global understanding
      of how all services operate.
      
      Change-Id: Iacaae5154a7e19ad4107468e56df9ad082ee371c
      2d84b46e
    • dp-arm's avatar
      Rename `pmf_calc_timestamp_offset` to `pmf_calc_timestamp_addr` · d2e201b4
      dp-arm authored
      The macro calculates an absolute address rather than an offset so
      rename it to avoid confusion.
      
      Change-Id: I351f73dfd809fd28c0c30d38928caf5c5cd1af04
      d2e201b4
  3. 26 Aug, 2016 2 commits
    • dp-arm's avatar
      Add assembler helper to calculate PMF timestamp offset · 5695cfe7
      dp-arm authored
      Given the service name and timestamp id, this assembler macro
      calculates the offset into a memory region where the per-cpu timestamp
      value is located.
      
      Change-Id: I47f6dfa2a17be182675e2ca0489d6eed42433209
      5695cfe7
    • dp-arm's avatar
      Move pmf headers to include/lib/pmf · afdda571
      dp-arm authored
      More headers will be needed soon so better to move these to their own
      directory to avoid cluttering include/lib.
      
      Change-Id: I6a72dc5b602d6f51954cf60aadd1beb52a268670
      afdda571