jk-arm | 957cfea | 2021-06-18 15:52:12 +0530 | [diff] [blame] | 1 | /** @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" |
jk-arm | 957cfea | 2021-06-18 15:52:12 +0530 | [diff] [blame] | 22 | |
| 23 | /* typedef's */ |
| 24 | typedef struct { |
| 25 | val_status_t (*print) (print_verbosity_t verbosity, |
| 26 | const char *string, int32_t data); |
| 27 | val_status_t (*set_status) (uint32_t status); |
| 28 | uint32_t (*get_status) (void); |
| 29 | void (*test_init) (uint32_t test_num, char8_t *desc); |
| 30 | void (*test_exit) (void); |
| 31 | val_status_t (*err_check_set) (uint32_t checkpoint, val_status_t status); |
| 32 | } val_api_t; |
| 33 | |
| 34 | typedef void (*test_fptr_t)(val_api_t *val); |
| 35 | |
| 36 | typedef struct { |
| 37 | test_id_t test_id; |
| 38 | test_fptr_t entry_addr; |
| 39 | } val_test_info_t; |
| 40 | |
| 41 | typedef enum { |
| 42 | VAL_TEST_IDX0 = 0x0, |
| 43 | VAL_TEST_IDX1 = 0x1, |
| 44 | VAL_TEST_IDX2 = 0x2, |
| 45 | VAL_TEST_IDX3 = 0x3, |
| 46 | VAL_TEST_IDX4 = 0x4, |
| 47 | VAL_TEST_IDX5 = 0x5, |
| 48 | VAL_TEST_IDX6 = 0x6, |
| 49 | VAL_TEST_IDX7 = 0x7, |
| 50 | VAL_TEST_IDX8 = 0x8, |
| 51 | VAL_TEST_IDX9 = 0x9, |
| 52 | VAL_TEST_IDX10 = 0xA, |
| 53 | VAL_TEST_IDX11 = 0xB, |
| 54 | VAL_TEST_IDX12 = 0xC, |
| 55 | VAL_TEST_IDX13 = 0xD, |
| 56 | VAL_TEST_IDX14 = 0xE, |
| 57 | VAL_TEST_IDX15 = 0xF, |
| 58 | VAL_TEST_IDX16 = 0x10, |
| 59 | VAL_TEST_IDX17 = 0x11, |
| 60 | VAL_TEST_IDX18 = 0x12, |
| 61 | VAL_TEST_IDX19 = 0x13, |
| 62 | VAL_TEST_IDX20 = 0x14, |
| 63 | VAL_TEST_IDX21 = 0x15, |
| 64 | VAL_TEST_IDX22 = 0x16, |
| 65 | VAL_TEST_IDX23 = 0x17, |
| 66 | VAL_TEST_IDX24 = 0x18, |
| 67 | VAL_TEST_IDX25 = 0x19, |
| 68 | VAL_TEST_IDX26 = 0x1A, |
| 69 | VAL_TEST_IDX27 = 0x1B, |
| 70 | VAL_TEST_IDX28 = 0x1C, |
| 71 | VAL_TEST_IDX29 = 0x1D, |
| 72 | VAL_TEST_IDX30 = 0x1E, |
| 73 | } val_test_index_t; |
| 74 | |
| 75 | #include "test_entry_fn_declare_list.inc" |
| 76 | |
| 77 | void test_entry(val_api_t *val); |
| 78 | #endif |