blob: eca9a63c0909caae1da008ffdf36e55b7c5ed6d6 [file] [log] [blame]
jk-arm957cfea2021-06-18 15:52:12 +05301/** @file
2 * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
3 * SPDX-License-Identifier : Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16**/
17
18#ifndef _VAL_INTERFACES_H_
19#define _VAL_INTERFACES_H_
20
21#include "val.h"
22#include "pal_interfaces.h"
23
24/* typedef's */
25typedef struct {
26 val_status_t (*print) (print_verbosity_t verbosity,
27 const char *string, int32_t data);
28 val_status_t (*set_status) (uint32_t status);
29 uint32_t (*get_status) (void);
30 void (*test_init) (uint32_t test_num, char8_t *desc);
31 void (*test_exit) (void);
32 val_status_t (*err_check_set) (uint32_t checkpoint, val_status_t status);
33} val_api_t;
34
35typedef void (*test_fptr_t)(val_api_t *val);
36
37typedef struct {
38 test_id_t test_id;
39 test_fptr_t entry_addr;
40} val_test_info_t;
41
42typedef enum {
43 VAL_TEST_IDX0 = 0x0,
44 VAL_TEST_IDX1 = 0x1,
45 VAL_TEST_IDX2 = 0x2,
46 VAL_TEST_IDX3 = 0x3,
47 VAL_TEST_IDX4 = 0x4,
48 VAL_TEST_IDX5 = 0x5,
49 VAL_TEST_IDX6 = 0x6,
50 VAL_TEST_IDX7 = 0x7,
51 VAL_TEST_IDX8 = 0x8,
52 VAL_TEST_IDX9 = 0x9,
53 VAL_TEST_IDX10 = 0xA,
54 VAL_TEST_IDX11 = 0xB,
55 VAL_TEST_IDX12 = 0xC,
56 VAL_TEST_IDX13 = 0xD,
57 VAL_TEST_IDX14 = 0xE,
58 VAL_TEST_IDX15 = 0xF,
59 VAL_TEST_IDX16 = 0x10,
60 VAL_TEST_IDX17 = 0x11,
61 VAL_TEST_IDX18 = 0x12,
62 VAL_TEST_IDX19 = 0x13,
63 VAL_TEST_IDX20 = 0x14,
64 VAL_TEST_IDX21 = 0x15,
65 VAL_TEST_IDX22 = 0x16,
66 VAL_TEST_IDX23 = 0x17,
67 VAL_TEST_IDX24 = 0x18,
68 VAL_TEST_IDX25 = 0x19,
69 VAL_TEST_IDX26 = 0x1A,
70 VAL_TEST_IDX27 = 0x1B,
71 VAL_TEST_IDX28 = 0x1C,
72 VAL_TEST_IDX29 = 0x1D,
73 VAL_TEST_IDX30 = 0x1E,
74} val_test_index_t;
75
76#include "test_entry_fn_declare_list.inc"
77
78void test_entry(val_api_t *val);
79#endif