summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2015-03-11 15:48:50 +0000
committerVikram Kanigiri <vikram.kanigiri@arm.com>2015-07-23 10:12:24 +0100
commitc8cfec0a1b959f6a0d868f66157879727907a3a9 (patch)
tree9abd44aa57af918a3cb9e55d55b42dccdd9428a4 /framework
parent6c6a48a9b7fefbb48d7242c19971c2274ab0bfdc (diff)
Add TFTF framework and platform support for extended State-id
This patch adds the necessary platform and framework support for extended state-id power state format. Also the existing suspend tests have been reworked to use the new framework. The framework detects the correct power state format during cold boot and implements helper functions to create the power state function in the detected format. Change-Id: Ie729d947a0f2693aa7e943544a2c4c006e526c63
Diffstat (limited to 'framework')
-rw-r--r--framework/include/tftf.h9
-rw-r--r--framework/main.c3
2 files changed, 12 insertions, 0 deletions
diff --git a/framework/include/tftf.h b/framework/include/tftf.h
index 44c6c02..3e0c1e9 100644
--- a/framework/include/tftf.h
+++ b/framework/include/tftf.h
@@ -156,6 +156,15 @@ uint8_t tftf_get_cpu_id_from_gic_id(uint8_t gic_id);
int tftf_systimer_setup(void);
/*
+ * This function detects the power state format used by PSCI which can
+ * be either extended or original format. For the Original format,
+ * the State-ID can either be NULL or can be using the recommended encoding.
+ * This function needs to be invoked once during cold boot prior to the
+ * invocation of any PSCI power state helper functions.
+ */
+void tftf_detect_psci_pstate_format(void);
+
+/*
* Run the next test on the calling CPU.
* Once the test is complete, if the calling CPU is the last one to exit the
* test then do the necessary bookkeeping, report the overall test result and
diff --git a/framework/main.c b/framework/main.c
index ce64b82..a592aa9 100644
--- a/framework/main.c
+++ b/framework/main.c
@@ -527,6 +527,9 @@ void __dead2 tftf_cold_boot_main(void)
/* Mark the primary CPU as online */
tftf_set_cpu_online();
+ /* Detect the PSCI power state format used. */
+ tftf_detect_psci_pstate_format();
+
/*
* TODO: Make the lead CPU configurable from the tests description.
* Each test should be able to specify its lead CPU in the tests.xml