Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some configs about ci test of H extension #139

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions configs/riscv64-rvh-diff-spike_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CONFIG_ISA_riscv64=y
CONFIG_CLINT_MMIO=0x38000000
# CONFIG_RVV is not set
CONFIG_RVH=y
CONFIG_DIFFTEST=y
CONFIG_DIFFTEST_REF_SPIKE=y
CONFIG_MSIZE=0x200000000
CONFIG_PC_RESET_OFFSET=0x0
# CONFIG_HAS_SERIAL is not set
CONFIG_HAS_UARTLITE=y
CONFIG_HAS_PLIC=y
CONFIG_UARTLITE_MMIO=0x40600000
CONFIG_UARTLITE_ASSERT_FOUR=y
CONFIG_FB_ADDR=0x50000000
CONFIG_VGA_CTL_MMIO=0x40001000
# CONFIG_HAS_AUDIO is not set
# CONFIG_HAS_DISK is not set
CONFIG_SDCARD_CTL_MMIO=0x40002000
CONFIG_FPU_SOFT=y
CONFIG_AC_SOFT=y
# CONFIG_DISABLE_INSTR_CNT is not set
16 changes: 16 additions & 0 deletions configs/riscv64-rvh-ref_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CONFIG_ISA_riscv64=y
CONFIG_CLINT_MMIO=0x38000000
# CONFIG_RVV is not set
CONFIG_RVH=y
CONFIG_USE_XS_ARCH_CSRS=y
CONFIG_MSIZE=0x200000000
CONFIG_RESET_FROM_MMIO=y
CONFIG_PC_RESET_OFFSET=0x0
# CONFIG_MEM_RANDOM is not set
CONFIG_HAS_FLASH=y
CONFIG_FLASH_SIZE=0x100000
CONFIG_FPU_SOFT=y
CONFIG_AC_SOFT=y
CONFIG_SHARE=y
CONFIG_LARGE_COPY=y
# CONFIG_REPORT_ILLEGAL_INSTR is not set
1 change: 0 additions & 1 deletion configs/riscv64-rvh_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
CONFIG_ISA_riscv64=y
CONFIG_CLINT_MMIO=0x38000000
# CONFIG_RVV is not set
# CONFIG_RV_DEBUG is not set
CONFIG_RVH=y
CONFIG_MSIZE=0x200000000
CONFIG_PC_RESET_OFFSET=0x0
Expand Down
5 changes: 3 additions & 2 deletions src/isa/riscv64/system/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,15 @@ void raise_guest_excep(paddr_t gpaddr, vaddr_t vaddr, int type){
}
longjmp_exception(EX_IGPF);
}else if (type == MEM_TYPE_READ){
if(intr_deleg_S(EX_LGPF)){
int ex = cpu.amo ? EX_SGPF : EX_LGPF;
if(intr_deleg_S(ex)){
stval->val = vaddr;
htval->val = gpaddr >> 2;
}else{
mtval->val = vaddr;
mtval2->val = gpaddr >> 2;
}
longjmp_exception(EX_LGPF);
longjmp_exception(ex);
}else{
if(intr_deleg_S(EX_SGPF)){
stval->val = vaddr;
Expand Down
Loading