server: add dma memcpy callback and add guard for CMAC DMA and KEY DMA#146
server: add dma memcpy callback and add guard for CMAC DMA and KEY DMA#146billphipps merged 9 commits intowolfSSL:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for custom DMA memory copy callbacks and introduces configuration guards to selectively disable CMAC DMA and key DMA functionality. This provides more flexibility in DMA operations while allowing systems to exclude specific DMA features when not needed.
- Adds custom DMA memory copy callback infrastructure with new configuration option
WOLFHSM_CFG_DMA_CUSTOM_CLIENT_COPY - Introduces guards
WOLFHSM_CFG_NO_CMAC_DMAandWOLFHSM_CFG_NO_KEY_DMAto disable specific DMA operations - Updates DMA copy functions to use custom callbacks when available, falling back to memcpy when not configured
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wolfhsm/wh_settings.h | Adds documentation for the three new configuration options |
| wolfhsm/wh_server.h | Defines new callback types, updates context structures, and adds registration function declaration |
| test/wh_test_crypto.c | Adds guard to conditionally compile key DMA tests |
| src/wh_server_dma.c | Implements custom callback registration and integrates callbacks into copy operations |
| src/wh_server_crypto.c | Adds guard around CMAC DMA handling |
| src/wh_client_cryptocb.c | Adds guard around CMAC DMA client-side handling |
bigbrett
left a comment
There was a problem hiding this comment.
A few nits and some edits for clarity. I also bring up a global architecture question for discussion.
Co-authored-by: Brett Nicholas <7547222+bigbrett@users.noreply.github.com>
Co-authored-by: Brett Nicholas <7547222+bigbrett@users.noreply.github.com>
Co-authored-by: Brett Nicholas <7547222+bigbrett@users.noreply.github.com>
This reverts commit ff0ab4a.
Thanks for the review, fixed nits and reverted unneeded macros, let me know if you want me to do some git history cleaning before going forward. |
billphipps
left a comment
There was a problem hiding this comment.
I have a few naming nits that I'll bring in a future PR and I'll tag with Brett about making this the default and removing the CFG value. Looks good!
Let's work a few of the other questions after the PIC32CZ changes are merged and tested as that exercises this interface.
No description provided.