x86: Fix x86 TLB and Walker

This patch adds a function to X86 tlb that returns the
walker port. This port is required for correctly connecting
the walker ports for the cpu just switched in
This commit is contained in:
Nilay Vaish
2012-03-01 11:37:03 -06:00
parent c80af04d7d
commit 4b32c9fb4d
3 changed files with 9 additions and 1 deletions

View File

@@ -80,7 +80,6 @@ namespace X86ISA
friend class WalkerPort;
WalkerPort port;
Port *getPort(const std::string &if_name, int idx = -1);
// State to track each walk of the page table
class WalkerState : public FastAlloc
@@ -167,6 +166,7 @@ namespace X86ISA
RequestPtr req, BaseTLB::Mode mode);
Fault startFunctional(ThreadContext * _tc, Addr &addr,
Addr &pageSize, BaseTLB::Mode mode);
Port *getPort(const std::string &if_name, int idx = -1);
protected:
// The TLB we're supposed to load.

View File

@@ -421,6 +421,12 @@ TLB::unserialize(Checkpoint *cp, const std::string &section)
{
}
Port *
TLB::getPort()
{
return walker->getPort("port");
}
} // namespace X86ISA
X86ISA::TLB *

View File

@@ -120,6 +120,8 @@ namespace X86ISA
// Checkpointing
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string &section);
virtual Port * getPort();
};
}