Skip to content
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 mtvec address field #225

Closed
wants to merge 1 commit into from

Conversation

rmsyn
Copy link
Contributor

@rmsyn rmsyn commented Aug 8, 2024

The address (BASE from the spec) needs to be 4-byte aligned, but the spec does not specify that the field is read/written as the masked address.

Shifts the value in mtvec::write(addr, mode), and Mtvec::address for a more intuitive API.

The `address` (BASE from the spec) needs to be 4-byte aligned, but the
spec does not specify that the field is read/written as the masked
address.

Shifts the value in `mtvec::write(addr, mode)`, and `Mtvec::address`
for a more intuitive API.
@rmsyn rmsyn requested a review from a team as a code owner August 8, 2024 23:32
@rmsyn
Copy link
Contributor Author

rmsyn commented Aug 8, 2024

This fails in QEMU, wish the spec was more explicit about how the BASE field is encoded...

@rmsyn rmsyn closed this Aug 8, 2024
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.

1 participant