-
Notifications
You must be signed in to change notification settings - Fork 78
Move mandatory privilege mode option from CRD family to CRD #182
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
Closed
james-ball-qualcomm
wants to merge
4
commits into
main
from
181-move-priv-modes-present-from-crd-family-to-crd
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8c611b1
Fix #181
james-ball-qualcomm 4a854fd
Merge branch 'main' into 181-move-priv-modes-present-from-crd-family-…
dhower-qc 1a6174b
Merge branch 'main' into 181-move-priv-modes-present-from-crd-family-…
james-ball-qualcomm 33b0874
:Merge branch '181-move-priv-modes-present-from-crd-family-to-crd' of…
james-ball-qualcomm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,13 +42,15 @@ a| <% rev.changes.each do |change| %> | |
|
|
||
| CSR field colors:: | ||
|
|
||
| * Grey fields are reserved (WPRI) | ||
| * Green fields are present | ||
| * Red fields are defined by the RISC-V ISA but not present | ||
| * [green]#Green fields# are present in the associated CRD. | ||
| * [red]#Red fields# are defined by the RISC-V ISA but not required in the associated CRD. | ||
| * [silver]#Grey fields# are reserved for future use by RISC-V (AKA WPRI). Software should ignore the values read from | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice |
||
| these fields and should preserve the values held in these fields when writing values to other fields. | ||
| For forward compatibility, implementations that do not furnish these fields must make them read-only zero. | ||
|
|
||
| CSR field types:: | ||
|
|
||
| [%autowidth] | ||
| [cols="1,6"] | ||
| |=== | ||
| | Abbreviation | Description | ||
|
|
||
|
|
@@ -83,16 +85,16 @@ CSR field types:: | |
| | <%= crd.debug_manual_revision %> | ||
| |=== | ||
|
|
||
| === Privileged Modes | ||
| === <%= crd.name %> Privileged Modes | ||
|
|
||
| |=== | ||
| | M | S | U | VS | VU | ||
|
|
||
| | <% if crd.family.mandatory_priv_modes.include?('M') -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.family.mandatory_priv_modes.include?('S') -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.family.mandatory_priv_modes.include?('U') -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.family.mandatory_priv_modes.include?('VS') -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.family.mandatory_priv_modes.include?('VU') -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.m_mode? -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.s_mode? -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.u_mode? -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.vs_mode? -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
| | <% if crd.vu_mode? -%> MANDATORY <% else -%> OUT-OF-SCOPE <% end -%> | ||
|
|
||
| |=== | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,8 +63,6 @@ def initialize(data, arch_def) | |
| @arch_def = arch_def | ||
| end | ||
|
|
||
| def mandatory_priv_modes = @data["mandatory_priv_modes"] | ||
|
|
||
| def revisions | ||
| return @revisions unless @revisions.nil? | ||
|
|
||
|
|
@@ -118,6 +116,33 @@ def family | |
| @family = fam | ||
| end | ||
|
|
||
| def mandatory_priv_modes = @data["mandatory_priv_modes"] | ||
|
|
||
| # @return [true/false] | ||
| def m_mode? | ||
| mandatory_priv_modes.include?('M') | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a note: you don't need to change this. You lucked out that String and Array both have an |
||
| end | ||
|
|
||
| # @return [true/false] | ||
| def s_mode? | ||
| mandatory_priv_modes.include?('S') | ||
| end | ||
|
|
||
| # @return [true/false] | ||
| def u_mode? | ||
| mandatory_priv_modes.include?('U') | ||
| end | ||
|
|
||
| # @return [true/false] | ||
| def vs_mode? | ||
| mandatory_priv_modes.include?('VS') | ||
| end | ||
|
|
||
| # @return [true/false] | ||
| def vu_mode? | ||
| mandatory_priv_modes.include?('VU') | ||
| end | ||
|
|
||
| def tsc_profile | ||
| return nil if @data["tsc_profile"].nil? | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming you want this to be an array, this should be:
or
What you've written is an array with one string:
["M,U"]