Andrew Waterman
1ecad57eae
Only add CSRs if corresponding extensions are enabled
2 years ago
Andrew Waterman
a81d59754f
Remove boilerplate from most CSR instantiations
2 years ago
Andrew Waterman
3c0e6bfa69
Refactor initialization of mode-specific CSRs
The if-statements are boilerplate.
2 years ago
Andrew Waterman
2597b4b4eb
Add CSRs through an interface, rather than mutating csrmap
2 years ago
Andrew Waterman
e98294c3c2
Move CSR initialization to its own file
2 years ago
Andrew Waterman
b9ecc1d4e5
In dtc_compile, use c string instead of stl string
2 years ago
Andrew Waterman
d9f21fc2db
Improve dts <-> dtb API
Avoid exposing the string args to the API.
2 years ago
Andrew Waterman
fdd2570fc4
Merge pull request #1721 from abejgonzalez/dts_parsing
Enable more configuration using the DTB
2 years ago
Andrew Waterman
62a2dd1d26
Merge pull request #1756 from riscv-software-src/clean-up-hpm
Avoid magic constants in hpmcounter implementation
2 years ago
Andrew Waterman
8e05766aa7
Merge pull request #1757 from riscv-software-src/fix-1755
Fix enabling hypervisor extension
2 years ago
Andrew Waterman
39ba3fe46d
Fix enabling hypervisor extension
I introduced a regression in #1753 .
Resolves #1755
2 years ago
Andrew Waterman
eb3ccab33e
Avoid magic constants in hpmcounter implementation
2 years ago
abejgonzalez
deeda9aa90
Fix trap interactive output
2 years ago
abejgonzalez
398101b53f
Generalize DTC compilation to support both DTS/B
2 years ago
Jerry Zhao
f11bd7b511
Support parsing procs fully from DTS
2 years ago
Jerry Zhao
6f4116d340
Move isa property to a field of processor_t, not sim_t
This incidentally makes it easier to support heterogeneous-hart configs
in the future
2 years ago
Jerry Zhao
c536affe53
Pass cfg into make_dts
2 years ago
Andrew Waterman
47a57eea73
Merge pull request #1754 from YenHaoChen/pr-vcompress
vcompress.vm: Check if there is any vector extension before using vector CSRs
2 years ago
YenHaoChen
a17842c0c5
vcompress.vm: Check if there is any vector extension before using vector CSRs
2 years ago
Andrew Waterman
957228319e
Merge pull request #1753 from riscv-software-src/fix-1752
Fix segfault accessing menvcfg when U-mode doesn't exist
2 years ago
Andrew Waterman
584f8551e6
Fix segfault accessing menvcfg when U-mode doesn't exist
The simplest fix is to create the CSRs even if they don't need to exist,
and just skip adding them to the CSR map to prevent the target machine
from being able to access them.
It looks like there are other place we should be following this pattern:
e.g. why does sstatus exist if S-mode does not exist? But that's a
matter for another day.
Resolves #1752
2 years ago
Andrew Waterman
0a2c3b650c
Merge pull request #1750 from YenHaoChen/pr-vector-xrm
vector: Check if there is any vector extension before using vector CSRs
2 years ago
YenHaoChen
e9f620ffb5
vector: Check if there is any vector extension before using vector CSRs
2 years ago
Andrew Waterman
adacda49e0
Merge pull request #1749 from YenHaoChen/pr-vnclip_wx
vnclip.wx: Check if there is any vector extension before using vector CSRs
2 years ago
YenHaoChen
54a5e38484
vnclip.wx: Check if there is any vector extension before using vector CSRs
2 years ago
Andrew Waterman
4703ad98bf
Merge pull request #1746 from chihminchao/fix-svpbmt-init
svpbmt: don't reset [mh]envcfg.pbmt to 1
2 years ago
Chih-Min Chao
94d21c99f8
svpbmt: don't reset [mh]envcfg.pbmt to 1
The part is introducd by ea70a93 to keep backward compatiable but the
behavior is not mentioned and defined in spec. The patch remove this
initialization part of pbmt in [mh]envcfg
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2 years ago
Andrew Waterman
64bc0c1f1d
Merge pull request #1740 from YenHaoChen/pr-fcvtmod_w_d
fcvtmod.w.d: Not update fflags if no exception flag, e.g., exp == frac == 0
2 years ago
YenHaoChen
e86e653ef3
fcvtmod.w.h: Not update fflags if no exception flag, e.g., exp == frac == 0
2 years ago
YenHaoChen
1342c687f2
refactor: set_fp_exceptions: Use a new macro raise_fp_exceptions(flags) and refine coding style for clearity
2 years ago
Andrew Waterman
7dce83820e
Merge pull request #1729 from YenHaoChen/pr-require-vector
Fix: Vector CSRs exist without any vector extension since a484f6e
2 years ago
Andrew Waterman
83a2035e40
Merge pull request #1718 from YenHaoChen/pr-pm
Implement pointer masking
2 years ago
Andrew Waterman
344a860ba0
Merge pull request #1724 from chihminchao/cif-sse-fix
The senvcfg.SSE will read (only) as zero when menvcfg.SSE is 0
2 years ago
Andrew Waterman
f2181f0406
Merge pull request #1732 from chihminchao/fix-zkr
Fix zkr
2 years ago
Binno
ea5138d24d
The senvcfg.SSE will read (only) as zero when menvcfg.SSE is 0
2 years ago
Binno
6dbc8cad8a
zkr: entropy source access control for seed csr
2 years ago
Andrew Waterman
34601fc488
Merge pull request #1736 from YenHaoChen/pr-hlvx-epmp
Fix ePMP checking on hlvx instructions
2 years ago
YenHaoChen
229b159465
Fix ePMP checking on hlvx instructions
The hlvx instruction must grant PMP permissions of both execution and
reading. Thus, with ePMP (mseccfg.MML==1), the hlvx instructions are
only permitted with pmpcfg.RWXL=0111 from M-mode.
2 years ago
Andrew Waterman
c0281a17d6
Merge pull request #1735 from chihminchao/deleg-hw-excp
excp: support hardware_error_exception delegation
2 years ago
Andrew Waterman
fd141e9a43
Merge pull request #1733 from chihminchao/fix-ssqosid
ssqosid: modify permission check condition for srmcfg
2 years ago
Andrew Waterman
985837a602
Merge pull request #1731 from chihminchao/fix-zicfiss
Fix zicfiss
2 years ago
Andrew Waterman
4f69177d94
Merge pull request #1730 from riscv-software-src/test-headers
Check in CI that all installed headers are usable
2 years ago
Binno
0a4f0b3da6
zkr: enable write for useed/sseed fileds of mseccfg csr
2 years ago
Binno
e9af319bc0
zicfiss: modify check condicton to loads to shadow-stack pages
2 years ago
Binno
0f0c1c1c2a
zicfiss: fix missed throw to store access fault of shadow stack page
2 years ago
Binno
08463028d6
excp: support hardware_error_exception delegation
enable M -> S and HS -> VU/VS delegation
2 years ago
Andrew Waterman
aa73432e58
Check in CI that all installed headers are usable
2 years ago
Andrew Waterman
a4924928a7
Add install-hdrs-list.h target
Only used by CI tests.
2 years ago
Andrew Waterman
77654f6011
Obtain definition of reg_t in elfloader.h
2 years ago
Andrew Waterman
97a7244371
Avoid dependence on config.h in byteorder.h
The runtime check will compile out.
2 years ago