Skip to content

Conversation

a4lg
Copy link
Owner

@a4lg a4lg commented Nov 23, 2022

@a4lg a4lg added the enhancement New feature or request label Nov 23, 2022
@a4lg a4lg force-pushed the riscv-sspmp branch 15 times, most recently from ee7c749 to 4b87c2e Compare November 30, 2022 04:15
@a4lg a4lg force-pushed the riscv-sspmp branch 2 times, most recently from 5461f32 to 332345f Compare December 2, 2022 03:27
@a4lg a4lg force-pushed the riscv-sspmp branch 4 times, most recently from e5779fd to 3454b68 Compare December 11, 2022 06:32
@a4lg a4lg force-pushed the riscv-sspmp branch 5 times, most recently from 13f8f1f to 6dc4cc9 Compare December 25, 2022 02:53
@a4lg a4lg force-pushed the riscv-sspmp branch 3 times, most recently from 8cb797c to 74e6e14 Compare December 29, 2022 01:01
@a4lg a4lg force-pushed the riscv-sspmp branch 3 times, most recently from 88e368e to e83d7f5 Compare February 8, 2023 05:34
@a4lg a4lg force-pushed the riscv-sspmp branch 2 times, most recently from d245f22 to e516528 Compare August 1, 2023 03:40
@a4lg a4lg force-pushed the riscv-sspmp branch 8 times, most recently from c7f7ad9 to 446be3d Compare August 8, 2023 04:11
@a4lg a4lg force-pushed the riscv-sspmp branch 3 times, most recently from 4301ab2 to ac3b65c Compare August 15, 2023 06:37
@a4lg a4lg force-pushed the riscv-sspmp branch 4 times, most recently from d6296b8 to aec3d14 Compare September 7, 2023 09:35
@a4lg a4lg force-pushed the riscv-sspmp branch 2 times, most recently from a3669af to d7841db Compare October 19, 2023 03:17
a4lg added 2 commits October 19, 2023 06:58
[DO NOT MERGE]
Until 'Sspmp' extension is frozen/ratified and final version number is
determined, this patch should not be merged upstream. This commit uses
unratified version 0.8 as in the documentation (instead of possible 1.0
after ratification).

This commit adds RISC-V S-mode Physical Memory Protection (SPMP) version
0.8 based on the specification:
<https://github.com/riscv/riscv-spmp/blob/c1e38ede20e4fe0a534ec7e8302c99b2a0a0ca72/rv-spmp-spec.pdf>

Note

Because CSR addresses are not fixed yet, this commit uses tentative
addresses (a part of custom CSR space).

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_implicit_subsets): Add implication 'Sspmp'
	-> 'Zicsr'.  (riscv_supported_std_s_ext): Add 'Sspmp' extension to
	valid 'S' extension list.

gas/ChangeLog:

	* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
	the 'Sspmp' extension.  (riscv_csr_address): Add handling for new
	CSR classes.
	* testsuite/gas/riscv/csr-dw-regnums.d: Add new CSRs.
	* testsuite/gas/riscv/csr-dw-regnums.s: Likewise.
	* testsuite/gas/riscv/csr.s: Add new CSRs.
	* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
	* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
	* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
	* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p12.l: Likewise.

include/ChangeLog:

	* opcode/riscv-opc.h (CSR_SPMPCFG0, CSR_SPMPCFG1, CSR_SPMPCFG2,
	CSR_SPMPCFG3, CSR_SPMPCFG4, CSR_SPMPCFG5, CSR_SPMPCFG6,
	CSR_SPMPCFG7, CSR_SPMPCFG8, CSR_SPMPCFG9, CSR_SPMPCFG10,
	CSR_SPMPCFG11, CSR_SPMPCFG12, CSR_SPMPCFG13, CSR_SPMPCFG14,
	CSR_SPMPCFG15, CSR_SPMPSWITCH0, CSR_SPMPSWITCH1, CSR_SPMPADDR0,
	CSR_SPMPADDR1, CSR_SPMPADDR2, CSR_SPMPADDR3, CSR_SPMPADDR4,
	CSR_SPMPADDR5, CSR_SPMPADDR6, CSR_SPMPADDR7, CSR_SPMPADDR8,
	CSR_SPMPADDR9, CSR_SPMPADDR10, CSR_SPMPADDR11, CSR_SPMPADDR12,
	CSR_SPMPADDR13, CSR_SPMPADDR14, CSR_SPMPADDR15, CSR_SPMPADDR16,
	CSR_SPMPADDR17, CSR_SPMPADDR18, CSR_SPMPADDR19, CSR_SPMPADDR20,
	CSR_SPMPADDR21, CSR_SPMPADDR22, CSR_SPMPADDR23, CSR_SPMPADDR24,
	CSR_SPMPADDR25, CSR_SPMPADDR26, CSR_SPMPADDR27, CSR_SPMPADDR28,
	CSR_SPMPADDR29, CSR_SPMPADDR30, CSR_SPMPADDR31, CSR_SPMPADDR32,
	CSR_SPMPADDR33, CSR_SPMPADDR34, CSR_SPMPADDR35, CSR_SPMPADDR36,
	CSR_SPMPADDR37, CSR_SPMPADDR38, CSR_SPMPADDR39, CSR_SPMPADDR40,
	CSR_SPMPADDR41, CSR_SPMPADDR42, CSR_SPMPADDR43, CSR_SPMPADDR44,
	CSR_SPMPADDR45, CSR_SPMPADDR46, CSR_SPMPADDR47, CSR_SPMPADDR48,
	CSR_SPMPADDR49, CSR_SPMPADDR50, CSR_SPMPADDR51, CSR_SPMPADDR52,
	CSR_SPMPADDR53, CSR_SPMPADDR54, CSR_SPMPADDR55, CSR_SPMPADDR56,
	CSR_SPMPADDR57, CSR_SPMPADDR58, CSR_SPMPADDR59, CSR_SPMPADDR60,
	CSR_SPMPADDR61, CSR_SPMPADDR62, CSR_SPMPADDR63): New.
**DEVELOPMENT ENVIRONMENT ONLY**

The attached script can be used to replace related source files when
the CSR addresses of "spmpcfg*", "spmpaddr*" and "spmpswitch[01]"
(now tentative) are determined.

Note that this script accepts the CSR addresses of "spmpcfg0" and
"spmpaddr0", assuming subsequent entries are consecutive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant