blob: 728c63cc18dbeaf3254319aa85b43ad1a3a68ad9 [file] [log] [blame]
Pascal Brandc639ac82015-07-02 08:53:34 +02001/*
2 * Copyright (c) 2014, STMicroelectronics International N.V.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include "xtest_test.h"
15#include <tee_client_api.h>
16#include <ta_create_fail_test.h>
17#include <ta_crypt.h>
18#include <ta_os_test.h>
19#include <ta_rpc_test.h>
20#include <ta_sims_test.h>
21#include <ta_storage.h>
22#include <enc_fs_key_manager_test.h>
23#include <tee_api_defines.h>
Jerome Forissiere3688342015-09-24 10:45:17 -070024#ifdef WITH_GP_TESTS
Pascal Brand8a74e362015-09-10 12:41:52 +020025#include <tee_api_types.h>
26#include <TTA_DS_protocol.h>
27#endif
Pascal Brandc639ac82015-07-02 08:53:34 +020028
29ADBG_ENUM_TABLE_DEFINE_BEGIN(TEEC_Result)
30ADBG_ENUM_TABLE_ENTRY(TEEC_SUCCESS),
31ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_CORRUPT_OBJECT),
32ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_CORRUPT_OBJECT_2),
33ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_STORAGE_NOT_AVAILABLE),
34ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_STORAGE_NOT_AVAILABLE_2),
35ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_GENERIC),
36ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_ACCESS_DENIED),
37ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_CANCEL),
38ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_ACCESS_CONFLICT),
39ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_EXCESS_DATA),
40ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_BAD_FORMAT),
41ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_BAD_PARAMETERS),
42ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_BAD_STATE),
43ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_ITEM_NOT_FOUND),
44ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_NOT_IMPLEMENTED),
45ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_NOT_SUPPORTED),
46ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_NO_DATA),
47ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_OUT_OF_MEMORY),
48ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_BUSY),
49ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_COMMUNICATION),
50ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_SECURITY),
51ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_SHORT_BUFFER),
52ADBG_ENUM_TABLE_ENTRY(TEEC_ERROR_EXTERNAL_CANCEL),
53ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_OVERFLOW),
54ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_TARGET_DEAD),
55ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_STORAGE_NO_SPACE),
56ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_MAC_INVALID),
57ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_SIGNATURE_INVALID),
58ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_TIME_NOT_SET),
59ADBG_ENUM_TABLE_ENTRY(TEE_ERROR_TIME_NEEDS_RESET)
60ADBG_ENUM_TABLE_DEFINE_END(TEEC_Result);
61
62ADBG_ENUM_TABLE_DEFINE_BEGIN(TEEC_ErrorOrigin)
63ADBG_ENUM_TABLE_ENTRY(TEEC_ORIGIN_API),
64ADBG_ENUM_TABLE_ENTRY(TEEC_ORIGIN_COMMS),
65ADBG_ENUM_TABLE_ENTRY(TEEC_ORIGIN_TEE),
66ADBG_ENUM_TABLE_ENTRY(TEEC_ORIGIN_TRUSTED_APP)
67ADBG_ENUM_TABLE_DEFINE_END(TEEC_ErrorOrigin);
68
69#define ECC_SELF_TEST_UUID \
70 { 0xf34f4f3c, 0xab30, 0x4573, \
71 { 0x91, 0xBF, 0x3C, 0x57, 0x02, 0x4D, 0x51, 0x99 } }
72
73const TEEC_UUID crypt_user_ta_uuid = TA_CRYPT_UUID;
74const TEEC_UUID os_test_ta_uuid = TA_OS_TEST_UUID;
75const TEEC_UUID create_fail_test_ta_uuid = TA_CREATE_FAIL_TEST_UUID;
76const TEEC_UUID ecc_test_ta_uuid = ECC_SELF_TEST_UUID;
77const TEEC_UUID rpc_test_ta_uuid = TA_RPC_TEST_UUID;
78const TEEC_UUID sims_test_ta_uuid = TA_SIMS_TEST_UUID;
79const TEEC_UUID storage_ta_uuid = TA_STORAGE_UUID;
80const TEEC_UUID enc_fs_key_manager_test_ta_uuid = ENC_FS_KEY_MANAGER_TEST_UUID;
Jerome Forissiere3688342015-09-24 10:45:17 -070081#ifdef WITH_GP_TESTS
Pascal Brand8a74e362015-09-10 12:41:52 +020082const TEEC_UUID gp_tta_ds_uuid = TA_TTA_DS_UUID;
83#endif