-
Notifications
You must be signed in to change notification settings - Fork 76
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
[Bug report] fence.i may cause the CPU to hang under some conditions #128
Comments
any more details? |
I was able to simulate the buggy code: core went to address 0 after fence.i : (that shouldn't happen! Need to see what's wrong in RTL )
since this is invalid instruction at address 0 , CPU takes exception. mtvec is not programed and has reset value of 0 causing CPU to go to address 0 again and thus the core is looping at address 0. |
More update: 00019b0f is NOT fence.i, but unimplemented opcode for EL2 - so the CPU takes exception on it. dasm in TB does not decode all the bits in opcode : I would suggest TB to print that the core took exception/interrupt in the exec.log to make easier to debug such problems ... |
So actually opcode The instruction decoder assumes that all those arguments are zero. With the PR #138 I updated it so that it allows them to have non-zero values. With that VeeR defaults to the most generic behavior of the instructions by ignoring the arguments and does not execute any exception. This is sanctioned by the spec. |
Fixed with #138. Closing. |
Hi there!
I think I found a bug (using the brand new Cascade fuzzer) in EL2.
Looking at the reduced ELFs, it looks like it is due to a
fence.i
placed after branches.In this zip, you'll find reduced test cases and their dumps for convenience.
bug_diff.zip
In the image, left is smallest buggy, right is largest non-buggy.
![image](https://private-user-images.githubusercontent.com/28906668/279123488-4f5df3b7-dd5f-425d-afe1-0a7a97b4096c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzcwNzU0MTgsIm5iZiI6MTczNzA3NTExOCwicGF0aCI6Ii8yODkwNjY2OC8yNzkxMjM0ODgtNGY1ZGYzYjctZGQ1Zi00MjVkLWFmZTEtMGE3YTk3YjQwOTZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTE3VDAwNTE1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI1YmRlMjg0ODk1YTk5ZTc0MTJjNTAyMjBlMmUyMDMwZGU4NzYzMjczZTlmYzZhYzE1ZWRiMjA3MjVhNDg4YjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9nm9E_5iRnO8879pAcFw-Zc-EwUTkFa7b6ERwOccMJI)
I'm using the AHB config. There's also a possibility that my parameters are wrong, I'm absolutely not familiar with this core at the moment. Can you please try to reproduce?
Thanks!
The text was updated successfully, but these errors were encountered: