Software APIs
rom.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_SILICON_CREATOR_ROM_ROM_H_
6 #define OPENTITAN_SW_DEVICE_SILICON_CREATOR_ROM_ROM_H_
7 
8 #include <stdnoreturn.h>
9 
10 #include "sw/device/silicon_creator/lib/error.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif // __cplusplus
15 
16 /**
17  * ROM states run callbacks.
18  */
19 static OT_WARN_UNUSED_RESULT rom_error_t rom_state_init(void *arg,
20  uint32_t *next_state);
21 static OT_WARN_UNUSED_RESULT rom_error_t
22 rom_state_bootstrap_check(void *arg, uint32_t *next_state);
23 static OT_WARN_UNUSED_RESULT rom_error_t
24 rom_state_bootstrap(void *arg, uint32_t *next_state);
25 static OT_WARN_UNUSED_RESULT rom_error_t
26 rom_state_boot_rom_ext(void *arg, uint32_t *next_state);
27 
28 /**
29  * The first C function executed by the ROM (defined in `rom.c`)
30  */
31 noreturn void rom_main(void);
32 
33 #ifdef __cplusplus
34 } // extern "C"
35 #endif // __cplusplus
36 
37 #endif // OPENTITAN_SW_DEVICE_SILICON_CREATOR_ROM_ROM_H_