-
Notifications
You must be signed in to change notification settings - Fork 337
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
target/riscv: move the dcsr modification out of program buffer #1190
base: riscv
Are you sure you want to change the base?
Conversation
83bd140
to
46e3fe5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lz-bro, thank you for the patch!
Please take a look at my suggestions.
67516c3
to
af1b33a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Only a minor nitpick.
af1b33a
to
5c47203
Compare
5c47203
to
1390357
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, great catch!
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I do have a suggestion, up to you.
src/target/riscv/riscv-013.c
Outdated
return ERROR_OK; | ||
} | ||
|
||
static int restore_privilege(struct target *target, riscv_reg_t mstatus, riscv_reg_t mstatus_old, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static int restore_privilege(struct target *target, riscv_reg_t mstatus, riscv_reg_t mstatus_old, | |
static int restore_privilege_from_virt2phys_mode(struct target *target, riscv_reg_t mstatus, riscv_reg_t mstatus_old, |
If you change the name of modify_privilege()
, then change it here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like restore_privilege_for_virt2phys_mode()
sounds wrong as we are restoring it from it. I would either remove the for
word or replace it with from
.
Thanks
when riscv virt2phys_mode is hw, reduce the use of unnecessary program buffers.
1390357
to
83b79a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have one more thing left.
When riscv virt2phys_mode is hw, reduce the use of unnecessary program buffers. See #1188 for the original issue.