summaryrefslogtreecommitdiff
path: root/src/arch/x86/vtophys.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/vtophys.cc')
-rw-r--r--src/arch/x86/vtophys.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/arch/x86/vtophys.cc b/src/arch/x86/vtophys.cc
index e4abfca59..9fd9cc78d 100644
--- a/src/arch/x86/vtophys.cc
+++ b/src/arch/x86/vtophys.cc
@@ -61,12 +61,13 @@ namespace X86ISA
vtophys(ThreadContext *tc, Addr vaddr)
{
Walker *walker = tc->getDTBPtr()->getWalker();
- Addr size;
+ unsigned logBytes;
Addr addr = vaddr;
- Fault fault = walker->startFunctional(tc, addr, size, BaseTLB::Read);
+ Fault fault = walker->startFunctional(
+ tc, addr, logBytes, BaseTLB::Read);
if (fault != NoFault)
panic("vtophys page walk returned fault\n");
- Addr masked_addr = vaddr & (size - 1);
+ Addr masked_addr = vaddr & mask(logBytes);
Addr paddr = addr | masked_addr;
DPRINTF(VtoPhys, "vtophys(%#x) -> %#x\n", vaddr, paddr);
return paddr;