Skip to content

Commit

Permalink
Take #2 on envcfg.CBIE WARL
Browse files Browse the repository at this point in the history
  • Loading branch information
dhower-qc committed Oct 25, 2024
1 parent d2e0faf commit 4bdbbb5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions arch/csr/menvcfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ menvcfg:
type: RW-R
sw_write(csr_value): |
if ((csr_value.CBIE == 0) ||
(ALLOW_CBO_INVAL_UPGRADE_TO_FLUSH && (csr_value.CBIE == 1)) ||
(csr_value.CBIE == 3)) {
(csr_value.CBIE == 1) ||
((!FORCE_UPGRADE_CBO_INVAL_TO_FLUSH) && (csr_value.CBIE == 3)) {
return csr_value.CBIE;
} else {
return CSR[menvcfg].CBIE;
Expand Down
10 changes: 5 additions & 5 deletions arch/ext/Zicbom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Zicbom:
also_defined_in: [Zicboz, Zicbop]
schema:
type: integer
ALLOW_CBO_INVAL_UPGRADE_TO_FLUSH:
FORCE_UPGRADE_CBO_INVAL_TO_FLUSH:
description: |
When true, an implementation can (when `menvcfg.CBIE` == `01`) upgrade a `cbo.inval`
instruction to a `cbo.flush`.
When true, an implementation prohibits setting `menvcfg.CBIE` == `11` such that all `cbo.inval`
instructions either trap (when `menvcfg.CBIE` == '00') or flush (when `menvcfg.CBIE` == '01').
When false, an implementation does not support the upgrade, and the value '01' cannot be
written to `menvcfg.CBIE`.
When false, an implementation allows a true INVAL operation for `cbo.inval`, and thus supports
the setting `menvcfg.CBIE` == `11`.
schema:
type: boolean
2 changes: 1 addition & 1 deletion cfgs/generic_rv64/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -514,4 +514,4 @@ params:
MSTATUS_FS_WRITEABLE: true
MSTATUS_TVM_IMPLEMENTED: true
HW_MSTATUS_FS_DIRTY_UPDATE: precise
ALLOW_CBO_INVAL_UPGRADE_TO_FLUSH: true
FORCE_UPGRADE_CBO_INVAL_TO_FLUSH: true

0 comments on commit 4bdbbb5

Please sign in to comment.