Skip to content

Commit 21bad9c

Browse files
committed
[nrf noup] zephyr: Move KMU base slot configuration to Kconfig
Added Kconfig option NCS_BOOT_SIGNATURE_KMU_BASE_SLOT that controlls base slot used by KMU. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 9e03c89 commit 21bad9c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

boot/bootutil/src/ed25519_psa.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,7 @@ BOOT_LOG_MODULE_REGISTER(ed25519_psa);
2727
/* List of KMU stored key ids available for MCUboot */
2828
#define PSA_KEY_INDEX_SIZE 2
2929

30-
#if CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER != -1 || \
31-
defined(CONFIG_NCS_BOOT_SIGNATURE_KMU_UROT_MAPPING)
32-
#define PSA_KEY_STARTING_ID 226
33-
#else
34-
#define PSA_KEY_STARTING_ID 242
35-
#endif
30+
#define PSA_KEY_STARTING_ID CONFIG_NCS_BOOT_SIGNATURE_KMU_BASE_SLOT
3631

3732
#define MAKE_PSA_KMU_KEY_ID(id) PSA_KEY_HANDLE_FROM_CRACEN_KMU_SLOT(CRACEN_KMU_KEY_USAGE_SCHEME_RAW, id)
3833
static psa_key_id_t key_ids[] = {

boot/zephyr/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,15 @@ config BOOT_KMU_KEYS_REVOCATION
446446
help
447447
Enabling KMU key revocation backend.
448448

449+
config NCS_BOOT_SIGNATURE_KMU_BASE_SLOT
450+
int
451+
depends on BOOT_SIGNATURE_USING_KMU
452+
default 226 if NCS_BOOT_SIGNATURE_KMU_UROT_MAPPING
453+
default 226 if MCUBOOT_MCUBOOT_IMAGE_NUMBER != -1
454+
default 242
455+
help
456+
Base key identifier for KMU.
457+
449458
config NCS_BOOT_SIGNATURE_USING_ITS
450459
bool "Use ITS stored keys for signature verification"
451460
depends on NRF_SECURITY

0 commit comments

Comments
 (0)