aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-02-04Add int_map and use it to speed up sparse memsparse-memAndrew Waterman2-9/+7
2021-02-04Refactor headersAndrew Waterman6-11/+22
2021-02-03Fix compile errorsAndrew Waterman2-5/+5
2021-02-03sparse mem wipAndrew Waterman3-11/+48
2021-02-03Fix --kernel and --initrd options w.r.t. sparse mem_t implementationAndrew Waterman4-31/+60
For some reason, the old accessors for the non-sparse version were left dangling. These methods are used by the --kernel and --initrd options, and so those options were just broken. This also fixes a memory leak and refactors the implementation a bit.
2021-02-02fixed typos and paths for arch_test readme (#638)Neel Gala1-5/+7
Co-authored-by: Neel Gala <neelgala@incoresemi.com>
2021-01-27Increment minstret when WFI completes (#636)Scott Johnson1-1/+1
See https://github.com/riscv/riscv-isa-manual/issues/189#issuecomment-768525017
2021-01-22scalar-crypto: Initial spike support for v0.8.1 (#635)Ben Marshall34-1/+984
Brief: - This commit adds spike support for the scalar cryptography extension. See the riscv-crypto repository (https://github.com/riscv/riscv-crypto) for more information on this extension. - It is based on the experimental patch which has so far been kept in the riscv-crypto repository. Now that scalar crypto is nearly at the "freeze" stage and entering opcode consistency review, it makes sense to start upstreaming our experimental version. - In terms of compiler support - we are using an experimental patch in the riscv-crypto repository at the moment, others are working on an upstream appropriate version. Details: - Add support for dedicated scalar crypto instructions. - Add very basic support for the entropy source (entropy_source.h). Much of the behaviour of this is implementation specific. This model aims to provide the bare minimum of functionality which can be used to quickly develop software. It uses /dev/urandom as its entropy source for now. - Scalar crypto is unique in that it _borrows_ instructions from the Bitmanipulation extension. This is currently _not_ encoded in the patch, as I didn't want to damage anything in Bitmanip which is currently under review. However, I've added a macro in riscv/decode.h called "require_either_extension(A,B)", which allows instructions to be valid opcodes iff they are in one or both extensions. On branch scalar-crypto Changes to be committed: modified: README.md modified: riscv/decode.h modified: riscv/encoding.h new file: riscv/entropy_source.h new file: riscv/insns/aes64im.h new file: riscv/insns/aes64ks1i.h new file: riscv/insns/aes64ks2.h new file: riscv/insns/aes_common.h new file: riscv/insns/aesds.h new file: riscv/insns/aesdsm.h new file: riscv/insns/aeses.h new file: riscv/insns/aesesm.h new file: riscv/insns/sha256sig0.h new file: riscv/insns/sha256sig1.h new file: riscv/insns/sha256sum0.h new file: riscv/insns/sha256sum1.h new file: riscv/insns/sha512sig0.h new file: riscv/insns/sha512sig0h.h new file: riscv/insns/sha512sig0l.h new file: riscv/insns/sha512sig1.h new file: riscv/insns/sha512sig1h.h new file: riscv/insns/sha512sig1l.h new file: riscv/insns/sha512sum0.h new file: riscv/insns/sha512sum0r.h new file: riscv/insns/sha512sum1.h new file: riscv/insns/sha512sum1r.h new file: riscv/insns/sm3p0.h new file: riscv/insns/sm3p1.h new file: riscv/insns/sm4_common.h new file: riscv/insns/sm4ed.h new file: riscv/insns/sm4ks.h modified: riscv/processor.cc modified: riscv/processor.h modified: riscv/riscv.mk.in
2021-01-21adding spike as a target to the arch-test-framework (#630)Neel Gala14-0/+567
* files and collateral for adding spike as a target to the arch-test-framework * minor typo fix Co-authored-by: Neel Gala <neelgala@incoresemi.com>
2021-01-20add support to page on demand (#634)Chih-Min Chao4-6/+28
This patch splites the target-requested memory regions into pages and only allocates host memory when it is accessed to reduce larget memory sceniaro in 64 bit target system Co-authored-by: Dave.Wen <dave.wen@sifive.com>
2021-01-17rvb: add xperm.[nbhw] (#629)Chih-Min Chao8-1/+48
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2021-01-14Add hypervisor extension to READMEAndrew Waterman1-0/+1
Resolves #628
2021-01-11Mention yum in addition to apt-getAndrew Waterman1-0/+3
Resolves #625
2021-01-08Update Zba/Zbb/Zbc to v0.93; Zbs/Zbe to v0.94-draftAndrew Waterman33-463/+395
2021-01-08Remove RV128 fmv.x.q/fmv.q.x instructions from disassemblerAndrew Waterman1-2/+0
Since we don't support RV128
2020-12-29Add log2 helper functionAndrew Waterman1-0/+8
2020-12-29Fix compile warningsAndrew Waterman2-4/+2
2020-12-29Install config.h into include/fesvrAndrew Waterman2-2/+13
2020-12-28Install fesvr/byteorder.h to fix #622Andrew Waterman2-0/+1
2020-12-22rvv: make fractional lmul checking simpler and stricter (#620)Chih-Min Chao2-3/+1
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-12-18If misaligned accesses are enabled, throw access fault on misaligned LR/SCAndrew Waterman1-2/+20
See #617 for discussion. Resolves #617.
2020-12-18Merge pull request #619 from mehmetoguzderin/guess-new-arch-2020Andrew Waterman2-1787/+2150
Update config file to support aarch64
2020-12-18Merge pull request #618 from avpatel/mmu_proc_fix_v1Andrew Waterman3-6/+6
Check and use proc variable in MMU emulation
2020-12-18Fix processor_t:take_interrupt() for HS-mode interruptsAnup Patel1-1/+1
When deciding HS-mode interrupts in processor_t:take_interrupt() we should use "~state.hideleg" instead of "~MIP_VS_MASK" because VS interrupt bits are writeable in HIDELEG CSR. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2020-12-18Update config file to support aarch64Mehmet Oguz Derin2-1787/+2150
2020-12-18Check and use proc variable in MMU emulationAnup Patel2-5/+5
We cannot blindly use proc variable in MMU emulation because external debug emulation instantiates MMU with proc=NULL. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2020-12-15Add Zba/Zbb to disassemblerAndrew Waterman1-0/+27
2020-12-14Merge pull request #616 from chihminchao/misc-fix-2020-12-14Andrew Waterman4-5/+30
Misc fix 2020 12 14
2020-12-14rvv: fix the v[z|s]ext about elmul checking.Dave.Wen1-1/+1
2020-12-14disasm: show fench's predecessor and successorChih-Min Chao2-1/+26
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-12-14dts: mmu: replace 'riscv,bare' by 'riscv,sbare'Chih-Min Chao2-3/+3
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-12-13Preserve abstract s0 write if progbuf excepts. (#615)Tim Newsome1-0/+11
When a single abstract command writes s0 and executes a program buffer that leads to an exception, the value of s0 should still persist. The fact that it did not masked the following bug in OpenOCD: https://github.com/riscv/riscv-openocd/issues/559
2020-12-07Oops...napot_bits should use ctz, not clz (#614)Daniel Lustig1-2/+2
2020-12-04Merge pull request #613 from chihminchao/rvv-fix-2020-12-04Andrew Waterman3-1/+3
Rvv fix 2020 12 04
2020-12-04rvv: check the vz/sext's eewDave.Wen1-0/+1
2020-12-04rvv: update the fractional lmul checking rule to rvv1.0-draftDave.Wen2-1/+2
2020-12-02rvv: index load/store have benn separated into ordered and unordered parts ↵Chih-Min Chao19-88/+129
(#611) ref: https://github.com/riscv/riscv-v-spec/commit/511d0b84a3848de437fd01990d078feaa2871b11 Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-12-01Remove stray comma in configureAndrew Waterman2-2/+2
2020-12-01Fix Issue #609 (#610)Will Hawkins1-5/+1
Fix Issue #609 where extraneous debugging output was added when the user invoked any simulation operation that involved addr_to_mem.
2020-11-29Fix #607: Add a core parameter to the interactive str command (#608)Will Hawkins2-5/+18
Add a core parameter to the interactive str command. This makes it possible for the spike user to specify the device whose memory contains the NUL-terminated string to be printed.
2020-11-29Merge pull request #605 from avpatel/riscv_gva_fix_v1Andrew Waterman4-26/+38
Fix hstatus.GVA and mstatus.GVA updation
2020-11-28Fix typo in HTVAL CSR write emulationAnup Patel1-1/+1
We are saving new HTVAL value in wrong location for HTVAL CSR write so let's fix this. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2020-11-27Fix hstatus.GVA and mstatus.GVA updationAnup Patel3-25/+37
The hstatus.GVA and mstatus.GVA should be set only when guest virtual address is written to stval or mtval CSRs at time of taking trap. This patch update access, page fault, and guest page fault trap classes so that we can pass gva flag correct from source of the trap. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2020-11-26Include stdexcept in ELF loader (#603)Daniel Bates1-0/+1
2020-11-23Fix misaligned loads and stores for big endian target (#602)Marcus Comstedt1-2/+2
2020-11-23Fix VSSTATUS bits updation (#568)Anup Patel2-16/+20
This patch fixes VSSTATUS bits updations as follows: 1. set_csr() should not allow writs to VSSTATUS.SD bit instead VSSTATUS.SD bit should be derived again after VSSTATUS is updated 2. set_virt() should copy FS, VS and XS bits when transitioning from virt=on (VS/VU-mode) to virt=off (HS/M-mode) Signed-off-by: Anup Patel <anup.patel@wdc.com>
2020-11-18Don't include PTE.N bit as part of the PPNAndrew Waterman1-2/+2
2020-11-18Invalid NAPOT settings cause page faults, not access exceptionsAndrew Waterman1-2/+2
2020-11-18Add Zsn extensionAndrew Waterman3-3/+20
h/t @daniellustig
2020-11-18Avoid use of __builtin_popcount for portabilityAndrew Waterman6-5/+16