-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MPFS boot enhancements #14994
MPFS boot enhancements #14994
Conversation
This CONFIG_MPFS_CLKINIT is set with bootloaders by default. However, this gives an option to have it unset. In some cases, the clocks may be already set so it becomes unnecessary to re-initialize them. Signed-off-by: Eero Nurkkala <[email protected]>
Inter-processor interrupts (IPIs) are not cleared via mie/mip registers but rather, at the MPFS_CLINT_BASE + mhartid * 4 (a word or 4-byte offset for each hart). If there's an IPI waiting, the system will continue to boot altough it's expected to stay at the wfi loop waiting for the IPI. Signed-off-by: Eero Nurkkala <[email protected]>
[Experimental Bot, please feedback here] Yes, this PR appears to meet the NuttX requirements, although the Testing section could be improved. Here's a breakdown:
Recommendation: To fully meet the NuttX requirements, the PR should be updated to:
|
@eenurkka I think you need to refresh some board configs, not sure, please look about the issue in rv_virt config |
it's a known ltp error on riscv, and not related to this patch. |
Summary
rmpfs IPI (Inter-processor Interrupts) are not cleared at boot currently. It's possible they're set at boot time, which then breaks the boot logic; harts1-4 should stay at wfi loop until they're released by an IPI.
In addition, clocks don't need to be reset if they're already set. Let the use configure whether the system clocks are already set or not.
Impact
If there's a chain of NuttX OS:es, for example, one NuttX that jumps to the next, the IPI fired at the 1st NuttX will make the follow-up NuttX proceed before it's released. Thus, clear the IPIs in like manner the interrupts are turned off at boot.
Testing
Various mpfs based products with more than one NuttX OSs following each other. The 1st one sets the clokcs, while the 2nd doesn't alter them.