Skip to content

Commit 941c6eb

Browse files
authored
feat(Custom): SMBLOCKCTL Custom CSR implementation for timeout (#980)
1 parent 62d117e commit 941c6eb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/isa/riscv64/local-include/csr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
#define CUSTOM_CSR_SPFCTL_WMASK 0x3fffff
4747
#define CUSTOM_CSR_SLVPREDCTL_WMASK 0x1ff
48-
#define CUSTOM_CSR_SMBLOCKCTL_WMASK 0x3ff
48+
#define CUSTOM_CSR_SMBLOCKCTL_WMASK 0xffffffff
4949
#define CUSTOM_CSR_SRNCTL_WMASK 0x5
5050
#define CUSTOM_CSR_MCOREPWR_WMASK 0x1
5151
#define CUSTOM_CSR_MFLUSHPWR_WMASK 0x1
@@ -1291,6 +1291,7 @@ CSR_STRUCT_START(smblockctl)
12911291
uint64_t uncache_write_outstanding_enable : 1; // [7] Enable uncache write outstanding (0).
12921292
uint64_t hd_misalign_st_enable : 1; // [8] Enable hardware store misalign.
12931293
uint64_t hd_misalign_ld_enable : 1; // [9] Enable hardware load misalign.
1294+
uint64_t sbuffer_timeout : 22;// [31:20] Store buffer flush timeout.
12941295
CSR_STRUCT_END(smblockctl)
12951296

12961297
/** Supervisor Timer Register**/

src/isa/riscv64/system/priv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ void init_custom_csr() {
178178
slvpredctl->storeset_no_fast_wakeup = 0;
179179
slvpredctl->lvpred_timeout = 3;
180180

181+
smblockctl->sbuffer_timeout = 1<<20;
181182
smblockctl->sbuffer_threshold = 7;
182183
smblockctl->ldld_vio_check_enable = 1;
183184
smblockctl->soft_prefetch_enable = 1;

0 commit comments

Comments
 (0)