lupyuen opened a new pull request, #13208: URL: https://github.com/apache/nuttx/pull/13208
## 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: https://github.com/apache/nuttx/pull/13199 This PR fixes the Slow Memory Access for NuttX Apps on Ox64 BL808 SBC: https://github.com/apache/nuttx/issues/12696. With this fix, Ox64 NuttX CoreMark jumps from 19 to 1,104. (Close to Buildroot Linux CoreMark) ### Modified Files `arch/risc-v/Kconfig`: Enabled `ARCH_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)](https://gist.github.com/lupyuen/c345aefa925ba25ba543998825d1dad5) ```text NuttShell (NSH) NuttX-12.6.0-RC1 nsh> uname -a NuttX 12.6.0-RC1 d59fbfdbdcd Aug 28 2024 10:19:58 risc-v ox64 nsh> coremark CoreMark 1.0 : 19.093686 / GCC13.2.0 -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections -nostdlib -g / HEAP ``` __After the PR:__ CoreMark increases to 802 [(NuttX Log)](https://gist.github.com/lupyuen/789cc5e70f0a13f6f7b88ca622d1bb3b) ```text NuttShell (NSH) NuttX-12.6.0-RC1 nsh> uname -a NuttX 12.6.0-RC1 c398049866a Aug 28 2024 10:16:16 risc-v ox64 nsh> coremark CoreMark 1.0 : 801.632415 / GCC13.2.0 -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections -nosg / HEAP ``` And OSTest completes successfully: ```text nsh> ostest ostest_main: Exiting with status 0 ``` Note that Ox64 CoreMark will [increase further to 1,104](https://gist.github.com/lupyuen/88553136e0a8dad183babd5a56e10b12) when we compile [CoreMark optimised with `-O2`](https://github.com/apache/nuttx/issues/12696#issuecomment-2232279326) ```text nsh> coremark CoreMark 1.0 : 1103.509159 / GCC13.2.0 -O2 -fno-strtion-sections -fdata-sections -nostdlib / HEAP ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
