aboutsummaryrefslogtreecommitdiff
path: root/riscv
AgeCommit message (Collapse)AuthorFilesLines
2019-03-31Add fesvr; only globally install fesvr headers/libsstatic-linkAndrew Waterman1-11/+0
2019-03-30RV32Q is not invalidAndrew Waterman1-3/+0
https://github.com/riscv/riscv-isa-manual/commit/013ba6dc8a504ee4ad7bee42554fecaef7ba797f#diff-2a8fece1cbcdf623cafbce866ea7d4d0R7
2019-03-27Respect interrupt priorities even when not delegatedAndrew Waterman1-9/+13
The spec says that e.g. MEI takes priority over SEI. We got this right in the common case that SEI is delegated to S-mode, but we reversed it in the undelegated case. The destination privilege was correct, so this wasn't much of a problem, but it is technically noncompliant. Resolves #288
2019-03-12include sys/types.h for suseconds_t (#285)nmeum1-0/+1
This fixes the build on Alpine Linux (which uses musl libc).
2019-03-04Implement halt groups (#280)Tim Newsome3-176/+649
* Update debug_defines from latest spec. * Implement halt groups. This lets the debugger halt multiple harts near simultaneously. * Revert encoding, which I updated accidentally.
2019-02-28Further fix PMP checks for partially-matching accesses (#270)Andrew Waterman1-3/+4
ee6fe6501a21ea8d167b6a5048527ba9eb924878 didn't get this right, as it failed to add the offset to the address when checking each 4-byte sector of the access against hte PMPs.
2019-02-04Fix use of old name `riscv-isa-run` (#269)Luís Marques1-1/+1
2019-02-04fixing compilation errors on openbsdDinesh Thirumurthy1-0/+7
2019-01-28Fix PMP checks for partially-matching accesses (#270)Andrew Waterman2-8/+21
PMP checks should unconditionally fail if the PMP matches part of, but not all of, an access. We got this right, but went too far: we checked whether _any_ PMP matches in this manner. In fact, only the first PMP that maches any of the bytes should be checked in this manner.
2019-01-09Merge pull request #265 from riscv/debug_testTim Newsome6-36/+84
Add --dmi-rti and --abstract-rti to test OpenOCD.
2018-12-21Reserve the PMP R=0 W=1 combinationAndrew Waterman1-2/+5
This was a post-v1.10 amendment to the privileged spec. https://github.com/riscv/riscv-isa-manual/commit/059f64c941856f249d8a0647e23e150dbdb1f62c
2018-12-19Flush I/O buffers before forkingAndrew Waterman1-0/+1
This prevents duplicate I/Os to buffered streams early in the program.
2018-12-13Add --dmi-rti and --abstract-rti to test OpenOCD.Tim Newsome6-36/+84
Optionally make spike behave more like real hardware, to automatically test OpenOCD's handling of such hardware.
2018-12-03Correct address autoincrement calls. (#263)Tim Newsome1-2/+5
Now we do what the spec says we should do. This ended up not having any effect on the current way OpenOCD performs system bus accesses.
2018-11-06Report misaligned-address exception on failed store-conditionalsAndrew Waterman2-14/+8
Previously, the exception would only be raised if the store-conditional would have succeeded.
2018-10-18Provide a noisy until interactive commandHesham Almatary2-6/+20
This is useful for example when the trace until a PC value needs to be extracted (#246)
2018-10-04Set marchid to assigned value 5Andrew Waterman1-1/+1
https://github.com/riscv/riscv-isa-manual/blob/master/marchid.md TODO: allow Spike users to override marchid/mvendorid/mimpid to mimic their hardware implementations more closely.
2018-09-27Add comment about CSR read side effectsAndrew Waterman1-0/+3
2018-09-25For backwards compatibility, reset PMP to permit all accessesAndrew Waterman1-0/+3
2018-09-25Add PMP supportAndrew Waterman4-24/+147
2018-09-24Add "--log-cache-miss" option to generate a log of cache miss. (#241)takeoverjp2-2/+14
* Add "--log-cache-miss" option to generate a log of cache miss. - This option must be used with "--ic" and/or "--dc" options to enable cache simulation. - This option is useful with "-l" option to understand which instruction has caused the cache miss. * Modify log format of cache miss to reduce log size.
2018-09-05Fix cut-and-paste bug in 64-bit SBA loads.Tim Newsome1-1/+1
Fixes #234.
2018-08-23Add dummy custom debug registers, to test OpenOCD. (#233)Tim Newsome2-0/+18
2018-08-23Fix several disassembler bugsAndrew Waterman1-0/+1
h/t Shane Lardinois
2018-08-23Add --disable-dtb option to suppress writing the DTB to memoryAndrew Waterman2-2/+7
2018-08-22Make IRQ_COP read-only/undelegable unless coprocessor is presentAndrew Waterman1-1/+2
2018-08-21Instantiate disassembler after max_xlen is knownAndrew Waterman1-1/+5
This fixes RVC disassembly. It's done in a way that doesn't break 2cd60b277e909a5599ca48e4561cbfbc61460186
2018-08-17Don't increment instret immediately after it is written (#231)Andrew Waterman1-0/+6
This brings Spike into compliance with this clause in the spec: https://github.com/riscv/riscv-isa-manual/blob/master/src/csr.tex#L96
2018-08-10Fix 2 trigger corner cases. (#229)Tim Newsome2-6/+14
1. When hitting a trigger during a single step, dcsr.cause must reflect the trigger not the step. 2. Also check for triggers on accesses that require a slow path fetch.
2018-07-31Make sstatus.MXR readableAndrew Waterman1-1/+1
h/t @taoliug
2018-07-23Fix using the uninitialized disassemble object. (#220)SeungRyeol Lee1-1/+1
This fixes runtime crash when custom extension registers its disassembly.
2018-07-10Refactor and fix LR/SC implementation (#217)Andrew Waterman9-11/+34
- Use physical addresses to avoid homonym ambiguity (closes #215) - Yield reservation on store-conditional (https://github.com/riscv/riscv-isa-manual/commit/03a5e722fc0fe7b94dd0a49f550ff7b41a63f612) - Don't yield reservation on exceptions (it's no longer required).
2018-06-11Update debug_defines.hTim Newsome3-285/+303
Add support for hartselhi parsing, but other parts of the debug code still don't support more than 1024 harts.
2018-05-31Put simif_t declaration in its own file. (#209)Andy Wright7-16/+27
By separating the simif_t declaration from the sim_t declaration, the simif_t declaration no longer depends on fesvr header files. This simplifies compilation of custom sim class implementations that don't depend on fesvr.
2018-05-18Fix install of missed header. (#207)Prashanth Mundkur1-0/+1
2018-05-18Extract out device-tree generation and compilation into an exported api. (#197)Prashanth Mundkur4-142/+175
2018-05-04Revert "C.LWSP and C.LDSP with rd=0 are legal instructions"Andrew Waterman2-0/+2
See https://github.com/riscv/riscv-isa-manual/commit/01190b6ebeb29cfac6783a3e7ce30cd529bf6c59
2018-05-03C.LWSP and C.LDSP with rd=0 are legal instructionsAndrew Waterman2-2/+0
This mistake derives from an ambiguity in the specification that has since been corrected: https://github.com/riscv/riscv-isa-manual/commit/272d038abebe7f006ed7960b522f1e51890bb982
2018-04-30Fix commit log for serializing instructionsAndrew Waterman1-1/+1
Resolves #199
2018-04-30Only break out of the simulator loop on WFI, not on CSR writesAndrew Waterman3-2/+9
Breaking out of the loop on WFI was intended to let other threads run when the current thread has no work to do. There's no advantage to doing so on CSR writes, and the unintentional change in thread interleaving broke some test programs that relied on short timer periods.
2018-04-04Allow querying the mmu configuration chosen during the build. (#191)Prashanth Mundkur1-0/+18
2018-04-04Revert "Fix for issue #183: No illegal instruction exception for c.sxxi ↵Andrew Waterman3-3/+3
instructions encoded with zero shift amount" This reverts commit be0555d585b332fd0496affe559c0a5a4e7e5644. See #190
2018-03-26Add an api to get the name for a CSR.Prashanth Mundkur2-0/+10
2018-03-21Implement Hauser misa.C misalignment proposal (#187)Andrew Waterman4-6/+12
See https://github.com/riscv/riscv-isa-manual/commit/0472bcdd166f45712492829a250e228bb45fa5e7 - Reads of xEPC[1] are masked when RVC is disabled - Writes to MISA are suppressed if they would cause a misaligned fetch - Misaligned PCs no longer need to be checked upon fetch
2018-03-21Fix the access exception during page-table walks to match the original ↵Prashanth Mundkur1-1/+9
access type, as specified in the manual. (#185)
2018-03-19Fix spike-dasm. (#184)Tim Newsome1-1/+2
It had been broken by 90bafe660b323250338fd564bb9ab4316576d59b.
2018-03-16Implement debug havereset bitsTim Newsome5-1/+33
2018-03-16Fix for issue #183: No illegal instruction exception for c.sxxi instructions ↵Shubhodeep Roy Choudhury3-3/+3
encoded with zero shift amount
2018-03-14Fix a bug caused by moving misa into state_t. (#180)Prashanth Mundkur2-3/+4
* Fix misa losing its value in processor constructor due to state:reset() following state.misa initialization. Make state:reset() preserve misa. * Set state.misa to max_isa on reset(). * Idiomatic fix for earlier commit.
2018-03-13Move processor.isa to state.misa, since it really belongs there.Prashanth Mundkur2-10/+10