Skip to contentSkip to conversation

riscv: Add Zicboz CBO.ZERO tests

PATCH New Sainath Grandhi 1 participant 1 message Aug 8

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: Add Zicboz CBO.ZERO tests

Add a test for CBO.ZERO when Zicboz is advertised. Read the cache-block size from riscv,cboz-block-size and allocate three aligned blocks. Execute CBO.ZERO at multiple offsets in the middle block and verify that the containing block is zeroed while the adjacent blocks remain unchanged.

Skip the test when Zicboz is unavailable.

---
 riscv/Makefile      |   1 +
 riscv/isa-zicboz.c  | 168 ++++++++++++++++++++++++++++++++++++++++++++
 riscv/unittests.cfg |   4 ++
 3 files changed, 173 insertions(+)
 create mode 100644 riscv/isa-zicboz.c
riscv/Makefile +1 -0
index 348a30a7..f4a97575 100644
@@ -15,6 +15,7 @@ tests += $(TEST_DIR)/sbi.$(exe)
 tests += $(TEST_DIR)/selftest.$(exe)
 tests += $(TEST_DIR)/sieve.$(exe)
 tests += $(TEST_DIR)/isa-dbltrp.$(exe)
+tests += $(TEST_DIR)/isa-zicboz.$(exe)
 
 all: $(tests)
 
riscv/isa-zicboz.c new file +168 -0

168 lines not on this page · raw message

riscv/unittests.cfg +4 -0
index 9e9f58d9..30594fe5 100644
@@ -22,3 +22,7 @@ groups = sbi
 [dbltrp]
 file = isa-dbltrp.flat
 groups = isa sbi
+
+[zicboz]
+file = isa-zicboz.flat
+groups = isa
Signature · 1 line
2.53.0