-
Notifications
You must be signed in to change notification settings - Fork 1.4k
nrf_security: CRACEN: Update hw version configs for ns #25719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates CRACEN hardware version configuration naming from CRACEN_HW_VERSION_* to PSA_NEED_CRACEN_HW_VERSION_* to enable compatibility with TF-m secure builds using PSA_NEED configs.
- Renames Kconfig symbols from
CRACEN_HW_VERSION_BASEandCRACEN_HW_VERSION_LITEto usePSA_NEED_prefix - Adds corresponding cmakedefine entries in psa_crypto_config.h.template
- Updates cmake configuration to process the new config names
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| subsys/nrf_security/src/drivers/cracen/Kconfig | Renames HW version config symbols to use PSA_NEED prefix and reorders CRACEN_KMU_HW_PRESENT definition |
| subsys/nrf_security/configs/psa_crypto_config.h.template | Adds cmakedefine entries for the new PSA_NEED_CRACEN_CRACEN_HW_VERSION_* symbols |
| subsys/nrf_security/cmake/psa_crypto_config.cmake | Adds kconfig_check_and_set_base_to_one calls for the new config symbols |
Comments suppressed due to low confidence (1)
subsys/nrf_security/src/drivers/cracen/Kconfig:47
- This line references the old config name
CRACEN_HW_VERSION_BASEwhich has been renamed toPSA_NEED_CRACEN_HW_VERSION_BASEin line 13 of this file. This dependency should be updated todepends on PSA_NEED_CRACEN_HW_VERSION_BASEto match the new config name.
depends on CRACEN_HW_VERSION_BASE
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: b3f275857426c52cdbde2bb0ef18c036779ec49a more detailssdk-nrf:
Github labels
List of changed files detected by CI (8)Outputs:ToolchainVersion: 964ddb2c70 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
|
You can find the documentation preview for this PR here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -52,7 +52,7 @@ module with entropy will fail" | |||
| #define PK_BUSY_MASK_BA414EP 0x00010000 | |||
| #define PK_BUSY_MASK_IK 0x00050000 | |||
|
|
|||
| #define IK_ENTROPY_ERROR 0xc6 | |||
| #define IK_ENTROPY_ERROR 0xc6 | |||
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This whitespace change appears unrelated to the config renaming and introduces inconsistent spacing. Lines 52-53 use multiple spaces to align the hex values, but this change reduces the spacing for line 55. Consider either keeping the original spacing or aligning all three defines consistently.
| @@ -51,7 +51,7 @@ int sx_pk_list_ik_inslots(sx_pk_req *req, unsigned int key, struct sx_pk_slot *i | |||
| const struct sx_pk_capabilities *caps; | |||
|
|
|||
| if (req->cmd->cmdcode == PK_OP_IK_EXIT) { | |||
| #ifdef CONFIG_CRACEN_HW_VERSION_LITE | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compilation of this file fails for 54LM20 and 54LV10 since the ifdef at line 21 does not include the header-file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update HW versions to use PSA_ configs. This is to allow the configs to be used in secure when building with TF-m. This fixes some issues with settings not being correct for some versions of CRACEN. Signed-off-by: Dag Erik Gjørvad <[email protected]>
tomi-font
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you mean to use PSA_CRACEN_HW_VERSION_* and not CONFIG_PSA_CRACEN_HW_VERSION_* in the source files?
| #cmakedefine PSA_CRACEN_HW_VERSION_BASE @PSA_CRACEN_HW_VERSION_BASE@ | ||
| #cmakedefine PSA_CRACEN_HW_VERSION_LITE @PSA_CRACEN_HW_VERSION_LITE@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alignment is off
Update HW versions to use PSA_NEED configs.
This is to allow the configs to be used in secure when building with TF-m.