cleansup htif call
This commit is contained in:
parent
cfc980a069
commit
e238369e18
@ -40,14 +40,8 @@ private:
|
||||
std::copy(data, data + length, p.data() + (addr & mem.page_addr_mask));
|
||||
// this->tohost handling in case of riscv-test
|
||||
// according to https://github.com/riscv-software-src/riscv-isa-sim/issues/364#issuecomment-607657754:
|
||||
if(access && iss::access_type::FUNC) {
|
||||
if(addr == hart_if.tohost) {
|
||||
return hart_if.exec_htif(data);
|
||||
}
|
||||
if((WORD_LEN == 32 && addr == hart_if.fromhost + 4) || (WORD_LEN == 64 && addr == hart_if.fromhost)) {
|
||||
uint64_t fhostvar = *reinterpret_cast<uint64_t*>(p.data() + (hart_if.fromhost & mem.page_addr_mask));
|
||||
*reinterpret_cast<uint64_t*>(p.data() + (hart_if.tohost & mem.page_addr_mask)) = fhostvar;
|
||||
}
|
||||
if(access && iss::access_type::FUNC && addr == hart_if.tohost) {
|
||||
return hart_if.exec_htif(data);
|
||||
}
|
||||
return iss::Ok;
|
||||
}
|
||||
@ -59,4 +53,4 @@ protected:
|
||||
};
|
||||
} // namespace mmio
|
||||
} // namespace iss
|
||||
#endif // _MEMORY_WITH_HTIF_
|
||||
#endif // _MEMORY_WITH_HTIF_
|
||||
|
Loading…
x
Reference in New Issue
Block a user