-
Notifications
You must be signed in to change notification settings - Fork 50
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
smclicshv psuedo-code assumes hart has IALIGN=16 and needs to be better documented #411
Comments
Hi James, I propose to add a note that an implementation "can decide to align PC" accordingly to IALIGN, but I would not recommend any forcing. From my side if SW is adding a unaligned address in the Vector Table it is a SW error, as it is branching to an unaligned address. Masking bottom bit from my side could lead to execute some instructions badly executed without seeing the initial issue.. |
The existing pseudo-code already shows forcing the LSB to 0 (with the implicit assumption of IALIGN=16). If you don't force the 1 LSB (IALIGN=16) or 2 LSBs (IALIGN=32) to zero then what happens if a programmer puts non-zero values there? Presumably it would cause a misaligned instruction address exception since it is a hardware state machine and not a jump instruction. So, I recommend that the pseudo-code and the text both make it clear that implementations must ignore the bottom 1 or 2 LSBs (depending on IALIGN). |
Maybe we can talk about this at the next Fast Interrupt TG meeting since I'm not sure I fully understand your comments and perspective? |
…le entry (depending on IALIGN)
Can we close this now that the related PR has been accepted and merged into the main branch? |
PR done and merged. can be close |
In "smclicshv Changes to xtvec CSR Mode for CLIC" section, there is pseudo-code showing the least-significant bit of the vector table entry is forced to zero when the hart fetches the entry from the table (the "&~1" in the pseudo-code).
I have two related issues related to this:
The text was updated successfully, but these errors were encountered: