diff options
Diffstat (limited to 'tests/runtime_services')
9 files changed, 75 insertions, 72 deletions
diff --git a/tests/runtime_services/standard_service/psci/api_tests/migrate_info_type/test_migrate_info_type.c b/tests/runtime_services/standard_service/psci/api_tests/migrate_info_type/test_migrate_info_type.c index e211be1..4a981f0 100644 --- a/tests/runtime_services/standard_service/psci/api_tests/migrate_info_type/test_migrate_info_type.c +++ b/tests/runtime_services/standard_service/psci/api_tests/migrate_info_type/test_migrate_info_type.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -61,14 +61,14 @@ test_result_t test_migrate_info_type(void) { uuid_t tos_uuid; char tos_uuid_str[UUID_STR_SIZE]; - smc64_args args; - smc64_ret_values ret; + smc_args args; + smc_ret_values ret; int32_t mp_support; int32_t migrate_ret; /* Identify the level of multicore support present in the Trusted OS */ args.arg0 = SMC_PSCI_MIG_INFO_TYPE; - ret = tftf_smc64(&args); + ret = tftf_smc(&args); mp_support = (int32_t) ret.ret0; if (is_trusted_os_present(&tos_uuid)) { @@ -114,7 +114,7 @@ test_result_t test_migrate_info_type(void) * invalid parameters */ args.arg1 = read_mpidr_el1() & MPID_MASK; - ret = tftf_smc64(&args); + ret = tftf_smc(&args); migrate_ret = (int32_t) ret.ret0; if (migrate_ret != PSCI_E_NOT_SUPPORTED) { diff --git a/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c b/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c index 5058b8c..27e6d66 100644 --- a/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c +++ b/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c @@ -875,7 +875,7 @@ static test_result_t verify_psci_stats_cold_boot(void) */ test_result_t test_psci_stats_after_shutdown(void) { - smc64_args args = { SMC_PSCI_SYSTEM_OFF }; + smc_args args = { SMC_PSCI_SYSTEM_OFF }; if (!is_psci_stat_supported()) return TEST_RESULT_SKIPPED; @@ -889,7 +889,7 @@ test_result_t test_psci_stats_after_shutdown(void) } tftf_notify_reboot(); - tftf_smc64(&args); + tftf_smc(&args); /* The PSCI SYSTEM_OFF call is not supposed to return */ tftf_testcase_printf("System didn't shutdown properly\n"); @@ -902,7 +902,7 @@ test_result_t test_psci_stats_after_shutdown(void) */ test_result_t test_psci_stats_after_reset(void) { - smc64_args args = { SMC_PSCI_SYSTEM_RESET }; + smc_args args = { SMC_PSCI_SYSTEM_RESET }; if (!is_psci_stat_supported()) return TEST_RESULT_SKIPPED; @@ -916,7 +916,7 @@ test_result_t test_psci_stats_after_reset(void) } tftf_notify_reboot(); - tftf_smc64(&args); + tftf_smc(&args); /* The PSCI SYSTEM_RESET call is not supposed to return */ tftf_testcase_printf("System didn't reset properly\n"); 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 558bd3d..2194f05 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -40,10 +40,10 @@ */ test_result_t test_psci_version(void) { - smc64_args args = { SMC_PSCI_VERSION }; - smc64_ret_values ret; + smc_args args = { SMC_PSCI_VERSION }; + smc_ret_values ret; - ret = tftf_smc64(&args); + ret = tftf_smc(&args); if (ret.ret0 != PSCI_VERSION) { tftf_testcase_printf( diff --git a/tests/runtime_services/standard_service/psci/api_tests/system_off/test_system_off.c b/tests/runtime_services/standard_service/psci/api_tests/system_off/test_system_off.c index 229016d..ef1ac8e 100644 --- a/tests/runtime_services/standard_service/psci/api_tests/system_off/test_system_off.c +++ b/tests/runtime_services/standard_service/psci/api_tests/system_off/test_system_off.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -39,7 +39,7 @@ */ test_result_t test_system_off(void) { - smc64_args args = { SMC_PSCI_SYSTEM_OFF }; + smc_args args = { SMC_PSCI_SYSTEM_OFF }; if (tftf_is_rebooted()) { /* Successfully resumed from system off */ @@ -47,7 +47,7 @@ test_result_t test_system_off(void) } tftf_notify_reboot(); - tftf_smc64(&args); + tftf_smc(&args); /* The PSCI SYSTEM_OFF call is not supposed to return */ tftf_testcase_printf("System didn't shutdown properly\n"); diff --git a/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c b/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c index 5cb0af1..aedfdc5 100644 --- a/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c +++ b/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c @@ -239,17 +239,17 @@ test_result_t test_system_suspend_from_all_cores(void) /* * Helper function to issue SYSTEM SUSPEND SMC with custom parameters. */ -int sys_suspend_helper(uint64_t entry_point_address, - uint64_t context_id) +int sys_suspend_helper(uintptr_t entry_point_address, + u_register_t context_id) { - smc64_args args = { + smc_args args = { SMC_PSCI_SYSTEM_SUSPEND64, - (uint64_t)entry_point_address, - (uint64_t)context_id + (uintptr_t)entry_point_address, + (u_register_t)context_id }; - smc64_ret_values ret_vals; + smc_ret_values ret_vals; - ret_vals = tftf_smc64(&args); + ret_vals = tftf_smc(&args); return ret_vals.ret0; } @@ -270,7 +270,7 @@ static test_result_t invalid_entrypoint_for_sys_suspend(void) while (!is_sys_suspend_state_ready()) ; - psci_ret = sys_suspend_helper((uint64_t) 0x1, 0); + psci_ret = sys_suspend_helper((uintptr_t) 0x1, 0); if (psci_ret != PSCI_E_INVALID_ADDRESS) { tftf_testcase_printf("Test failed with invalid entry addr %x\n", psci_ret); diff --git a/tests/runtime_services/standard_service/query_std_svc.c b/tests/runtime_services/standard_service/query_std_svc.c index d08c000..a9082e1 100644 --- a/tests/runtime_services/standard_service/query_std_svc.c +++ b/tests/runtime_services/standard_service/query_std_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -58,15 +58,15 @@ static const uuid_t armtf_std_svc_uuid = { */ test_result_t test_query_std_svc(void) { - smc64_args std_svc_args; - smc64_ret_values ret; + smc_args std_svc_args; + smc_ret_values ret; uuid_t std_svc_uuid; char uuid_str[UUID_STR_SIZE]; test_result_t test_result = TEST_RESULT_SUCCESS; /* Standard Service Call UID */ std_svc_args.arg0 = SMC_STD_SVC_UID; - ret = tftf_smc64(&std_svc_args); + ret = tftf_smc(&std_svc_args); make_uuid_from_4words(&std_svc_uuid, ret.ret0, ret.ret1, ret.ret2, ret.ret3); @@ -80,7 +80,7 @@ test_result_t test_query_std_svc(void) /* Standard Service Call Count */ std_svc_args.arg0 = SMC_STD_SVC_CALL_COUNT; - ret = tftf_smc64(&std_svc_args); + ret = tftf_smc(&std_svc_args); if (ret.ret0 == SMC_UNKNOWN) { tftf_testcase_printf("Querying STD service call count" @@ -88,19 +88,20 @@ test_result_t test_query_std_svc(void) test_result = TEST_RESULT_FAIL; } else { tftf_testcase_printf("STD Service Call Count reported by firmware:" - " %lu\n", ret.ret0); + " %llu\n", (unsigned long long)ret.ret0); } /* Standard Service Call Revision details */ std_svc_args.arg0 = SMC_STD_SVC_REVISION; - ret = tftf_smc64(&std_svc_args); + ret = tftf_smc(&std_svc_args); if ((ret.ret0 != STD_SVC_REVISION_MAJOR) || (ret.ret1 != STD_SVC_REVISION_MINOR)) { tftf_testcase_printf( - "Wrong Revision: expected {%u.%u}, got {%lu.%lu}\n", + "Wrong Revision: expected {%u.%u}, got {%llu.%llu}\n", STD_SVC_REVISION_MAJOR, STD_SVC_REVISION_MINOR, - ret.ret0, ret.ret1); + (unsigned long long)ret.ret0, + (unsigned long long)ret.ret1); test_result = TEST_RESULT_FAIL; } diff --git a/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c b/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c index 6f22769..7f7539d 100644 --- a/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c +++ b/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c @@ -53,7 +53,7 @@ * preempt_tsp_via_SGI routine. */ typedef struct { - smc64_ret_values tsp_result; + smc_ret_values tsp_result; int wait_for_fiq; } irq_handler_shared_data; @@ -77,7 +77,7 @@ static int sgi_handler(void *data) * This routine issues a SGI with interrupts disabled to make sure that the * pending SGI will preempt a STD SMC. */ -static test_result_t preempt_tsp_via_SGI(const smc64_args *tsp_svc_params, +static test_result_t preempt_tsp_via_SGI(const smc_args *tsp_svc_params, int hold_irq_handler_for_fiq) { int rc; @@ -114,11 +114,11 @@ static test_result_t preempt_tsp_via_SGI(const smc64_args *tsp_svc_params, * Invoke an STD SMC. Should be pre-empted because of the SGI that is * waiting. */ - shared_data.tsp_result = tftf_smc64(tsp_svc_params); + shared_data.tsp_result = tftf_smc(tsp_svc_params); if (shared_data.tsp_result.ret0 != TSP_SMC_PREEMPTED) { - tftf_testcase_printf("SMC returned 0x%lX instead of " + tftf_testcase_printf("SMC returned 0x%llX instead of " "TSP_SMC_PREEMPTED.\n", - shared_data.tsp_result.ret0); + (unsigned long long)shared_data.tsp_result.ret0); result = TEST_RESULT_FAIL; } @@ -148,8 +148,8 @@ static test_result_t preempt_tsp_via_SGI(const smc64_args *tsp_svc_params, */ test_result_t tsp_int_and_resume(void) { - smc64_args tsp_svc_params; - smc64_ret_values tsp_result = {0}; + smc_args tsp_svc_params; + smc_ret_values tsp_result = {0}; test_result_t res; uuid_t tos_uuid; char tos_uuid_str[UUID_STR_SIZE]; @@ -176,7 +176,7 @@ test_result_t tsp_int_and_resume(void) /* Now that we have ensured preemption, issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); /* Check the result of the addition */ if (tsp_result.ret0 != 0 || tsp_result.ret1 != 8 || @@ -200,7 +200,7 @@ test_result_t tsp_int_and_resume(void) /* Now that we have ensured preemption, issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); /* Check the result of the substraction */ if (tsp_result.ret0 != 0 || tsp_result.ret1 != 0 || @@ -223,7 +223,7 @@ test_result_t tsp_int_and_resume(void) /* Now that we have ensured preemption, issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); /* Check the result of the multiplication */ if (tsp_result.ret0 != 0 || tsp_result.ret1 != 16 || @@ -246,7 +246,7 @@ test_result_t tsp_int_and_resume(void) /* Now that we have ensured preemption, issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); /* Check the result of the division */ if (tsp_result.ret0 != 0 || tsp_result.ret1 != 1 || @@ -272,8 +272,8 @@ test_result_t tsp_int_and_resume(void) */ test_result_t test_fast_smc_when_tsp_preempted(void) { - smc64_args tsp_svc_params; - smc64_ret_values tsp_result = {0}; + smc_args tsp_svc_params; + smc_ret_values tsp_result = {0}; test_result_t res = TEST_RESULT_SUCCESS; uuid_t tos_uuid; char tos_uuid_str[UUID_STR_SIZE]; @@ -303,7 +303,7 @@ test_result_t test_fast_smc_when_tsp_preempted(void) tsp_svc_params.arg1 = 4; tsp_svc_params.arg2 = 6; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); if (tsp_result.ret0 != SMC_UNKNOWN) { tftf_testcase_printf("Fast SMC should not execute" @@ -313,7 +313,7 @@ test_result_t test_fast_smc_when_tsp_preempted(void) /* Issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); /* Check the result of the addition */ if (tsp_result.ret0 != 0 || tsp_result.ret1 != 8 || @@ -341,8 +341,8 @@ test_result_t test_fast_smc_when_tsp_preempted(void) */ test_result_t test_std_smc_when_tsp_preempted(void) { - smc64_args tsp_svc_params; - smc64_ret_values tsp_result = {0}; + smc_args tsp_svc_params; + smc_ret_values tsp_result = {0}; test_result_t res = TEST_RESULT_SUCCESS; uuid_t tos_uuid; char tos_uuid_str[UUID_STR_SIZE]; @@ -372,7 +372,7 @@ test_result_t test_std_smc_when_tsp_preempted(void) tsp_svc_params.arg1 = 4; tsp_svc_params.arg2 = 6; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); if (tsp_result.ret0 != SMC_UNKNOWN) { tftf_testcase_printf("Standard SMC should not execute" @@ -382,7 +382,7 @@ test_result_t test_std_smc_when_tsp_preempted(void) /* Issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); /* Check the result of the addition */ if (tsp_result.ret0 != 0 || tsp_result.ret1 != 8 || @@ -406,8 +406,8 @@ test_result_t test_std_smc_when_tsp_preempted(void) */ test_result_t test_resume_smc_without_preemption(void) { - smc64_args tsp_svc_params; - smc64_ret_values tsp_result = {0}; + smc_args tsp_svc_params; + smc_ret_values tsp_result = {0}; uuid_t tos_uuid; char tos_uuid_str[UUID_STR_SIZE]; @@ -425,7 +425,7 @@ test_result_t test_resume_smc_without_preemption(void) /* Issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); if (tsp_result.ret0 != SMC_UNKNOWN) { tftf_testcase_printf("SMC Resume should return UNKNOWN, got:%d\n", \ @@ -445,8 +445,8 @@ test_result_t test_resume_smc_without_preemption(void) */ test_result_t tsp_int_and_resume_stress(void) { - smc64_args tsp_svc_params; - smc64_ret_values tsp_result = {0}; + smc_args tsp_svc_params; + smc_ret_values tsp_result = {0}; test_result_t res = TEST_RESULT_SUCCESS; uuid_t tos_uuid; char tos_uuid_str[UUID_STR_SIZE]; @@ -479,7 +479,7 @@ test_result_t tsp_int_and_resume_stress(void) /* Issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); /* Check the result of the addition */ if (tsp_result.ret0 != 0 || tsp_result.ret1 != 8 || @@ -513,8 +513,8 @@ test_result_t tsp_int_and_resume_stress(void) */ test_result_t tsp_fiq_while_int(void) { - smc64_args tsp_svc_params; - smc64_ret_values tsp_result = {0}; + smc_args tsp_svc_params; + smc_ret_values tsp_result = {0}; test_result_t res; uuid_t tos_uuid; char tos_uuid_str[UUID_STR_SIZE]; @@ -541,7 +541,7 @@ test_result_t tsp_fiq_while_int(void) /* Now that we have ensured preemption, issue RESUME */ tsp_svc_params.arg0 = TSP_FID_RESUME; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); /* Check the result of the addition */ if (tsp_result.ret0 != 0 || tsp_result.ret1 != 8 || diff --git a/tests/runtime_services/trusted_os/tsp/test_smc_tsp_std_fn_call.c b/tests/runtime_services/trusted_os/tsp/test_smc_tsp_std_fn_call.c index dec1107..80854d7 100644 --- a/tests/runtime_services/trusted_os/tsp/test_smc_tsp_std_fn_call.c +++ b/tests/runtime_services/trusted_os/tsp/test_smc_tsp_std_fn_call.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -49,8 +49,8 @@ */ test_result_t test_smc_tsp_std_fns_call(void) { - smc64_args std_svc_args; - smc64_ret_values ret; + smc_args std_svc_args; + smc_ret_values ret; uuid_t tos_uuid; char tos_uuid_str[UUID_STR_SIZE]; @@ -68,22 +68,24 @@ test_result_t test_smc_tsp_std_fns_call(void) /* TrustedOS Service Call Count */ std_svc_args.arg0 = SMC_TOS_CALL_COUNT; - ret = tftf_smc64(&std_svc_args); + ret = tftf_smc(&std_svc_args); if (ret.ret0 != TSP_NUM_FID) { tftf_testcase_printf("Wrong Call Count: expected %u,\n" - " got %lu\n", TSP_NUM_FID, ret.ret0); + " got %llu\n", TSP_NUM_FID, + (unsigned long long)ret.ret0); return TEST_RESULT_FAIL; } /* TrustedOS Service Call Revision details */ std_svc_args.arg0 = SMC_TOS_REVISION; - ret = tftf_smc64(&std_svc_args); + ret = tftf_smc(&std_svc_args); if ((ret.ret0 != TSP_REVISION_MAJOR) || ret.ret1 != TSP_REVISION_MINOR) { tftf_testcase_printf("Wrong Revision: expected {%u.%u}\n" - " got {%lu.%lu}\n", + " got {%llu.%llu}\n", TSP_REVISION_MAJOR, TSP_REVISION_MINOR, - ret.ret0, ret.ret1); + (unsigned long long)ret.ret0, + (unsigned long long)ret.ret1); return TEST_RESULT_FAIL; } diff --git a/tests/runtime_services/trusted_os/tsp/test_tsp_fast_smc.c b/tests/runtime_services/trusted_os/tsp/test_tsp_fast_smc.c index c464690..aa27fb1 100644 --- a/tests/runtime_services/trusted_os/tsp/test_tsp_fast_smc.c +++ b/tests/runtime_services/trusted_os/tsp/test_tsp_fast_smc.c @@ -62,10 +62,10 @@ static test_result_t validate_tsp_operations(uint64_t fn_identifier, uint64_t ret1, uint64_t ret2) { - smc64_args tsp_svc_params = {fn_identifier, arg1, arg2}; - smc64_ret_values tsp_result; + smc_args tsp_svc_params = {fn_identifier, arg1, arg2}; + smc_ret_values tsp_result; - tsp_result = tftf_smc64(&tsp_svc_params); + tsp_result = tftf_smc(&tsp_svc_params); if (tsp_result.ret0) { tftf_testcase_printf("TSP operation 0x%x failed, error:0x%x\n", |