Skip to content

add tests for the SPMP extension#647

Open
ybc-alkaid wants to merge 5 commits into
riscv-software-src:masterfrom
ybc-alkaid:master
Open

add tests for the SPMP extension#647
ybc-alkaid wants to merge 5 commits into
riscv-software-src:masterfrom
ybc-alkaid:master

Conversation

@ybc-alkaid
Copy link
Copy Markdown

@ybc-alkaid ybc-alkaid commented Jan 23, 2026

This PR introduces basic tests for the RISC-V S-level Physical Memory Protection (SPMP) extension.

Here is the pointer to the SPMP specification:
riscv/riscv-isa-manual#2573

Here is a pre-built PDF of SPMP:
https://github.com/riscv/riscv-spmp/blob/main/rv-spmp-spec.pdf

Comment thread benchmarks/Makefile Outdated
Copy link
Copy Markdown
Collaborator

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @ybc-alkaid. I see these are not included in isa/Makefile, presumably because they don't yet work on upstream Spike.

My preference is to add them to isa/Makefile, but wait to merge this PR until Spike can execute them.

Signed-off-by: Bicheng Yang <SuperYbc@outlook.com>
@ybc-alkaid
Copy link
Copy Markdown
Author

ybc-alkaid commented Jan 24, 2026

Hi @aswaterman,
The tests have been added to isa/rv64si/Makefrag and isa/rv32si/Makefrag, so they will be included in isa/Makefile. It this the right way?

@aswaterman
Copy link
Copy Markdown
Collaborator

@ybc-alkaid My mistake, it looks like you did it correctly.

How did you test these tests? Do you have a prototype of SPMP in Spike so that you can successfully execute make run in the isa/ directory?

@ybc-alkaid
Copy link
Copy Markdown
Author

@aswaterman Yes, I test it via my Spike prototype: https://github.com/ybc-alkaid/riscv-isa-sim
This implementation is only for basic tests, and does not support resource sharing (i.e., mpmpdeleg).
The simulator that complies with the SPMP specification is QEMU: https://github.com/luisccc/qemu/tree/feat/spmp

execute make run in the isa/ directory

That requires a minor modification to the Makefile. I've updated it.

Comment thread isa/Makefile Outdated
@aswaterman
Copy link
Copy Markdown
Collaborator

Yes, I test it via my Spike prototype

Cool. Once the Spike stuff is merged, we can merge this PR, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants