Skip to content

Conversation

soburi
Copy link
Member

@soburi soburi commented Jun 15, 2025

Comment out unused DMA-related code and add wrappers to expose
internal functions.

@soburi
Copy link
Member Author

soburi commented Jun 17, 2025

@ajf58 @ThreeEights @petejohanson @kartben

Could you take a look if you have a time, please?

Need to take care to not break these changes when updating pico-sdk.

## Patch List:
- [#10] pico-sdk: Disabling sanity check the IRQ status
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [#10] pico-sdk: Disabling sanity check the IRQ status
- [#10] pico-sdk: Disabling DMA routines and sanity check the IRQ status

Crypto subsystem does support DMA though, so if this feature becomes desired, then should it be implemented in the Zephyr driver part? Couldn't the existing HAL code be used for DMA operations?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DMA operations must be performed via the Zephyr DMA driver, so the HAL code cannot be used. DMA support must be implemented separately.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable, most of that code just calls into HAL DMA methods

Need to take care to not break these changes when updating pico-sdk.

## Patch List:
- [#11] pico-sdk: Disabling sanity check the IRQ status
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing it out.
The changes made during the rebase were not reflected, resulting in inconsistent content.
So, I changed the entire sentence.

Comment on lines 199 to 203
#if defined(__ZEPHYR__)
void pico_sha256_write_padding(pico_sha256_state_t *state) {
write_padding(state);
}
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #if !defined(__ZEPHYR__) is useful to keep merging new SDK releases. However, I don't think the inverse is required.

Suggested change
#if defined(__ZEPHYR__)
void pico_sha256_write_padding(pico_sha256_state_t *state) {
write_padding(state);
}
#endif
void pico_sha256_write_padding(pico_sha256_state_t *state) {
write_padding(state);
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's true that no one else had done it this way, so I reflected it.

Comment out unused DMA-related code and add wrappers to expose
internal functions.

Signed-off-by: TOKITA Hiroshi <[email protected]>
Add a note about the sha256 zephyr adaptation.

Signed-off-by: TOKITA Hiroshi <[email protected]>
@soburi
Copy link
Member Author

soburi commented Sep 20, 2025

@ajf58 @dsseng

Rebased.
Could you take a look please?

Copy link
Member

@dsseng dsseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All makes sense, good to go if it builds

@soburi soburi merged commit 09e9575 into zephyrproject-rtos:zephyr Sep 20, 2025
6 checks passed
@soburi soburi deleted the sha256 branch September 20, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants