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

A question of msdcfg.SDICN #116

Open
ZeyueShen opened this issue Dec 5, 2024 · 3 comments
Open

A question of msdcfg.SDICN #116

ZeyueShen opened this issue Dec 5, 2024 · 3 comments

Comments

@ZeyueShen
Copy link

When mmpt.Mode=Bare, according to smmtt spec, mmpt.sdid must be set to 0, which indicates that the current space is not in any supervisor domain. In this case, set msdcfg.SDICN to 0 or a valid number or an invalid number. Will it affect imsic and aplic (hart associated) address access? (Will an exception be reported when msdcfg.SDICN is set to invalid numbe or 0)?

@rsahita
Copy link
Collaborator

rsahita commented Dec 7, 2024

hi @ZeyueShen - these are orthogonal (not interdependent) aspects - MPT can be in bare mode, while the RDSM may specify the SDICN as required.

The rules based on how SDICN is programmed (0, !impl controller OR impl controller) are specified on page 39 of the spec. See text starting with "When SDICN is not the number of an implemented interrupt controller, or is zero then the following rules apply to all privilege modes:"

@ZeyueShen
Copy link
Author

hi @rsahita - Thanks for your reply. According to your explanation, I understand that the choice of SDICN has nothing to do with whether mmpt.Mode is equal to 0.

But I have one more question: msdcfg is used to configure the current supervisor domain. When mmpt.Mode=Bare, mmpt.sdid=0, and supervisor domain in this case is meaningless (because mmpt.Mode=Bare). In this case, the configuration of SDICN is used to configure mmpt.sdid=0. Is this understanding correct? Or maybe my expression is not quite correct, I just want to know whether mmpt.sdid and SDICN are related?

@rock-ifly
Copy link

rock-ifly commented Dec 19, 2024

If Smsdia extension is implemented, then msdcfg.SDICN is non-zero at reset and holds the number of
an implemented supervisor domain interrupt controller.

P39 @ V0.2.0

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

3 participants