-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
ARM Cortex_R: CONFIG_USERSPACE: external interrupts are disabled during system calls #22131
Comments
You're mentioning Zephyr 1.14, however cortex r wasn't supported then? |
We have been using Z on Cortex-R for some time. Official support may not be claimed, but we are using it and reporting/fixing bugs as we see them. |
@pderwin I'm wondering if there's a better way to track bugs in Cortex-R code that isn't upstreamed yet? The problem with filing these bugs in the main Zephyr bug backlog, is that it gives the impression that these are issues in the main Zephyr master branch. And it will mess up our bug counts when we count them up when preparing a release. Would it be possible to track these elsewhere, perhaps in a fork of the Zephyr project where you maintain your yet-to-be-upstreamed code, and only file issues here if they have been determined to affect the open source tree as well (such as the issue with MPU->RNR locking on Cortex-M)? |
I talked with my partner here. We're going to get our R code upstreamed ASAP. Actually, t has already been submitted, but not accepted due to a couple of merge conflicts. There is a usermode test that I will get that functioning on our platform as 'proof of life'. We believe that someone is working towards having a QEMU implementation for R4, so a regression will be possible when that's ready. Hopefully still will all be completed before a new bug arises. Phil |
Works for me. Please add me as a reviewer. |
@pderwin should this bug issue be closer or treated as enhancement, as well? |
This should be addressed with #28231. The Cortex-R implementation enables interrupts while handling the system call. |
While processing a system call, the HANDLER code should run with external interrupts enabled. This is not the case for Cortex R.
To Reproduce
Steps to reproduce the behavior:
Produce a build for Cortex R CPU with CONFIG_USERSPACE enabled. Run test that Andrew Boie has added which checks for interrupts enabled in system call context. It will fail the following assert:
zassert_true(arch_irq_unlocked(key), "irqs locked during syscall");
his new test:
tests: userspace: test syscall irq context #21920
Expected behavior
Interrupts should be enabled during the system call, so the assert should pass.
Impact
Anyone using CONFIG_USERSPACE with Cortex_R will suffer from having interrupts disabled during system calls. This could be catastrophic depending on the user's environment.
Screenshots or console output
N/A
Environment (please complete the following information):
Additional context
We have a fix for the problem. Ready for submission.
The text was updated successfully, but these errors were encountered: