-
Notifications
You must be signed in to change notification settings - Fork 1
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
Trace Enable as part of mdbgsec CSR #11
Comments
The option 1 seems more promising. Since the mdbgsec is a mchine mode CSR, it is naturally protected by CSR access rule and general for all RISC-V platform. In controry, the option 2 has deviation in protection mechanism of MMIO. |
add mdbgsec info in trace ingress port and tracer to enforce privilege control on it |
Rethinking of the trace control. I think the privilege control could still happen inside hart boundary and the hart could clamp the ingress port if the privilege does not suffice. The hart could use halt sideband signal (defined in E-trace spec) to tell encoder to stop generating trace packets and resync all trace module internal state. The upside is that this solution will leave the trace module in a clean state if the higher privilege mode conducts the context switch. |
Instead of halt sideband signal, trigger sideband signal (trace-on and trace-off) might be more appropriate to use it. I think the both have the same functionality, but halt sideband signal explicitly means it is halted in debug mode. |
I agree they are to certain extend similar. But the trigger signals are controlled by trigger as well, which means there will be potential two drivers of the signal pair, one is trigger module and the other is mdbgsec privilege control. |
I understand the race condition. I think it can be solved with careful implementation, but it will bring more design complexity. So, I am fine with your proposal of using halt sideband signal. |
Close. The issue is discussed now in smmtt TG |
RISC-V Trace Control Interface Specification defines the mechanism to filter trace per privilege level (trTeFilterMatchChoicePrivilege) without providing protection for vicious configuration: https://github.com/riscv-non-isa/tg-nexus-trace/blob/master/docs/RISC-V-Trace-Control-Interface.adoc#63-trace-encoder-filter-registers
There are two alternatives to protect privilege level configuration:
The text was updated successfully, but these errors were encountered: