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

Not flagging exception for ebreak if dcsr.ebreakm==1. #774

Conversation

silabs-oysteink
Copy link
Contributor

Not SEC clean as there is a difference when an exception trigger is enabled. Old cold would get an exception trigger that caused debug entry while new code would not get an exception and enter debug with cause=ebreak.

Signed-off-by: Oystein Knauserud [email protected]

Not SEC clean as there is a difference when an exception trigger is enabled. Old cold would get an exception trigger that caused debug entry while new code would not get an exception and enter debug with cause=ebreak.

Signed-off-by: Oystein Knauserud <[email protected]>
@silabs-oysteink silabs-oysteink added the Component:RTL For issues in the RTL (e.g. for files in the rtl directory) label Feb 3, 2023
ex_wb_pipe_i.instr.bus_resp.err ||
ex_wb_pipe_i.illegal_insn ||
(ex_wb_pipe_i.sys_en && ex_wb_pipe_i.sys_ecall_insn) ||
(ex_wb_pipe_i.sys_en && ex_wb_pipe_i.sys_ebrk_insn && !dcsr_i.ebreakm && !debug_mode_q) ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First change. This was not SEC clean as it caused a difference on etrigger vs ebreak.

ex_wb_pipe_i.instr.bus_resp.err ? EXC_CAUSE_INSTR_BUS_FAULT :
ex_wb_pipe_i.illegal_insn ? EXC_CAUSE_ILLEGAL_INSN :
(ex_wb_pipe_i.sys_en && ex_wb_pipe_i.sys_ecall_insn) ? EXC_CAUSE_ECALL_MMODE :
(ex_wb_pipe_i.sys_en && ex_wb_pipe_i.sys_ebrk_insn && !dcsr_i.ebreakm && !debug_mode_q) ? EXC_CAUSE_BREAKPOINT :
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dcsr.ebreakm part of second change, along with the minstret counter change on line 562. SEC clean with correct OBI protocol. Third change was the debug_mode_q on line 348, that was SEC clean.

@Silabs-ArjanB Silabs-ArjanB merged commit 3bbb6ae into openhwgroup:master Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants