Software APIs
ownership.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_LIB_OWNERSHIP_OWNERSHIP_H_
6 #define OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_OWNERSHIP_OWNERSHIP_H_
7 
9 #include "sw/device/silicon_creator/lib/boot_data.h"
10 #include "sw/device/silicon_creator/lib/error.h"
11 #include "sw/device/silicon_creator/lib/ownership/datatypes.h"
12 #include "sw/device/silicon_creator/lib/ownership/owner_block.h"
13 
14 /**
15  * Initialize the owner pages from flash
16  */
17 rom_error_t ownership_init(boot_data_t *bootdata, owner_config_t *config,
19 
20 /**
21  * Lockdown the flash configuration.
22  *
23  * @param bootdata The current bootdata.
24  * @param active_slot The active slot.
25  * @param config The current owner configuration.
26  * @return error state.
27  */
28 rom_error_t ownership_flash_lockdown(boot_data_t *bootdata,
29  uint32_t active_slot,
30  const owner_config_t *config);
31 
32 /**
33  * Lockdown the ownership info pages.
34  *
35  * @param bootdata The current bootdata.
36  * @param rescue Whether the ROM_EXT is in rescue mode.
37  */
38 void ownership_pages_lockdown(boot_data_t *bootdata, hardened_bool_t rescue);
39 
40 #endif // OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_OWNERSHIP_OWNERSHIP_H_