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

clarify CSRs which are only added if hybrid mode is implemented #503

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

tariqkurd-repo
Copy link
Collaborator

No description provided.

@arichardson
Copy link
Collaborator

I am not sure if we do need both mscratchc and mtdc for purecap. Maybe @nwf / @davidchisnall can comment on whether Cheriot needs both.

@arichardson arichardson requested a review from jrtc27 January 8, 2025 16:28
@jrtc27
Copy link
Collaborator

jrtc27 commented Jan 8, 2025

I am not sure if we do need both mscratchc and mtdc for purecap. Maybe @nwf / @davidchisnall can comment on whether Cheriot needs both.

https://github.com/CHERIoT-Platform/cheriot-rtos/blob/883d2cc85032e01b7eb8e7a4bb31e6764227677a/sdk/include/cheri.hh#L1395-L1396

So looks to be obsoleted by xtidc.

@arichardson
Copy link
Collaborator

I am not sure if we do need both mscratchc and mtdc for purecap. Maybe @nwf / @davidchisnall can comment on whether Cheriot needs both.

https://github.com/CHERIoT-Platform/cheriot-rtos/blob/883d2cc85032e01b7eb8e7a4bb31e6764227677a/sdk/include/cheri.hh#L1395-L1396

So looks to be obsoleted by xtidc.

Ah yes if we have the tidc registers this should not be needed. I personally still think it would be cleaner to have a per-ring DDC so you don't need to switch manually but I don't think we can change that easily.

@jrtc27
Copy link
Collaborator

jrtc27 commented Jan 8, 2025

I am not sure if we do need both mscratchc and mtdc for purecap. Maybe @nwf / @davidchisnall can comment on whether Cheriot needs both.

https://github.com/CHERIoT-Platform/cheriot-rtos/blob/883d2cc85032e01b7eb8e7a4bb31e6764227677a/sdk/include/cheri.hh#L1395-L1396
So looks to be obsoleted by xtidc.

Ah yes if we have the tidc registers this should not be needed. I personally still think it would be cleaner to have a per-ring DDC so you don't need to switch manually but I don't think we can change that easily.

I agree that would be nicer, but doing it the RISC-V way would then likely be ddc + xtdc + xedc, as it mostly doesn't bank registers (with the exception of some hypervisor ones).

@tariqkurd-repo
Copy link
Collaborator Author

I am not sure if we do need both mscratchc and mtdc for purecap. Maybe @nwf / @davidchisnall can comment on whether Cheriot needs both.

https://github.com/CHERIoT-Platform/cheriot-rtos/blob/883d2cc85032e01b7eb8e7a4bb31e6764227677a/sdk/include/cheri.hh#L1395-L1396
So looks to be obsoleted by xtidc.

Ah yes if we have the tidc registers this should not be needed. I personally still think it would be cleaner to have a per-ring DDC so you don't need to switch manually but I don't think we can change that easily.

I agree that would be nicer, but doing it the RISC-V way would then likely be ddc + xtdc + xedc, as it mostly doesn't bank registers (with the exception of some hypervisor ones).

ok - so are there any suggested changes to this PR - or are we happy that it's correct (or at least good enough for now?)
this was my understanding of CSRs added by implementing Zcherihybrid so it's good to cross-check that with other people's understanding.

@tariqkurd-repo tariqkurd-repo merged commit 76fd3e4 into riscv:main Jan 10, 2025
3 checks passed
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.

3 participants