Short-circuit dcache disable#293
Merged
JonatanAntoni merged 1 commit intoARM-software:mainfrom Apr 20, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents SCB_DisableDCache() from performing a clean+invalidate sequence when the D-cache is already disabled, avoiding potential write-back of undefined cache contents after a power-on reset (POR).
Changes:
- Added an early-return guard in
SCB_DisableDCache()whenSCB->CCR.DCis not set.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 292 files - 352 292 suites - 352 0s ⏱️ - 14m 47s Results for commit b1b2bb5. ± Comparison against base commit f622607. This pull request removes 49 and adds 56 tests. Note that renamed tests count towards both.This pull request removes 5 skipped tests and adds 2 skipped tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Do not attempt to clean and invalidate the DCache if SCB_DisableDCache is invoked when it was not enabled in the first place. This prevents landing junk into RAM after a POR.
6c0afec to
b1b2bb5
Compare
JonatanAntoni
approved these changes
Apr 20, 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.
Do not attempt to clean and invalidate the DCache if SCB_DisableDCache is invoked when it was not enabled in the first place. This prevents landing junk into RAM after a POR.