Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache/Memory mapping #955

Closed
MabezDev opened this issue Nov 17, 2023 · 4 comments
Closed

Cache/Memory mapping #955

MabezDev opened this issue Nov 17, 2023 · 4 comments

Comments

@MabezDev
Copy link
Member

Copied from #954 (comment)

Huh, last time I went looking into how the cache works it was all ROM code and zero docs. Now there is a esp_mm component: https://github.com/espressif/esp-idf/tree/c8243465e45489835d645bf217a6929fd0c01b7f/components/esp_mm with some docs as to how it works. Maybe we should try and port some of this into esp-hal.

We could replace this piece of code (which is currently hardcoded) with a proper cache driver.

One limitation we have is that I don't think any of the cache registers are in the SVDs - but it looks like there is only one register with just a few bits: https://github.com/espressif/esp-idf/blob/c8243465e45489835d645bf217a6929fd0c01b7f/components/esp_mm/include/esp_cache.h#L21-L47

@MabezDev MabezDev changed the title Cache/Memory map management Cache/Memory mapping Nov 17, 2023
@bjoernQ
Copy link
Contributor

bjoernQ commented Nov 17, 2023

Ah we actually configure something for S3, didn't knew that 🤔 Oh - that was me

@ProfFan
Copy link
Contributor

ProfFan commented Nov 21, 2023

Ah we actually configure something for S3, didn't knew that 🤔 Oh - that was me

Is the DCACHE only enabled when using the PSRAM driver?

@bjoernQ
Copy link
Contributor

bjoernQ commented Nov 27, 2023

I think for most targets the second stage bootloader will enable it and use whatever was configured when building it
For S3 (something I re-learned) we always configure it in esp-hal. It's a bit inconsistent IMHO

@MabezDev
Copy link
Member Author

MabezDev commented Oct 8, 2024

I don't think this will be a priority for a long long while, closing for now.

@MabezDev MabezDev closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants