Commit 14258a4
committed
csr: fix double trap state access
In privilege spec sec 3.1.18
" The Ssdbltrp extension adds the double-trap-enable ( DTE ) field in
menvcfg . When menvcfg.DTE is zero, the implementation behaves as
though Ssdbltrp is not implemented. When Ssdbltrp is not implemented
sstatus.SDT , vsstatus.SDT , and henvcfg.DTE bits are read-only zero."
The change keep the mstatus.sdt unchangedable and always read-as-zero
when menvcfg.dte is cleared
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>1 parent 47c1a95 commit 14258a4
2 files changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
547 | 551 | | |
548 | 552 | | |
549 | 553 | | |
| 554 | + | |
550 | 555 | | |
551 | | - | |
| 556 | + | |
552 | 557 | | |
553 | 558 | | |
554 | 559 | | |
| |||
558 | 563 | | |
559 | 564 | | |
560 | 565 | | |
561 | | - | |
562 | 566 | | |
563 | 567 | | |
564 | 568 | | |
565 | 569 | | |
566 | | - | |
| 570 | + | |
567 | 571 | | |
568 | 572 | | |
569 | 573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | | - | |
| 258 | + | |
261 | 259 | | |
262 | 260 | | |
263 | 261 | | |
| |||
0 commit comments