Skip to content

cpu_riscv64: add set_resetvec() via runtime resetvec property#86

Closed
Gaurav Sharma (gaurshar) wants to merge 1 commit into
qualcomm:mainfrom
gaurshar:feat/riscv-set-resetvec
Closed

cpu_riscv64: add set_resetvec() via runtime resetvec property#86
Gaurav Sharma (gaurshar) wants to merge 1 commit into
qualcomm:mainfrom
gaurshar:feat/riscv-set-resetvec

Conversation

@gaurshar

Copy link
Copy Markdown
Contributor

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.

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>
@p-b-o

Copy link
Copy Markdown

Why introduce a function instead of simply setting the property?

@gaurshar

Gaurav Sharma (gaurshar) commented Jul 7, 2026

Copy link
Copy Markdown
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

@p-b-o

Copy link
Copy Markdown

I understand this point, I just wonder why not directly inline its implementation where needed?

@gaurshar

Copy link
Copy Markdown
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

@gaurshar

Copy link
Copy Markdown
Contributor Author

as suggested moved the call inline in qqvp device model. closing this request.

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.

2 participants