Software APIs
edn_sca.h
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_SCA_EDN_SCA_H_
6 #define OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_SCA_EDN_SCA_H_
7 
8 #include "sw/device/lib/base/status.h"
9 #include "sw/device/lib/ujson/ujson.h"
10 
11 /**
12  * edn.sca.bus_data_batch command handler.
13  *
14  * Batch version of edn.sca.bus_data with random data.
15  *
16  * @param uj An initialized uJSON context.
17  * @return OK or error.
18  */
19 status_t handle_edn_sca_bus_data_batch(ujson_t *uj);
20 
21 /**
22  * edn.sca.bus_data command handler.
23  *
24  * The goal of this penetration test is to capture traces when
25  * randomness is transported over the bus to Ibex.
26  *
27  * @param uj An initialized uJSON context.
28  * @return OK or error.
29  */
30 status_t handle_edn_sca_bus_data(ujson_t *uj);
31 
32 /**
33  * Initializes the trigger and configures the device for the EDN SCA test.
34  *
35  * @param uj An initialized uJSON context.
36  * @return OK or error.
37  */
38 status_t handle_edn_sca_init(ujson_t *uj);
39 
40 /**
41  * EDN SCA command handler.
42  *
43  * Command handler for the EDN SCA command.
44  *
45  * @param uj An initialized uJSON context.
46  * @return OK or error.
47  */
48 status_t handle_edn_sca(ujson_t *uj);
49 
50 #endif // OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_SCA_EDN_SCA_H_