Age | Commit message (Collapse) | Author | Files | Lines |
|
Using the new riscv_mem functions to elide the Privilege level computation
|
|
- Expose "just below the periphery" functions that allow bypassing
effectivePermission and instead take a Permission explicitly (as well as an
AccessType, in the case of reads, to distinguish Read from Execute; for
writes, just an ext_access_type that will be wrapped in Write).
|
|
Previously we were erroneously passing the instruction's memory access to lower
layers of the memory machinery. For example, a store instruction still should
be attempting reads of PTEs, not stores.
|
|
This function was inconsistent in its use of arguments vs. globals. However, in
all existing cases, the arguments are fed as the values of these globals, so
this has no observable impacts in the current model, but hopefully prevents
confusion later.
|
|
This was broken by #76
|
|
Add support for the new RVFI_DII socket format
|
|
PMP address match misses some corner cases
|
|
The RISC-V specification says:
"Software should not set the rl bit on an LR instruction unless the aq
bit is also set, nor should software set the aq bit on an SC
instruction unless the rl bit is also set. LR.rl and SC.aq
instructions are not guaranteed to provide any stronger ordering than
those with both bits clear, but may result in lower performance."
i.e. these instructions are allowed but do not have stronger atomicity
guarantees than the versions without the bits set. To implement this
we AND the rl bit on lr with the aq bit, and similarly AND the aq bit
on sc with the rl bit.
Prior to this patch these instructions would generate
Error_not_implemented in riscv_mem.sail . An alternative to this patch
would be to 'downgrade' the operations there but I think that would
risk future extensions calling mem_read / mem_write without being
made aware of these special cases (open to discussion).
|
|
Even though the relevant encodings are not currently valid it does no
harm to implement them in the obvious way. It means it will be
trivial to enable them if they do become valid and extensions can
choose to implement them simply by adding the relevant decoding.
|
|
The RISC-V spec. only shows LR / SC / AMOs for word and double widths
even though the encoding would naturally extend to other widths (it is
a little unclear). Previously the Sail model would decode the unused
widths but throw an internal error in execute. With this change the
unused widths will not be decoded and will cause illegal instruction
exceptions instead.
|
|
|
|
|
|
Previously we were always sending the fields in a fixed order, but we have
to omit optional data that is not set. This refactors the logic and adds
new getters for the optional data. This code will become a lot simpler once
we support the -c2 backend of sail.
|
|
|
|
All packets start with a magic 8 byte header now and the riscv_sim.c code
now sends an acknowledgement packet for version requests.
|
|
This was causing TestRIG to wait indefinitely
|
|
|
|
This is not a finalized trace format yet.
|
|
|
|
|
|
Prevent CSRW to sstatus from modifying uie & upie if N-ext not present
|
|
|
|
|
|
|
|
|
|
Instead of always writing 0 to mie.SSIP when it's undelegated.
|
|
|
|
Fixes #70.
|
|
Unaligned writes or writes narrower than 32-bits are not supported.
Fixes #69.
|
|
concurrency is not yet modelled.
Thanks to Christopher Pulte.
|
|
This currently maps their assembly renditions to non-standard instructions to preserve bidirectional mappings.
Fixes #67 and #29.
|
|
|
|
|
|
|
|
|
|
|
|
Split ext_ptw into pieces and add documentation
|
|
It was somewhat annoying that CHERI would have had to track both
successful and erroneous occurrences within the same type. Break the
failures out to their own form and, while here, attempt to write down my
understanding of the extension's information flow through vmem.
|
|
Just because they're not present in the SV32 PTE doesn't mean that
models necessarily need to interpret them as zeros; any constant will do
just fine. This allows extensions (like CHERI) that have both RV32 and
RV64 versions to define more standard idiomatic interpretation to the
bits within the PTE extension field.
|
|
This redoes https://github.com/rems-project/sail-riscv/pull/57 without
nearly as much excitement. We sill want it for CHERI, so that we can
signal from the instruction to the PTW whether we are prepared to load a
capability (or will strip any tags that we load) and whether the store
will (or might) set a tag.
Thanks to Prashanth Mundkur for several improvements.
|
|
|
|
Otherwise there's no use for PTW_Ext_Error. This is required for
sail-cheri-riscv to be able to make use of its own page table
exceptions. The alternative to this is to pass the ext_ptw to
translationException, but given PTW_Ext_Error exists it seems this was
the intended way, and aligns with how access faults vs page faults are
distinguished.
|
|
Fixes #58.
|
|
extensions.
|
|
encdec_compressed.
|
|
|
|
|
|
|
|
* New functions to simplify float NaN detection
* Remove unnecessary intermediate values
Now that we have simpler function f_is_NaN
* FMIN/FMAX should return canonical NaN if both operands are NaN
Fixes #52.
* Simplify logic for FMIN/FMAX
Spec says "If only one operand is a NaN, the result is the non-NaN
operand." So no need to distinguish SNaN from QNaN here.
|
|
Fixes #51.
|