![]() |
nRF Connect SDK API 3.3.99
|
#include <string.h>#include <zephyr/types.h>#include <zephyr/autoconf.h>#include <nrfx.h>#include <errno.h>Go to the source code of this file.
Data Structures | |
| struct | life_cycle_state_data |
| struct | monotonic_counter |
| struct | collection |
| struct | counter_collection |
| struct | variable_data |
| struct | variable_data_collection |
| struct | bl_storage_data |
Macros | |
| #define | EHASHFF 113 /* A hash contains too many 0xFs. */ |
| #define | EREADLCS 114 /* LCS field of OTP is in an invalid state */ |
| #define | EINVALIDLCS 115 /* Invalid LCS*/ |
| #define | SB_PUBLIC_KEY_HASH_LEN 16 |
| #define | BL_MONOTONIC_COUNTERS_DESC_NSIB 0x1 |
| #define | BL_MONOTONIC_COUNTERS_DESC_MCUBOOT_ID0 0x2 |
| #define | BL_STORAGE_IMPLEMENTATION_ID_SIZE 32 |
Enumerations | |
| enum | collection_type { BL_COLLECTION_TYPE_MONOTONIC_COUNTERS = 1 , BL_COLLECTION_TYPE_VARIABLE_DATA = 0x9312 } |
| enum | variable_data_type { BL_VARIABLE_DATA_TYPE_PSA_CERTIFICATION_REFERENCE = 0x1 } |
| enum | bl_storage_lcs { BL_STORAGE_LCS_UNKNOWN = 0 , BL_STORAGE_LCS_ASSEMBLY = 1 , BL_STORAGE_LCS_PROVISIONING = 2 , BL_STORAGE_LCS_SECURED = 3 , BL_STORAGE_LCS_DECOMMISSIONED = 4 } |
| The PSA life cycle states a device can be in. More... | |
Functions | |
| uint32_t | s0_address_read (void) |
| Function for reading address of slot 0. | |
| uint32_t | s1_address_read (void) |
| Function for reading address of slot 1. | |
| uint32_t | num_public_keys_read (void) |
| Function for reading number of public key data slots. | |
| int | verify_public_keys (void) |
| Function for verifying public keys. | |
| int | public_key_data_read (uint32_t key_idx, uint8_t *p_buf) |
| Function for reading public key hashes. | |
| void | invalidate_public_key (uint32_t key_idx) |
| Function for invalidating a public key. | |
| int | num_monotonic_counter_slots (uint16_t counter_desc, uint16_t *counter_slots) |
| Get the number of monotonic counter slots. | |
| int | get_monotonic_counter (uint16_t counter_desc, counter_t *counter_value) |
| Get the current HW monotonic counter. | |
| int | set_monotonic_counter (uint16_t counter_desc, counter_t new_counter) |
| Set the current HW monotonic counter. | |
| int | is_monotonic_counter_update_possible (uint16_t counter_desc) |
| Checks whether it is possible to update the monotonic counter to a new value. | |
| int | read_life_cycle_state (enum bl_storage_lcs *lcs) |
| Read the current life cycle state the device is in from OTP,. | |
| int | update_life_cycle_state (enum bl_storage_lcs next_lcs) |
| Update the life cycle state in OTP. | |
| void | read_implementation_id_from_otp (uint8_t *buf) |
| int | read_variable_data (enum variable_data_type data_type, uint8_t *buf, uint32_t *buf_len) |
| Read variable data from OTP. | |
Variables | |
| const volatile struct bl_storage_data *const | BL_STORAGE |