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

Fix SEC_STAT.IRM bit handling in ARC SEM interrupt entry/exit #1182

Closed
wants to merge 1 commit into from

Conversation

vishwamartur
Copy link
Contributor

Related to #331

Fix the Memory Read Protection Violation from Secure MPU exception on exit from interrupt.

  • Add lr r3, [0x09] /* store SEC_STAT.IRM */ and and r3, r3, 0x8 before PUSH r3 in EXCEPTION_PROLOGUE and INTERRUPT_PROLOGUE.
  • Add POP r3 /* restore SEC_STAT.IRM */ and sflag r3 before POP r30 in EXCEPTION_EPILOGUE and INTERRUPT_EPILOGUE.

Related to FreeRTOS#331

Fix the Memory Read Protection Violation from Secure MPU exception on exit from interrupt.

* Add `lr r3, [0x09] /* store SEC_STAT.IRM */` and `and r3, r3, 0x8` before `PUSH r3` in `EXCEPTION_PROLOGUE` and `INTERRUPT_PROLOGUE`.
* Add `POP r3 /* restore SEC_STAT.IRM */` and `sflag r3` before `POP r30` in `EXCEPTION_EPILOGUE` and `INTERRUPT_EPILOGUE`.
@vishwamartur vishwamartur requested a review from a team as a code owner November 2, 2024 04:30
Copy link

sonarcloud bot commented Nov 2, 2024

@ActoryOu
Copy link
Member

ActoryOu commented Nov 3, 2024

Hi @vishwamartur,
Thanks for your contribution! Could you help share the verification result?

@aggarg
Copy link
Member

aggarg commented Nov 4, 2024

@vishwamartur Would you please share how you tested these changes?

@vishwamartur
Copy link
Contributor Author

Hi @ActoryOu and @aggarg,

Sorry, I haven't tested these changes yet as I don't currently have access to a compatible board for this setup. If you have any recommendations for an alternative testing approach or an emulator that supports this configuration, please let me know, and I'll be happy to proceed accordingly.

Thank you!

@aggarg
Copy link
Member

aggarg commented Nov 4, 2024

This is a 3P port and I do not have the hardware to test the changes. I do not think we can merge untested changes. Do you plan to test these changes? Also, how did you decide what changes are needed - this information may help us in reviewing?

@jeanthom
Copy link

jeanthom commented Nov 6, 2024

Hi, I just wanted to warn that the author of this PR has spammed many repositories with AI-generated nonsense. If you consider this PR to be nonsensical too, please consider reporting them as spam.

Just for reference:

@aggarg
Copy link
Member

aggarg commented Nov 7, 2024

@jeanthom Thank you for informing us.

@vishwamartur Would you please share if you plan to test these changes. I am also interested in learning how did you decide which changes are needed.

@aggarg
Copy link
Member

aggarg commented Nov 12, 2024

I am closing this PR. Please open a new one when you have tested the changes.

@aggarg aggarg closed this Nov 12, 2024
@vishwamartur vishwamartur deleted the fix-sec-stat-irm branch November 15, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants