cpu_riscv64: add set_resetvec() via runtime resetvec property#86
Closed
Gaurav Sharma (gaurshar) wants to merge 1 commit into
Closed
cpu_riscv64: add set_resetvec() via runtime resetvec property#86Gaurav Sharma (gaurshar) wants to merge 1 commit into
Gaurav Sharma (gaurshar) wants to merge 1 commit into
Conversation
Add a runtime reset-vector override that sets the "resetvec" QOM property (runtime-settable in libqemu via realized_set_allowed). The CPU re-reads env.resetvec on the next reset, so pairing this with a reset pulse redirects the core. No new libqemu export is needed. Signed-off-by: Gaurav Sharma <gaurshar@qti.qualcomm.com>
|
Why introduce a function instead of simply setting the property? |
Contributor
Author
|
Pierrick Bouvier (@p-b-o) p_resetvec has been set once explicitly in before_end_of_elaboration, so added a setter function to call set_prop |
|
I understand this point, I just wonder why not directly inline its implementation where needed? |
Contributor
Author
|
inline is totally fine, it has more to do to avoid hardcoding qom props downstream in qqvp . I can totally move it inline in device model that way one less MR. I'll check and update. Thanks |
Contributor
Author
|
as suggested moved the call inline in qqvp device model. closing this request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a runtime reset-vector override that sets the "resetvec" QOM property (runtime-settable in libqemu via realized_set_allowed). The CPU re-reads env.resetvec on the next reset, so pairing this with a reset pulse redirects the core.