diff options
author | danh-arm <dan.handley@arm.com> | 2016-11-03 17:49:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-03 17:49:16 +0000 |
commit | 2b3ce7b8d9fadecddc24cf0b4dbcc489f6ed257e (patch) | |
tree | ba9770435f49916c6a62b720f0e2aafa1dc7f7a5 | |
parent | 2fef96a31a911caed599c110ac4704e186375c67 (diff) | |
parent | bfef610667b75e731d0d263b069369f7695c6c83 (diff) |
Merge pull request #748 from dp-arm/dp/arm-sip
BL31 runtime instrumentation fixes and documentation update
-rw-r--r-- | docs/user-guide.md | 6 | ||||
-rw-r--r-- | services/std_svc/std_svc_setup.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/user-guide.md b/docs/user-guide.md index 5b73b663..140977e7 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -466,6 +466,12 @@ performed. Note: `TRUSTED_BOARD_BOOT` is currently not supported when `LOAD_IMAGE_V2` is enabled. +* `ENABLE_RUNTIME_INSTRUMENTATION`: Boolean option to enable runtime + instrumentation which injects timestamp collection points into + Trusted Firmware to allow runtime performance to be measured. + Currently, only PSCI is instrumented. Enabling this option enables + the `ENABLE_PMF` build option as well. Default is 0. + #### ARM development platform specific build options * `ARM_TSP_RAM_LOCATION`: location of the TSP binary. Options: diff --git a/services/std_svc/std_svc_setup.c b/services/std_svc/std_svc_setup.c index 97a9fbd6..010bb8f7 100644 --- a/services/std_svc/std_svc_setup.c +++ b/services/std_svc/std_svc_setup.c @@ -81,9 +81,14 @@ uintptr_t std_svc_smc_handler(uint32_t smc_fid, uint64_t ret; #if ENABLE_RUNTIME_INSTRUMENTATION + + /* + * Flush cache line so that even if CPU power down happens + * the timestamp update is reflected in memory. + */ PMF_WRITE_TIMESTAMP(rt_instr_svc, RT_INSTR_ENTER_PSCI, - PMF_NO_CACHE_MAINT, + PMF_CACHE_MAINT, get_cpu_data(cpu_data_pmf_ts[CPU_DATA_PMF_TS0_IDX])); #endif |