aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-07-30Move fence inside entry_loop.debug_rom_fenceTim Newsome2-5/+4
This greatly reduces the amount of spinning in the debug loop spike does when DEBUG_ROM_FLAGS are written by the debug module, because now it's not getting a cached version over and over again. Test using riscv-tests/debug. Debugging still works.
2022-07-30DSCRATCH is now called DSCRATCH0Tim Newsome1-4/+4
Fixes build.
2022-07-30Fix debug_rom.S build command error.Tim Newsome1-1/+1
Previously gcc would complain that link.lds was mentioned twice (once on the command line and once with a -T directive.)
2022-07-25Pay attention to dmcs2.grouptype. (#1049)Tim Newsome1-1/+3
2022-07-21Merge pull request #1040 from plctlab/plct-priv-devAndrew Waterman5-31/+59
Update for counter related CSR
2022-07-21add base verify_permission in counter_proxy_csr_t::verify_permissionsWeiwei Li1-1/+3
Normally, csrs will reuse the checks in verify_permissions of its base csr type This modification will not cause any functional change, just reuse the check in csr_t class to check whether it writes to read-only csr instead of checking writes to counter_proxy_csr_t by itself.
2022-07-21add support for time/timeh/htimedelta/htimedeltah csrsWeiwei Li5-0/+49
2022-07-21modify minstret/mcycle/minstreth/mcycleh to reuse rv32_low/high_csr_tWeiwei Li3-44/+21
2022-07-18Fix load/store performance under clangAndrew Waterman2-2/+4
Hopefully for the last time :-)
2022-07-18Merge pull request #1041 from plctlab/plct-new-csrsAndrew Waterman5-37/+44
add support for m/henvcfgh and mconfigptr CSRs
2022-07-18Merge pull request #1047 from scottj97/fix-misaligned-hlvScott Johnson1-4/+19
Fix misaligned HLV/HLVX/HSV
2022-07-18Fix totally-broken misaligned HSVScott Johnson1-1/+5
It was accessing memory using the current privilege mode instead of the expected guest privilege. Once #872 is fixed, I suspect we can greatly simplify this.
2022-07-18Fix totally-broken misaligned HLV/HLVXScott Johnson1-1/+6
They were accessing memory using the current privilege mode instead of the expected guest privilege. Once #872 is fixed, I suspect we can greatly simplify this.
2022-07-18Remove no-longer-necessary typecastScott Johnson1-1/+1
It was previously necessary because we were shifting left before assigning to a reg_t, but that changed in the previous commit.
2022-07-17modify the check for "state->prv >= PRV_M" to "state->prv == PRV_M"Weiwei Li1-1/+1
prv can never be larger than PRV_M
2022-07-17add U mode check for *envcfg*Weiwei Li1-24/+26
- If U-mode is not supported, then registers menvcfg and menvcfgh do not exist - Since H extension requires S-mode, and S mode can not exsit without U-mode, so senvcfg, henvcfg/henvcfgh also do not exist if U-mode is not supported
2022-07-17Fix the initial value and write mask for mstatusWeiwei Li1-2/+6
- MPRV is read-only 0 if U-mode is not supported - If U-mode is not supported, UBE is read-only 0 - If S-mode is not supported, SBE is read-only 0
2022-07-17remove unnecessary ifdef for RISCV_ENABLE_DUAL_ENDIANWeiwei Li3-14/+0
the default target endian is always little endian: - mmu::is_target_big_endian() return false - sim_t::get_target_endianness() return memif_endianness_little when RISCV_ENABLE_DUAL_ENDIAN macro is undefined
2022-07-17extract the progress of computing the inital value of mstatus intoWeiwei Li2-9/+12
separate function compute_mstatus_initial_value()
2022-07-15Split up misaligned store into several stepsScott Johnson1-2/+5
Since the last step is about to get much more complex
2022-07-15Split up misaligned load into several stepsScott Johnson1-2/+5
Since the middle step is about to get much more complex
2022-07-15Merge pull request #1043 from YenHaoChen/pr-conditionalize-epmpAndrew Waterman4-0/+10
Conditionalize Smepmp extension (ePMP) support
2022-07-14add support for mconfigptr csr: it's hardwired to zero currentlyWeiwei Li1-1/+1
2022-07-14add support for m/henvcfgh csrsWeiwei Li1-3/+15
2022-07-13Merge pull request #1045 from scottj97/fix1044Scott Johnson4-15/+62
Fix #1044
2022-07-13Properly log mstatush side effect updatesScott Johnson3-2/+6
These have never been logged properly.
2022-07-13Add assertion to ensure proper logging of mstatus changes on RV32Scott Johnson1-0/+4
2022-07-13Use rv32_low_csr_t for Smstateen CSRsScott Johnson1-2/+8
Otherwise they will have the same problem as #1044
2022-07-13Add proxy for accessing the low 32 bits of a 64-bit CSRScott Johnson3-1/+37
Use this for mstatus on RV32 so that `csrw mstatus` does not modify the bits in `mstatush`. Fixes #1044.
2022-07-13Remove no-longer-needed mask from rv32_high_csr_tScott Johnson2-3/+2
2022-07-13Remove unnecessary mask from rv32_high_csr_t constructorScott Johnson3-9/+7
2022-07-13Remove mstatush mask as unnecessaryScott Johnson1-1/+1
Mask in underlying CSR is sufficient. Mask field in rv32_high_csr_t is now unneeded and will be removed next.
2022-07-13add check for H extension requires S mode (#1042)liweiwei902-1/+4
2022-07-13Add verify_permissions() for mseccfg_csr_tYenHaoChen2-0/+7
The mseccfg only exists when enabling the Smepmp extension. If not enabling the Smepmp extension, CSR instructions to the mseccfg raise illegal instruction faults, and the PMP behaviors as hardwiring mseccfg 0 (the reset value of mseccfg).
2022-07-13add isa string parser for smepmpYenHaoChen2-0/+3
2022-07-11Merge pull request #1035 from plctlab/plct-smstateen-devAndrew Waterman13-3506/+3645
Add support for smstateen 1.0.0
2022-07-11Allow writes to pmp(i-1)cfg on locked pmp(i)cfg (#1039)YenHaoChen1-1/+1
The privileged spec allows writes to pmp(i-1)cfg with locked pmp(i)cfg (According to a recent discussion: https://github.com/riscv/riscv-isa-manual/issues/866)
2022-07-09update README.mdWeiwei Li1-0/+1
2022-07-09add smstateen check for fcsr, senvcfg, henvcfgWeiwei Li2-0/+44
2022-07-09add standalone class for fcsr and senvcfg csrWeiwei Li3-2/+24
2022-07-09add support for csrs of smstateen extensionsWeiwei Li4-0/+106
2022-07-07modify mstatush_csr_t to general rv32_high_csr_tWeiwei Li3-13/+23
2022-07-07add isa string parser for smstateenWeiwei Li2-0/+3
2022-07-07update encoding.hWeiwei Li1-3381/+3444
2022-07-07remove multi blank linesWeiwei Li8-110/+0
2022-06-07Merge pull request #1027 from riscv-software-src/fix-1022Andrew Waterman4-14/+10
Fix #1022 by removing need to mask insn_t bits
2022-06-06Don't mask instruction bitsAndrew Waterman2-2/+2
No longer needed, since they are no longer sign-extended. Fixes #1022 by eliminating undefined behavior (64-bit instructions resulted in a shift amount equal to the datatype width).
2022-06-06Zero-extend instructions in spike-dasmAndrew Waterman1-5/+1
...since we no longer rely on their being sign-extended.
2022-06-06Zero-extend instructions when fetching them from memoryAndrew Waterman1-4/+4
...since we no longer rely on their being sign-extended.
2022-06-06insn_t: don't rely on sign-extension of internal encodingAndrew Waterman1-3/+3