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

mcontrol/mcontrol6 on CBO #1413

Merged

Conversation

YenHaoChen
Copy link
Collaborator

@YenHaoChen YenHaoChen commented Jul 13, 2023

This PR fixes two mcontrol/mcontrol6 trigger issues on cbo instructions.

  1. The tval should capture the effective address when a (trigger) exception on cbo.zero. (*TVAL should capture the effective address on an exception riscv/riscv-isa-manual#1317). The previous implementation does not pass the effective address on checking_triggers(). This PR proposes extending the checking_triggers() with an additional parameter "tval" and passing the effective address.
  2. The mcontrol/mcontrol6 trigger must match cbo.clean/inval as stores. This PR checks all addresses in the cache block appointed by the cbo instruction.

@YenHaoChen YenHaoChen changed the title Pr mcontrol cbo zero tval The xtval should capture the effective address on a (trigger) exception Jul 13, 2023
@YenHaoChen YenHaoChen changed the title The xtval should capture the effective address on a (trigger) exception The xtval should capture the effective address when a (trigger) exception on cbo.zero Jul 13, 2023
@aswaterman
Copy link
Collaborator

@scottj97 may we rely on you to run this one through your internal debug tests?

The mcontrol/mcontrol6 store address before has a higher priority over page
faults and access faults. Thus, trigger checking should before the translate().

This commit checks all address of the cache block.

Reference: Debug spec 1.0, 5.5.3 Cache Operations
Reference: CMO spec 1.0.1, 2.5.4 Breakpoint Exceptions and Debug Mode Entry
@YenHaoChen YenHaoChen changed the title The xtval should capture the effective address when a (trigger) exception on cbo.zero mcontrol/mcontrol6 on CBO Jul 19, 2023
Copy link
Contributor

@scottj97 scottj97 left a comment

Choose a reason for hiding this comment

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

I don't have any coverage of CBO instructions, but this doesn't seem to break anything else.

@aswaterman aswaterman merged commit 432c9ee into riscv-software-src:master Jul 19, 2023
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