diff options
Diffstat (limited to 'mem/page_table.cc')
-rw-r--r-- | mem/page_table.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mem/page_table.cc b/mem/page_table.cc index 714ddde35..c4e1ea193 100644 --- a/mem/page_table.cc +++ b/mem/page_table.cc @@ -121,11 +121,14 @@ PageTable::translate(Addr vaddr, Addr &paddr) Fault -PageTable::translate(CpuRequestPtr &req) +PageTable::translate(RequestPtr &req) { - assert(pageAlign(req->vaddr + req->size - 1) == pageAlign(req->vaddr)); - if (!translate(req->vaddr, req->paddr)) { + Addr paddr; + assert(pageAlign(req->getVaddr() + req->getSize() - 1) + == pageAlign(req->getVaddr())); + if (!translate(req->getVaddr(), paddr)) { return genMachineCheckFault(); } - return page_check(req->paddr, req->size); + req->setPaddr(paddr); + return page_check(req->getPaddr(), req->getSize()); } |