- 
                Notifications
    You must be signed in to change notification settings 
- Fork 995
Smcsrind exception fixex #1896
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
base: master
Are you sure you want to change the base?
Smcsrind exception fixex #1896
Conversation
| Haven't had the chance to review yet, but please clean up the commit history to get rid of the merge commit and the commits with debug prints. In this case, squashing everything into a single commit is probably appropriate. | 
44a4f87    to
    c9b298b      
    Compare
  
    | I was just extending my testing and I noticed that checks for the s/hcontext bits is also missing, I'll be adding these soon. Should I also add hedelegh as a read-only zero CSR and incorporate the check for p1p13 while at it? | 
| May as well, thank you! | 
| You can add them to this PR if you prefer. Up to you. | 
c9b298b    to
    a8e9876      
    Compare
  
    | I couldn't find mstateen0_priv113 nor csr_hedelegh in the encoding.h file. I have added these constants in the code inline for now, I am waiting for riscv/riscv-opcodes#333 I have a test case which loops over CSRs that are affected by stateen, it checks that the correct trap is raised in all privilege modes. The test can be run with: | 
65b1d3f    to
    2db2820      
    Compare
  
    | riscv-opcodes PR has been merged. | 
2db2820    to
    89386f3      
    Compare
  
    missing proxy csr and check for csr privilege in sscsring_reg_csr_t since mireg uses the same class. Add stateen checks for scontext/hcontext Fix for issue: 1893
695e4f9    to
    bc7461b      
    Compare
  
    
Fixes for: #1893
I have implemented smcdeleg in another branch and tested this implementation with smcdeleg and from the way I interpret the spec this should fix the issues I was seeing before. Let me know if something is poorly explained or incorrect.