Skip to content

Commit

Permalink
temporarily disable translation; update emode encoding
Browse files Browse the repository at this point in the history
Change-Id: If22d22c50f509d319a8a132d3cedc8ceca2ff91b
  • Loading branch information
hakase56557 committed Sep 25, 2023
1 parent 93e7865 commit 516f2ab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/arch/riscvcapstone/mmu.hh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class MMU : public BaseMMU

void translateTiming(const RequestPtr& req, ThreadContext* tc,
Translation* translation, Mode mode) override {
if(tc->cwrld() == 1) {
//if(tc->cwrld() == 1) {
if(1) {
DPRINTF(CapstoneMem, "translate %llx\n", req->getVaddr());
req->setPaddr(req->getVaddr()); // simply pass through
translation->finish(NoFault, req, tc, mode);
Expand Down
2 changes: 1 addition & 1 deletion src/arch/riscvcapstone/o3/cpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ CPU::startup()
ctrv.getRegVal().rawCapVal() = (uint128_t)*cap;
isa[tid]->setTaggedMiscReg(1, ctrv); //capmiscreg_cinit

cwrld[tid] = 1;
cwrld[tid] = 0;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/arch/riscvcapstone/pmp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ PMP::shouldCheckPMP(RiscvcapstoneISA::PrivilegeMode pmode,

bool secure_world = tc->cwrld();

return ((cond1 || cond2 || cond3) && !secure_world);
return ((cond1 || cond2 || cond3) && /*!secure_world*/ 0);
}

AddrRange
Expand Down
2 changes: 1 addition & 1 deletion src/arch/riscvcapstone/regs/misc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ enum CSRIndex
//Capstone CSRs
CSR_TVAL = 0x801, //exception data
CSR_CAUSE = 0x802, //exception cause
CSR_EMODE = 0x804 //encoding mode
CSR_EMODE = 0x803 //encoding mode
};

//Capability CSRs
Expand Down

0 comments on commit 516f2ab

Please sign in to comment.