Andrew Waterman
23bc4cd63a
Merge pull request #1363 from YenHaoChen/pr-initial-mpp
Let mstatus.MPP initially be M-mode if unsupporting U-mode
3 years ago
YenHaoChen
4dfdf00f13
Let mstatus.MPP initially be M-mode if unsupporting U-mode
This commit lets the mstatus.MPP be a valid value if unsupporting
U-mode. Without this commit, the mret may result in a corrupted state
without properly setting the MPP to M-mode (if unsupporting U-mode).
3 years ago
Andrew Waterman
8780656d5a
Merge pull request #1346 from Wojciech-Bartczak/spike-as-lib
Install meta pkg-config file for Spike.
3 years ago
Wojciech Bartczak
7dbd0949c9
Add Spike's meta files for pkg-config
This commit adds the *.pc files for Spike's simulation library,
enabling dynamic and static linking without the need to directly
reference Spike sources. Using Spike as a stand-alone library
provides an interesting option for developing tools
and applications based on Spike.
3 years ago
Andrew Waterman
76b0027c17
Merge pull request #1347 from rbuchner-aril/rb-872
Fix for #872 mstatus.GVA
3 years ago
rbuchner
a30a0d6367
Use passed in virtual bit for creating traps in take_trigger_action() rahter than state.v
Fixes case 1 from https://github.com/riscv-software-src/riscv-isa-sim/issues/872
3 years ago
rbuchner
33fbc2df39
Plumb in effective virtual bit to take_trigger_action()
3 years ago
rbuchner
36b8c12e9f
Add split_misaligned_access() to mem_access_info_t
3 years ago
rbuchner
4b9996bad9
Pass mem_access_info_t into walk()
3 years ago
Ryan Buchner
f7900e4730
Use access_info within store_slow_path rather than xlate_flags
3 years ago
rbuchner
850600792e
Use access_info.effective_virt when failed mmio_store (i.e. device detects access fault)
Fixes case 3 from https://github.com/riscv-software-src/riscv-isa-sim/issues/872
3 years ago
Ryan Buchner
125c4d6a64
Adjust store_slow_path_intrapage to recieve a mem_access_info_t as input
3 years ago
Ryan Buchner
2745d3139c
Use access_info within load_slow_path rather than xlate_flags
Fixes case 2 from https://github.com/riscv-software-src/riscv-isa-sim/issues/872
3 years ago
rbuchner
bd67576609
Use access_info.effective_virt when failed mmio_load (i.e. device detects access fault)
Fixes case 3 from https://github.com/riscv-software-src/riscv-isa-sim/issues/872
3 years ago
rbuchner
9312137ae2
Use access_info.effective_virt when access_fault due to non-reservable lr
Fixes case 4 from https://github.com/riscv-software-src/riscv-isa-sim/issues/872
3 years ago
Ryan Buchner
87690a5ed4
Adjust load_slow_path_intrapage to recieve a mem_access_info_t as input
3 years ago
Ryan Buchner
8a34e1a5b3
Add structure (mem_access_info_t) for holding memory access information
Add complementary function for generating access information.
Update mmu_t::translate() to accept a mem_access_info_t.
3 years ago
rbuchner
a0c5bf31ba
Add is_special_access() to xlate_flags_t
3 years ago
rbuchner
d091f84af4
Add xlate_flags_t struct
Use xlate_flags_t rather than XLATE_FLAGS preprocessing directives
3 years ago
Ryan Buchner
3286d262eb
Rename RISCV_XLATE_VIRT to RISCV_XLATE_FORCED_VIRT
More readable/understandable.
3 years ago
Andrew Waterman
dc3eb2d9e3
Merge pull request #1357 from ptomsich/ptomsich/1312-fix-fcvtmod_w_d-exceptions
Zfa: fix exception behaviour for fcvtmod.w.d
3 years ago
Andrew Waterman
c10ed407ca
Merge pull request #1356 from ptomsich/ptomsich/1355-fix-fleq-fltq-exceptions
Zfa: fix missing set_fp_exceptions for fleq/fltq
3 years ago
Andrew Waterman
64532f9678
Merge pull request #1354 from ptomsich/ptomsich/1327-fix-fli_q-entries
Fix implementation of FLI.Q instruction
3 years ago
Philipp Tomsich
b07f893609
Zfa: fix missing set_fp_exceptions for fleq/fltq
3 years ago
Philipp Tomsich
d6731d58d4
Zfa: fix exception behaviour for fcvtmod.w.d
3 years ago
Philipp Tomsich
8ab77e8836
Zfa: fix bitpatterns for fli.q (entries 7, 18-25)
Ref #1327
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
3 years ago
Philipp Tomsich
9be9108b47
Zfa: fli.q requires 'Q' not 'D'
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
3 years ago
Andrew Waterman
8dd8f11510
Merge pull request #1353 from ptomsich/ptomsich/1351-Zfa-fix-NX-fround-family
Zfa: fix NX handling for the fround/froundnx family
3 years ago
Philipp Tomsich
e25fb13bcd
Zfa: fix NX handling for the fround/froundnx family
The initial implementation (together with the SAIL code and the tests)
had gotten the NX variants backwards (as in 'an inexact result is ok'
vs. 'set NX is inexact'). Update all 4 instructions.
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
3 years ago
Andrew Waterman
fcbdbe7946
Merge pull request #1316 from YenHaoChen/pr-native-triggers
implement Debug Specification Section 5.4 Native Triggers
3 years ago
YenHaoChen
83c19daaf2
triggers: native triggers (action=0) should prevent causing a breakpoint exception while already in a trap handler
This commit implements Debug Specification Section 5.4 Native Triggers.
The specification allows two solutions for solving the reentrancy
problem. This commit chooses the first solution because the second one
targets implementations without S-mode.
3 years ago
Andrew Waterman
87e0a1f86e
Merge pull request #1281 from jiegec/plic-pending
Implement pending bits for plic
3 years ago
Andrew Waterman
19a7f343af
Merge pull request #1333 from poemonsense/fix-syscall-close
Close file descriptors in destructor of syscall_t
3 years ago
Andrew Waterman
7e82fd7d19
Merge pull request #1320 from riscv-software-src/clear_wfi
Add clear in_wfi interface to proc_t
3 years ago
Jerry Zhao
79f1eed678
Add clear in_wfi interface to proc_t
This enables more flexible modelling of wfi behavior
3 years ago
Yinan Xu
5afa62e541
Close file descriptors in destructor of syscall_t
3 years ago
Andrew Waterman
0835bd7729
Merge pull request #1332 from riscv-software-src/fix-1326
Partially revert #1326
3 years ago
Andrew Waterman
64dfca6bec
Partially revert #1326
Apparently GCC still wants the UNUSED.
Not sure why CI didn't catch this initially.
3 years ago
Andrew Waterman
3f7937e25a
Merge pull request #1326 from riscv-software-src/fix-1325
Avoid declaring potentially out-of-bounds references in vmfeq etc.
3 years ago
Andrew Waterman
808fa1cab1
Avoid declaring potentially out-of-bounds references in vmfeq etc.
I don't think this was actually broken, since the references weren't used,
but it was certainly unsanitary.
Fixes #1325
3 years ago
Andrew Waterman
1c2d53a3fc
Merge pull request #1322 from plctlab/plct-vector-fix
Remove unused parameter for macro in v_ext_macro.h
3 years ago
Weiwei Li
396910b869
Rename parameters for VI_VFP_NCVT* macros to be consistent with the
comments in vfncvt*.h
3 years ago
Weiwei Li
6f0fb68d58
Fix comments error in vfncvt_*_w.h
3 years ago
Weiwei Li
b82d97a011
Remove unused parameter for macro in v_ext_macro.h
3 years ago
Jerry Zhao
887d02e421
Merge pull request #1317 from riscv-software-src/fesvrdebug
Clean up fesvr/dtm_t
3 years ago
Jerry Zhao
7470633c42
Make some dtm_t interfaces protected
* This enables useful functionality in inheritors
3 years ago
Jerry Zhao
cf5d11c987
Unify fesvr/debug_defines.h and riscv/debug_defines.h
* fesvr/debug_defines.h is removed
3 years ago
Jerry Zhao
2e07ac8d71
Add debug_defines.h to list of installed headers
3 years ago
Andrew Waterman
0b52bb6255
Merge pull request #1311 from YenHaoChen/pr-show-d-mode
explicitly show D(-mode) instead of M(-mode) when in debug mode
3 years ago
YenHaoChen
0b266f2a51
explicitly show D(-mode) instead of M(-mode) when in debug mode
Debug mode (D-mode) can be considered an additional privilege mode.
This commit proposes printing D(-mode) instead of M(-mode) for D-mode.
3 years ago