riscv: Add Zicboz CBO.ZERO tests
Subsystems (3)
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.
Signed-off-by Sainath Grandhi <[email protected]>
--- 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
@@ -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
@@ -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