Skip to content

Commit

Permalink
Rename Svadu to Svhad
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-rivos committed Aug 12, 2023
1 parent e3ef7a6 commit 7995094
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CHANGELOG

## [3.7.1] - 2023-07-30
- Add support for unratified Svadu extension
- Add support for unratified Svhad extension

## [3.7.0] - 2023-05-16
- Updated the LI macro
Expand Down
8 changes: 0 additions & 8 deletions coverage/rv32_svadu.cgf

This file was deleted.

8 changes: 8 additions & 0 deletions coverage/rv32_svhad.cgf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

svhad_sv32:
config:
- check ISA:=regex(.*I.*Svhad.*)
opcode:
nop: 0


17 changes: 0 additions & 17 deletions coverage/rv64_svadu.cgf

This file was deleted.

17 changes: 17 additions & 0 deletions coverage/rv64_svhad.cgf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
svhad_sv39:
config:
- check ISA:=regex(.*I.*Svhad.*)
opcode:
nop: 0

svhad_sv48:
config:
- check ISA:=regex(.*I.*Svhad.*)
opcode:
nop: 0

svhad_sv57:
config:
- check ISA:=regex(.*I.*Svhad.*)
opcode:
nop: 0
4 changes: 2 additions & 2 deletions riscv-test-suite/env/test_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ RVTEST_SIGUPD_F(swreg,destreg,flagreg)
sub x1,x1,tempreg ;\
RVTEST_SIGUPD(swreg,x1,offset)

#define SETUP_PMP_SVADU_TEST(swreg, offset, TR0, TR1, TR2) \
#define SETUP_PMP_SVHAD_TEST(swreg, offset, TR0, TR1, TR2) \
li TR0, -1 ;\
csrw pmpaddr0, TR0 ;\
j PMP_exist ;\
Expand All @@ -1004,7 +1004,7 @@ Mend_PMP: ;\
RVTEST_SIGUPD(x1,TR0,offset) ;\
RVTEST_SIGUPD(x1,TR1,offset) ;\

#define TEST_SVADU(swreg, PTE_ADDR, VA, offset, menvcfgaddr, hade_bit) \
#define TEST_SVHAD(swreg, PTE_ADDR, VA, offset, menvcfgaddr, hade_bit) \
sfence.vma ;\
la t0, VA ;\
li t2, PTE_X | PTE_W | PTE_R ;\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: BSD-3-Clause
// -----------
//
// This assembly file tests the Svadu extension
// This assembly file tests the Svhad extension
//
#include "model_test.h"
#include "arch_test.h"
Expand All @@ -19,12 +19,12 @@ RVMODEL_BOOT
RVTEST_CODE_BEGIN

#ifdef TEST_CASE_1
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*);check ISA:=regex(.*Svadu.*);def rvtest_mtrap_routine=True;def TEST_CASE_1=True;",svadu_sv32)
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*);check ISA:=regex(.*Svhad.*);def rvtest_mtrap_routine=True;def TEST_CASE_1=True;",svhad_sv32)

RVTEST_SIGBASE(x1, signature_x1_0)

# Setup PMP to cover 4G of address space
SETUP_PMP_SVADU_TEST(x1, offset, t0, t1, t2)
SETUP_PMP_SVHAD_TEST(x1, offset, t0, t1, t2)

# Identity map the page_4k
la t1, page_4k
Expand All @@ -34,8 +34,8 @@ RVTEST_CODE_BEGIN
# enable virtual memory in Sv32 mode
SATP_SETUP(t0, t1, SATP32_MODE)

# test svadu
TEST_SVADU(x1, s2, page_4k, offset, 0x31a, MENVCFGH_HADE)
# test svhad
TEST_SVHAD(x1, s2, page_4k, offset, 0x31a, MENVCFGH_HADE)
RVMODEL_HALT

#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: BSD-3-Clause
// -----------
//
// This assembly file tests the Svadu extension
// This assembly file tests the Svhad extension
//
#include "model_test.h"
#include "arch_test.h"
Expand All @@ -19,12 +19,12 @@ RVMODEL_BOOT
RVTEST_CODE_BEGIN

#ifdef TEST_CASE_1
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);check ISA:=regex(.*Svadu.*);def rvtest_mtrap_routine=True;def TEST_CASE_1=True;",svadu_sv39)
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);check ISA:=regex(.*Svhad.*);def rvtest_mtrap_routine=True;def TEST_CASE_1=True;",svhad_sv39)

RVTEST_SIGBASE(x1, signature_x1_0)

# Setup PMP to cover 4G of address space
SETUP_PMP_SVADU_TEST(x1, offset, t0, t1, t2)
SETUP_PMP_SVHAD_TEST(x1, offset, t0, t1, t2)

# Idenity map the page_4k
la t1, page_4k
Expand All @@ -34,8 +34,8 @@ RVTEST_CODE_BEGIN
# enable virtual memory in Sv39 mode
SATP_SETUP(t0, t1, ((SATP_MODE & ~(SATP_MODE<<1)) * SATP_MODE_SV39))

# test svadu
TEST_SVADU(x1, s2, page_4k, offset, 0x30a, MENVCFG_HADE)
# test svhad
TEST_SVHAD(x1, s2, page_4k, offset, 0x30a, MENVCFG_HADE)
RVMODEL_HALT
#endif
RVTEST_CODE_END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: BSD-3-Clause
// -----------
//
// This assembly file tests the Svadu extension
// This assembly file tests the Svhad extension
//
#include "model_test.h"
#include "arch_test.h"
Expand All @@ -19,12 +19,12 @@ RVMODEL_BOOT
RVTEST_CODE_BEGIN

#ifdef TEST_CASE_1
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);check ISA:=regex(.*Svadu.*);def rvtest_mtrap_routine=True;def TEST_CASE_1=True;",svadu_sv48)
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);check ISA:=regex(.*Svhad.*);def rvtest_mtrap_routine=True;def TEST_CASE_1=True;",svhad_sv48)

RVTEST_SIGBASE(x1, signature_x1_0)

# Setup PMP to cover 4G of address space
SETUP_PMP_SVADU_TEST(x1, offset, t0, t1, t2)
SETUP_PMP_SVHAD_TEST(x1, offset, t0, t1, t2)

# Identity map the page_4k
la t1, page_4k
Expand All @@ -34,8 +34,8 @@ RVTEST_CODE_BEGIN
# enable virtual memory in Sv48 mode
SATP_SETUP(t0, t1, ((SATP_MODE & ~(SATP_MODE<<1)) * SATP_MODE_SV48))

# test svadu
TEST_SVADU(x1, s2, page_4k, offset, 0x30a, MENVCFG_HADE)
# test svhad
TEST_SVHAD(x1, s2, page_4k, offset, 0x30a, MENVCFG_HADE)
RVMODEL_HALT
#endif
RVTEST_CODE_END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: BSD-3-Clause
// -----------
//
// This assembly file tests the Svadu extension
// This assembly file tests the Svhad extension
//
#include "model_test.h"
#include "arch_test.h"
Expand All @@ -19,12 +19,12 @@ RVMODEL_BOOT
RVTEST_CODE_BEGIN

#ifdef TEST_CASE_1
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);check ISA:=regex(.*Svadu.*);def rvtest_mtrap_routine=True;def TEST_CASE_1=True;",svadu_sv57)
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);check ISA:=regex(.*Svhad.*);def rvtest_mtrap_routine=True;def TEST_CASE_1=True;",svhad_sv57)

RVTEST_SIGBASE(x1, signature_x1_0)

# Setup PMP to cover 4G of address space
SETUP_PMP_SVADU_TEST(x1, offset, t0, t1, t2)
SETUP_PMP_SVHAD_TEST(x1, offset, t0, t1, t2)

# Identity map the page_4k
la t1, page_4k
Expand All @@ -34,8 +34,8 @@ RVTEST_CODE_BEGIN
# enable virtual memory in Sv57 mode
SATP_SETUP(t0, t1, ((SATP_MODE & ~(SATP_MODE<<1)) * SATP_MODE_SV57))

# test svadu
TEST_SVADU(x1, s2, page_4k, offset, 0x30a, MENVCFG_HADE)
# test svhad
TEST_SVHAD(x1, s2, page_4k, offset, 0x30a, MENVCFG_HADE)
RVMODEL_HALT
#endif
RVTEST_CODE_END
Expand Down

0 comments on commit 7995094

Please sign in to comment.