Create and use a new cacheline-aligned reference type#5744
Merged
Conversation
Dominaezzz
reviewed
Jun 15, 2026
Dominaezzz
left a comment
Collaborator
There was a problem hiding this comment.
I know it's a draft but I couldn't look away from such big DMA changes....
4d4fe06 to
2e59c37
Compare
Dominaezzz
reviewed
Jun 16, 2026
Dominaezzz
left a comment
Collaborator
There was a problem hiding this comment.
Overall LGTM but I'll say the InternalMemory name is still really unfortunate
4c54c4d to
3c7d958
Compare
Contributor
Author
|
/hil full |
This comment was marked as outdated.
This comment was marked as outdated.
|
Triggered full HIL run for #5744. Run: https://github.com/esp-rs/esp-hal/actions/runs/27691042282 Status update: HIL (full) run is still in progress or status unknown. |
Member
|
Not sure why the bot struggled here, HIL failed at the build stage, the tests need updating I think. |
Contributor
Author
It's doing what I ask of it, I'm babysitting the process. |
Dominaezzz
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal of this PR is to make the *DmaBuf types take the cacheline-wrapped descriptors/buffers by default, and allow a safe validating, as well as an unsafe fallback option to construct them.
The new reference type has safe cache operations and can represent data living in both internal RAM and PSRAM.
This reference type will be the base of most of our DMA internals - it validates slices/descriptor lists, it can safely implement cache operations because of its invariants, and hopefully will allow us to have higher perf by avoiding unnecessary writebacks as well. It makes constructing buffers a bit less friendly, but that's hidden from us by the macros currently.
This would have been part of #5728 but it's annoyingly big by itself.
Changelog
esp-hal/DMA
esp_hal::dma::aligned::{InternalMemory, DmaAlignedMut}types.DmaAlignedMut-wrapped descriptor lists and buffers.