risc-v/bl808: Configure MMU to cache User Text, Data and Heap #77
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.
Summary
This PR configures the BL808 MMU to cache the the User Text, Data and Heap. We enable the T-Head MMU Flags for Shareable, Bufferable and Cacheable, as explained in the previous PR: apache#13199
This PR fixes the Slow Memory Access for NuttX Apps on Ox64 BL808 SBC: apache#12696. With this fix, Ox64 NuttX CoreMark jumps from 19 to 1,104. (Close to Buildroot Linux CoreMark)
Modified Files
arch/risc-v/Kconfig
: EnabledARCH_MMU_EXT_THEAD
for BL808 SoC.Impact
This PR affects only the BL808 SoC and the Ox64 SBC.
Testing
We tested on Pine64 Ox64 SBC with BL808 SoC:
Before the PR: CoreMark is 19 (NuttX Log)
After the PR: CoreMark increases to 802 (NuttX Log)
And OSTest completes successfully:
Note that Ox64 CoreMark will increase further to 1,104 when we compile CoreMark optimised with
-O2