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

xcause CSRs are listing exception and interrupt codes not available in their privilege level #324

Open
james-ball-qualcomm opened this issue Nov 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@james-ball-qualcomm
Copy link
Collaborator

james-ball-qualcomm commented Nov 27, 2024

The scause CSR shouldn't be showing M-mode only exception and interrupt codes. I assume the same is true for the vscause CSR showing HS-mode. This is because all the xcause CSRs are using the same adoc code (that doesn't specify the privilege level) when calling arch_def.interrupt_codes() and arch_def.exception_codes().

     `scause.CODE` is writeable.

      [when,"TRAP_ON_ILLEGAL_WLRL == true"]
      If `scause` is written with an undefined cause (combination of `scause.INT` and `scause.CODE`), an `Illegal Instruction` exception occurs.

      [when,"TRAP_ON_ILLEGAL_WLRL == false"]
      If `scause` is written with an undefined cause (combination of `scause.INT` and `scause.CODE`), neither `scause.INT` nor `scause.CODE` are modified.

      Valid interrupt codes are:
      [separator="!"]
      !===
      <%- interrupt_codes.sort_by { |code| code.num }.each do |code| -%>
      ! <%= code.num %> ! <%= code.name %>
      <%- end -%>
      !===

      Valid exception codes are:
      [separator="!"]
      !===
      <%- exception_codes.sort_by { |code| code.num }.each do |code| -%>
      ! <%= code.num %> ! <%= code.name %>
      <%- end -%>
      !===
@james-ball-qualcomm james-ball-qualcomm added the bug Something isn't working label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants