aboutsummaryrefslogtreecommitdiff
path: root/tftf
diff options
context:
space:
mode:
Diffstat (limited to 'tftf')
-rw-r--r--tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c b/tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c
index b866450d..3fa48dfe 100644
--- a/tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c
+++ b/tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c
@@ -34,8 +34,6 @@ test_result_t test_smccc_arch_soc_id(void)
smc_args args;
smc_ret_values ret;
int32_t expected_ver;
- int32_t skip_cnt = 0;
- bool fail_soc_id_test = false;
/* Check if SMCCC version is at least v1.2 */
expected_ver = MAKE_SMCCC_VERSION(1, 2);
@@ -55,7 +53,7 @@ test_result_t test_smccc_arch_soc_id(void)
ret = tftf_smc(&args);
if ((int)ret.ret0 == SMC_ARCH_CALL_NOT_SUPPORTED) {
tftf_testcase_printf("SMCCC_ARCH_SOC_ID is not implemented\n");
- return TEST_RESULT_FAIL;
+ return TEST_RESULT_SKIPPED;
}
/* If the call returns SMC_OK then SMCCC_ARCH_SOC_ID is feature available */
@@ -63,31 +61,29 @@ test_result_t test_smccc_arch_soc_id(void)
ret = get_soc_id_param(SMC_GET_SOC_REVISION);
if ((int)ret.ret0 == SMC_ARCH_CALL_INVAL_PARAM) {
- ERROR("Invalid param passed to SMCCC_ARCH_SOC_ID\n");
- fail_soc_id_test = true;
+ tftf_testcase_printf("Invalid param passed to \
+ SMCCC_ARCH_SOC_ID\n");
+ return TEST_RESULT_FAIL;
} else if ((int)ret.ret0 == SMC_ARCH_CALL_NOT_SUPPORTED) {
tftf_testcase_printf("SOC Rev is not implemented\n");
- skip_cnt++;
- } else {
- tftf_testcase_printf("SOC Rev = 0x%x\n", (int)ret.ret0);
+ return TEST_RESULT_FAIL;
}
+ tftf_testcase_printf("SOC Rev = 0x%x\n", (int)ret.ret0);
+
ret = get_soc_id_param(SMC_GET_SOC_VERSION);
if ((int)ret.ret0 == SMC_ARCH_CALL_INVAL_PARAM) {
- ERROR("Invalid param passed to SMCCC_ARCH_SOC_ID\n");
- fail_soc_id_test = true;
+ tftf_testcase_printf("Invalid param passed to \
+ SMCCC_ARCH_SOC_ID\n");
+ return TEST_RESULT_FAIL;
} else if ((int)ret.ret0 == SMC_ARCH_CALL_NOT_SUPPORTED) {
tftf_testcase_printf("SOC Ver is not implemented\n");
- skip_cnt++;
- } else {
- tftf_testcase_printf("SOC Ver = 0x%x\n", (int)ret.ret0);
+ return TEST_RESULT_FAIL;
}
- if (skip_cnt == 2)
- return TEST_RESULT_SKIPPED;
- else if (fail_soc_id_test)
- return TEST_RESULT_FAIL;
+ tftf_testcase_printf("SOC Ver = 0x%x\n", (int)ret.ret0);
+
} else {
ERROR("Invalid error during SMCCC_ARCH_FEATURES call = 0x%x\n",
(int)ret.ret0);