vtophys.cc (7694:de057cccee82) | vtophys.cc (8706:b1838faf3bcc) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 37 unchanged lines hidden (view full) --- 46#include <string> 47 48#include "arch/arm/table_walker.hh" 49#include "arch/arm/tlb.hh" 50#include "arch/arm/vtophys.hh" 51#include "base/chunk_generator.hh" 52#include "base/trace.hh" 53#include "cpu/thread_context.hh" | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 37 unchanged lines hidden (view full) --- 46#include <string> 47 48#include "arch/arm/table_walker.hh" 49#include "arch/arm/tlb.hh" 50#include "arch/arm/vtophys.hh" 51#include "base/chunk_generator.hh" 52#include "base/trace.hh" 53#include "cpu/thread_context.hh" |
54#include "mem/vport.hh" | 54#include "mem/fs_translating_port_proxy.hh" |
55 56using namespace std; 57using namespace ArmISA; 58 59Addr 60ArmISA::vtophys(Addr vaddr) 61{ 62 fatal("VTOPHYS: Can't convert vaddr to paddr on ARM without a thread context"); --- 33 unchanged lines hidden (view full) --- 96 Addr ttbr; 97 if (N == 0 || !mbits(addr, 31, 32-N)) { 98 ttbr = tc->readMiscReg(MISCREG_TTBR0); 99 } else { 100 ttbr = tc->readMiscReg(MISCREG_TTBR1); 101 N = 0; 102 } 103 | 55 56using namespace std; 57using namespace ArmISA; 58 59Addr 60ArmISA::vtophys(Addr vaddr) 61{ 62 fatal("VTOPHYS: Can't convert vaddr to paddr on ARM without a thread context"); --- 33 unchanged lines hidden (view full) --- 96 Addr ttbr; 97 if (N == 0 || !mbits(addr, 31, 32-N)) { 98 ttbr = tc->readMiscReg(MISCREG_TTBR0); 99 } else { 100 ttbr = tc->readMiscReg(MISCREG_TTBR1); 101 N = 0; 102 } 103 |
104 FunctionalPort *port = tc->getPhysPort(); | 104 PortProxy* port = tc->getPhysProxy(); |
105 Addr l1desc_addr = mbits(ttbr, 31, 14-N) | (bits(addr,31-N,20) << 2); 106 107 TableWalker::L1Descriptor l1desc; 108 l1desc.data = port->read<uint32_t>(l1desc_addr); 109 if (l1desc.type() == TableWalker::L1Descriptor::Ignore || 110 l1desc.type() == TableWalker::L1Descriptor::Reserved) { 111 warn("Unable to translate virtual address: %#x\n", addr); 112 return -1; --- 26 unchanged lines hidden --- | 105 Addr l1desc_addr = mbits(ttbr, 31, 14-N) | (bits(addr,31-N,20) << 2); 106 107 TableWalker::L1Descriptor l1desc; 108 l1desc.data = port->read<uint32_t>(l1desc_addr); 109 if (l1desc.type() == TableWalker::L1Descriptor::Ignore || 110 l1desc.type() == TableWalker::L1Descriptor::Reserved) { 111 warn("Unable to translate virtual address: %#x\n", addr); 112 return -1; --- 26 unchanged lines hidden --- |