summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-06-01 14:49:04 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2016-07-14 15:06:01 +0100
commit4bd4ae519b02a9afd236f4c78d4654bdc0e942c2 (patch)
treef7a2d39e1fcb02418789b9459b90f0935293ddf9 /lib
parent87efb3474ac4f168c364d76db26909a1ee1a5207 (diff)
Add PSCI STAT helper APIs
This patch adds PSCI_STAT_COUNT and PSCI_STAT_RESIDENCY helper functions to the TFTF framework. Change-Id: I624b25c8ccbb540f69392900890940fc16197001
Diffstat (limited to 'lib')
-rw-r--r--lib/psci/psci.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/psci/psci.c b/lib/psci/psci.c
index d761747..682ad5c 100644
--- a/lib/psci/psci.c
+++ b/lib/psci/psci.c
@@ -97,7 +97,35 @@ int32_t tftf_psci_cpu_off(void)
smc64_ret_values ret_vals;
ret_vals = tftf_smc64(&args);
+ return ret_vals.ret0;
+}
+
+u_register_t tftf_psci_stat_residency(u_register_t target_cpu,
+ uint32_t power_state)
+{
+ smc64_args args = {
+ SMC_PSCI_STAT_RESIDENCY64,
+ target_cpu,
+ power_state,
+ };
+ smc64_ret_values ret_vals;
+
+ ret_vals = tftf_smc64(&args);
+ return ret_vals.ret0;
+}
+
+u_register_t tftf_psci_stat_count(u_register_t target_cpu,
+ uint32_t power_state)
+{
+ smc64_args args = {
+ SMC_PSCI_STAT_COUNT64,
+ target_cpu,
+ power_state,
+ };
+ smc64_ret_values ret_vals;
+
+ ret_vals = tftf_smc64(&args);
return ret_vals.ret0;
}
@@ -307,4 +335,3 @@ unsigned int tftf_get_psci_version(void)
return ret.ret0;
}
-