-
Notifications
You must be signed in to change notification settings - Fork 330
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
riscv: fix read/write virtual memory across page boundaries #1149
Conversation
179aab2
to
d9c2ddb
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.
Small typos
866a4eb
to
788e4f9
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.
Thanks for the patch!
I have only one significant comment.
788e4f9
to
be0554a
Compare
2a4e2fe
to
292873e
Compare
519ea7a
to
a3c3b09
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
@JanMatCodasip, @MarekVCodasip, please, take a look. |
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.
@zqb-all Thank you for the contribution. In principle, the change looks fine to me.
I have just several code-related suggestions (code style, log prints, TODO comments and similar). Please if you can look at them.
e62f4f4
to
ac5f95d
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.
Thank you for addressing the comments so far.
I have two last small suggestions, otherwise it looks good.
When read/write virtual addresses cross page boundaries, the physical addresses are not necessarily contiguous and need to call virt2phys again.
When mmu is disabled, simply call the physical read/write function
Reduce duplicate code
ac5f95d
to
92d7a57
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, thank you.
When read/write virtual addresses cross page boundaries, the physical addresses are not necessarily contiguous and need to call virt2phys again.