Skip to content
Merged
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
5 changes: 3 additions & 2 deletions target/riscv/ibex_csr.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ static RISCVException write_mtvec(CPURISCVState *env, int csrno,
"CSR_MTVEC: reserved mode not supported 0x" TARGET_FMT_lx
"\n",
val);
/* WARL */
return RISCV_EXCP_NONE;
/* WARL, Ibex will tie any invalid mode writes to 0b01 (vectored) */
val &= ~3u;
val |= 1u;
}

/* bits [7:2] are always 0, address should be aligned in 256 bytes */
Expand Down
2 changes: 2 additions & 0 deletions tests/opentitan/data/earlgrey-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,8 @@ pass: //third_party/riscv-compliance:I-CSRRWI-01_sim_qemu_rom_with_fake_keys
pass: //third_party/riscv-compliance:I-CSRRWI-01_sim_qemu_sival_rom_ext
pass: //third_party/riscv-compliance:I-DELAY_SLOTS-01_sim_qemu_rom_with_fake_keys
pass: //third_party/riscv-compliance:I-DELAY_SLOTS-01_sim_qemu_sival_rom_ext
pass: //third_party/riscv-compliance:I-ECALL-01_sim_qemu_rom_with_fake_keys
pass: //third_party/riscv-compliance:I-ECALL-01_sim_qemu_sival_rom_ext
pass: //third_party/riscv-compliance:I-ENDIANESS-01_sim_qemu_rom_with_fake_keys
pass: //third_party/riscv-compliance:I-ENDIANESS-01_sim_qemu_sival_rom_ext
pass: //third_party/riscv-compliance:I-IO-01_sim_qemu_rom_with_fake_keys
Expand Down
Loading