Software APIs
rom_fi.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_FI_ROM_FI_H_
6 #define OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_FI_ROM_FI_H_
7 
8 #include "sw/device/lib/base/status.h"
9 #include "sw/device/lib/ujson/ujson.h"
10 
11 /**
12  * ROM read FI test.
13  *
14  * Read the ROM digest while injecting faults.
15  *
16  * @param uj An initialized uJSON context.
17  * @return OK or error.
18  */
19 status_t handle_rom_fi_init(ujson_t *uj);
20 
21 /**
22  * Initializes the trigger and configures the device for the Rom FI test.
23  *
24  * @param uj An initialized uJSON context.
25  * @return OK or error.
26  */
27 status_t handle_rom_fi_init(ujson_t *uj);
28 
29 /**
30  * Rom FI command handler.
31  *
32  * Command handler for the Rom FI command.
33  *
34  * @param uj An initialized uJSON context.
35  * @return OK or error.
36  */
37 status_t handle_rom_fi(ujson_t *uj);
38 
39 #endif // OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_FIRMWARE_FI_ROM_FI_H_