Skip to content

Commit 8d80e39

Browse files
feat(csr): add YAML file for Ssqosid:srmcfg
1 parent 12a4d9b commit 8d80e39

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arch/csr/Ssqosid/srmcfg.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ fields:
113113
raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
114114
}
115115
}
116-
return csr_value.RCID;
116+
rcid_mask = (1u << RCID_WIDTH) - 1;
117+
return csr_value.RCID & rcid_mask;
117118
118119
MCID:
119120
location: 27-16
@@ -135,7 +136,8 @@ fields:
135136
raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
136137
}
137138
}
138-
return csr_value.MCID;
139+
mcid_mask = (1u << MCID_WIDTH) - 1;
140+
return csr_value.MCID & mcid_mask;
139141
140142
sw_read(): |
141143
if (implemented?(ExtensionName::Smstateen)) {
@@ -150,4 +152,4 @@ sw_read(): |
150152
raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
151153
}
152154
}
153-
return $bits(CSR[srmcfg]);
155+
return $bits(CSR[mstateen0]);

0 commit comments

Comments
 (0)