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

Contradiction in mttp description #63

Closed
SiFiveHolland opened this issue Sep 11, 2024 · 4 comments
Closed

Contradiction in mttp description #63

SiFiveHolland opened this issue Sep 11, 2024 · 4 comments
Assignees

Comments

@SiFiveHolland
Copy link
Collaborator

In section 3, the description of mttp includes the sentence "In this case, the remaining fields (SDID, PPN) in mttp must be set to zeros, else generate a fault." This statement contradicts the register diagram just above that paragraph, which describes these fields as WARL.

@eckhard-delfs-qualcomm
Copy link
Contributor

Maybe rephrase according to priv spec 10.1.11 (no fault generation):
To select MODE=Bare, software must write zero to the remaining fields (SDID, PPN) in mttp.
Attempting to select MODE=Bare with a nonzero pattern in the remaining fields has an UNSPECIFIED effect on the value that the remaining fields assume and an UNSPECIFIED effect on supervisor domain protection behavior.

@ram2532
Copy link

ram2532 commented Sep 12, 2024

I agree with @eckhard-delfs-qualcomm

The mttp is similar in definition and behavior as to satp so I'd prefer similar write behavior when MODE=Bare. In particular, I don't think it should take an exception.

@rsahita rsahita self-assigned this Oct 1, 2024
@rock-ifly
Copy link

I don't think it should take an exception when mttp.mode=Bare while ((mttp.sdid != 0) | (mttp.ppn !=0)). Since we can just bypass the mttCheck when mttp.mode-Bare, just neglect mttp.sdid and mttp.ppn.

On one hand, the WARL should not raise an exception as spec says. On the other hand, we can do the same thing as satp. The satp won't throw an exception when (satp.mode =Bare) & ((satp.asid != 0) | (satp.ppn != 0) ).

@rsahita
Copy link
Collaborator

rsahita commented Oct 14, 2024

addressed by PR #95

@rsahita rsahita closed this as completed Oct 14, 2024
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

No branches or pull requests

5 participants