aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_pmp_control.sail
AgeCommit message (Collapse)AuthorFilesLines
2024-03-24Replace atom with intTim Hutt1-1/+1
This is the newer, less confusing (and documented!) syntax. Fixes #425.
2024-02-08Shorten copyright notice at the top of each fileTim Hutt1-65/+3
This script was used to do the modification: ``` from pathlib import Path import re RE_LINE = r"/\*={50,150}\*/\n" RE_MIDDLE = r"/\*.*\*/\n" NEW_TEXT = """/*=======================================================================================*/ /* This Sail RISC-V architecture model, comprising all files and */ /* directories except where otherwise noted is subject the BSD */ /* two-clause license in the LICENSE file. */ /* */ /* SPDX-License-Identifier: BSD-2-Clause */ /*=======================================================================================*/ """ REPLACEMENT = re.compile(rf"^{RE_LINE}(?:{RE_MIDDLE}){{10,100}}{RE_LINE}") def main(): for file in Path("model").glob("**/*.sail"): text = file.read_text(encoding="utf-8") text = REPLACEMENT.sub(NEW_TEXT, text, 1) file.write_text(text, encoding="utf-8") if __name__ == "__main__": main() ```
2024-02-05Improve PMP supportTim Hutt1-99/+39
This implements a lot of missing functionality for PMPs. * Support 64 PMPs as well as 0 and 16. * Support setting PMP grain * Return correct address bits on read (some read as 0 or 1 depending on the grain and match type) * Unlock PMPs on reset * Implement pmpcfg WARL legalisation Co-authored-by: Ben Fletcher <benjamin.fletcher@codasip.com>
2024-01-31Update bitfield syntaxAlasdair1-5/+5
Use newer bitfield syntax, which has been part of Sail for a while now. Should in theory be more efficient as it removes a level of indirection for bitfield accesses. It's also much more friendly to `sail -fmt`, which has no idea how to handle the old bitfield syntax.
2023-05-29apply_headers: regenerate copyright headersupdate-copyright-headersPhilipp Tomsich1-1/+3
2023-05-29Changed the pmp initial misconfiguration check so that if the low and high ↵Muhammad Bilal Sakhawat1-1/+1
range limit are the same then no pmp match
2021-07-29Use headache to apply copyright header at request of Peter Sewell.Robert Norton1-0/+68
2021-03-19pmp: pmp address match misses some corner casesBicheng Yang1-1/+1
2020-06-05Avoid relying on ext_access_type values in PMP, to be compatible with ↵Prashanth Mundkur1-8/+8
extensions.
2020-02-06Handle locked TOR entries when writing PMP addresses.Prashanth Mundkur1-1/+1
Fixes #36.
2019-09-04Merge remote-tracking branch 'origin/master' into vmem_ext.vmem_extRobert Norton1-5/+5
2019-08-19RISC-V spec, without implicit castsAlasdair Armstrong1-5/+5
2019-07-22Make a custom exception code available for extensions, and remove the ↵Prashanth Mundkur1-4/+4
E_CHERI code. Enable extensions for PTE checks and PTW errors, and propagate those into exception codes.
2019-07-15Allow extensions to types of memory access, and factor out PTE and PTW ↵Prashanth Mundkur1-12/+12
definitions.
2019-06-24Add PMP checks to physical memory accesses.Prashanth Mundkur1-3/+25
- unify AccessType and ReadType since they were essentially redundant, making it easier to implement PMP checks for ReadWrite/atomic accesses. - add command line options to enable PMP in the platform - also fix the matching for the case when all entries are off
2019-06-21Checked locked flag on PMP reg writes, and add the special case for the ↵Prashanth Mundkur1-2/+6
pmpaddr0 check.
2019-06-20Hook in csr reads/writes to PMP regs. Locked entries are not yet handled.Prashanth Mundkur1-15/+15
2019-06-20Add PMP address and entry matching, and priority logic.Prashanth Mundkur1-0/+159
This is specialized for now for the smallest PMP grain of 4 bytes.