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

spiram: Fix corrupting 1 kB of noinit data in spiram in 2T mode (IDFGH-11242) #12404

Closed
wants to merge 1 commit into from

Conversation

jovermann
Copy link

The function psram_2t_mode_check() in esp_psram_impl_quad.c overwrites the first kilobyte of every megabyte with 0xff upon startup which may overwrite noinit data which should be preserved over reboots.

This patch fixes this by saving/restoring the tested memory.

The test size has been reduced from 41024 bytes to 4512 bytes just to keep the stack usage of the fuction within resonable limits (was 2048 bytes, now 1536 bytes).

Fixes #12395
(IDFGH-11231)

…H-11231)

The function psram_2t_mode_check() in esp_psram_impl_quad.c
overwrites the first kilobyte of every megabyte with 0xff upon startup
which may overwrite noinit data which should be preserved over reboots.

This patch fixes this by saving/restoring the tested memory.

The test size has been reduced from 4*1024 bytes to 4*512 bytes just
to keep the stack usage of the fuction within resonable limits
(was 2048 bytes, now 1536 bytes).
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Overmann, Johannes seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link

Messages
📖 Good Job! All checks are passing!

👋 Welcome jovermann, thank you for your first contribution to espressif/esp-idf project!

📘 Please check Contributions Guide for the contribution checklist, information regarding code and documentation style, testing and other topics.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for espressif/esp-idf project.

Pull request review and merge process you can expect

Espressif develops the ESP-IDF project in an internal repository (Gitlab). We do welcome contributions in the form of bug reports, feature requests and pull requests via this public GitHub repository.

  1. An internal issue has been created for the PR, we assign it to the relevant engineer
  2. They review the PR and either approve it or ask you for changes or clarifications
  3. Once the Github PR is approved, we synchronize it into our internal git repository
  4. In the internal git repository we do the final review, collect approvals from core owners and make sure all the automated tests are passing
    • At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
  5. If the change is approved and passes the tests it is merged into the master branch
  6. On next sync from the internal git repository merged change will appear in this public Github repository

Generated by 🚫 dangerJS against 913e0be

@espressif-bot espressif-bot added the Status: Opened Issue is new label Oct 13, 2023
@github-actions github-actions bot changed the title spiram: Fix corrupting 1 kB of noinit data in spiram in 2T mode spiram: Fix corrupting 1 kB of noinit data in spiram in 2T mode (IDFGH-11242) Oct 13, 2023
@jovermann jovermann closed this Oct 13, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Won't Do This will not be worked on and removed Status: Opened Issue is new labels Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1024 bytes of .ext_ram_noinit cleared after esp_restart() with CONFIG_SPIRAM_2T_MODE=y (IDFGH-11231)
3 participants