Mistake on this page?
Report an issue in GitHub or email us
val_interfaces.h
Go to the documentation of this file.
1 /** @file
2  * Copyright (c) 2018-2019, 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 "val_client_defs.h"
23 #include "pal_interfaces_ns.h"
24 
25 /* typedef's */
26 typedef struct {
27  val_status_t (*print) (print_verbosity_t verbosity,
28  const char *string, uint32_t data);
29  val_status_t (*set_status) (uint32_t status);
30  uint32_t (*get_status) (void);
31  void (*test_init) (uint32_t test_num, char8_t *desc,
32  uint32_t test_bitfield);
33  void (*test_exit) (void);
34  val_status_t (*err_check_set) (uint32_t checkpoint, val_status_t status);
35  val_status_t (*target_get_config) (cfg_id_t cfg_id, uint8_t **data, uint32_t *size);
36  val_status_t (*execute_non_secure_tests) (uint32_t test_num, client_test_t *tests_list,
37  bool_t server_hs);
38  val_status_t (*switch_to_secure_client) (uint32_t test_num);
39  val_status_t (*execute_secure_test_func) (psa_handle_t *handle, test_info_t test_info,
40  uint32_t sid);
41  val_status_t (*ipc_connect) (uint32_t sid, uint32_t minor_version,
42  psa_handle_t *handle );
43  val_status_t (*ipc_call) (psa_handle_t handle, psa_invec *in_vec,
44  size_t in_len, psa_outvec *out_vec,
45  size_t out_len);
46  void (*ipc_close) (psa_handle_t handle);
47  val_status_t (*get_secure_test_result) (psa_handle_t *handle);
48  val_status_t (*nvmem_read) (uint32_t offset, void *buffer, int size);
49  val_status_t (*nvmem_write) (uint32_t offset, void *buffer, int size);
50  val_status_t (*wd_timer_init) (wd_timeout_type_t timeout_type);
51  val_status_t (*wd_timer_enable) (void);
52  val_status_t (*wd_timer_disable) (void);
53  val_status_t (*wd_reprogram_timer) (wd_timeout_type_t timeout_type);
54  val_status_t (*set_boot_flag) (boot_state_t state);
55  val_status_t (*get_boot_flag) (boot_state_t *state);
56  int32_t (*crypto_function) (int type, ...);
57  uint32_t (*its_function) (int type, ...);
58  uint32_t (*ps_function) (int type, ...);
59  int32_t (*attestation_function) (int type, ...);
60 } val_api_t;
61 
62 typedef struct {
63  uint32_t (*framework_version) (void);
64  uint32_t (*version) (uint32_t sid);
65  psa_handle_t (*connect) (uint32_t sid, uint32_t minor_version);
66  psa_status_t (*call) (psa_handle_t handle,
67  const psa_invec *in_vec,
68  size_t in_len,
69  psa_outvec *out_vec,
70  size_t out_len
71  );
72  void (*close) (psa_handle_t handle);
73 } psa_api_t;
74 
75 typedef void (*test_fptr_t)(val_api_t *val, psa_api_t *psa);
76 
77 typedef struct {
78  test_id_t test_id;
79  test_fptr_t entry_addr;
81 
82 void test_entry(val_api_t *val, psa_api_t *psa);
83 #endif
void test_init()
Test Watchdog init with a valid config.
Copyright (c) 2018-2019, Arm Limited or its affiliates.
Copyright (c) 2018-2019, Arm Limited or its affiliates.
Structure which describes a scatter-gather output buffer.
Definition: client.h:54
Structure that describes a scatter-gather input buffer.
Definition: client.h:48
Copyright (c) 2018-2019, Arm Limited or its affiliates.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.