summaryrefslogtreecommitdiff
path: root/tests/runtime_services
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2017-09-06 15:09:12 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2017-09-11 08:54:09 +0100
commitb3d950e3796fb432d0d5de45b0335a56e5faaa9a (patch)
tree0adbe4a4b18fd6f3db781bdf8f9bef623f92e01b /tests/runtime_services
parent62f26e82cd67fb27c253ba83dc6326275673d303 (diff)
Update PSCI version to 1.1
The code was checking against a specific version, but there were tests that were designed to work with 1.x or 0.x versions of PSCI. This patch adds tftf_is_valid_psci_version() which validates a version code against all the valid codes defined in the specification of PSCI 1.1, and sets the current version to 1.1. Change-Id: Ie11cb0311f9be2cfa0d1bee51dd59e8977a3aa28 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'tests/runtime_services')
-rw-r--r--tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c10
-rw-r--r--tests/runtime_services/standard_service/psci/api_tests/psci_version/test_psci_version.c13
2 files changed, 9 insertions, 14 deletions
diff --git a/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c b/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
index 25e467f..16cbe52 100644
--- a/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
+++ b/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
@@ -298,17 +298,15 @@ static test_result_t suspend_core_entrypoint(void)
/* Entrypoint used for the PSCI version test. */
static test_result_t psci_version_entrypoint(void)
{
- smc_args args = { SMC_PSCI_VERSION };
- smc_ret_values ret;
u_register_t *ts;
+ int version;
wait_for_participating_cpus();
- ret = tftf_smc(&args);
- if (ret.ret0 != PSCI_VERSION) {
+ version = tftf_get_psci_version();
+ if (!tftf_is_valid_psci_version(version)) {
tftf_testcase_printf(
- "Wrong PSCI version, expected 0x%08x got 0x%08x\n",
- PSCI_VERSION, (uint32_t)ret.ret0);
+ "Wrong PSCI version:0x%08x\n", version);
return TEST_RESULT_FAIL;
}
diff --git a/tests/runtime_services/standard_service/psci/api_tests/psci_version/test_psci_version.c b/tests/runtime_services/standard_service/psci/api_tests/psci_version/test_psci_version.c
index 2194f05..cdafb48 100644
--- a/tests/runtime_services/standard_service/psci/api_tests/psci_version/test_psci_version.c
+++ b/tests/runtime_services/standard_service/psci/api_tests/psci_version/test_psci_version.c
@@ -36,19 +36,16 @@
* @Test_Aim@ Check the version of PSCI implemented
*
* This test relies on the PSCI_VERSION SMC call.
- * It expects version 0.2.
+ * It expects versions 0.1, 0.2, 1.0, 1.1
*/
test_result_t test_psci_version(void)
{
- smc_args args = { SMC_PSCI_VERSION };
- smc_ret_values ret;
+ int version;
- ret = tftf_smc(&args);
-
- if (ret.ret0 != PSCI_VERSION) {
+ version = tftf_get_psci_version();
+ if (!tftf_is_valid_psci_version(version)) {
tftf_testcase_printf(
- "Wrong PSCI version, expected 0x%08x, got 0x%08x\n",
- PSCI_VERSION, (uint32_t) ret.ret0);
+ "Wrong PSCI version:0x%08x\n", version);
return TEST_RESULT_FAIL;
}