From 4b32c9fb4d9d1b1507a4f0683b131d70918831ce Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Thu, 1 Mar 2012 11:37:03 -0600 Subject: [PATCH] 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 --- src/arch/x86/pagetable_walker.hh | 2 +- src/arch/x86/tlb.cc | 6 ++++++ src/arch/x86/tlb.hh | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/arch/x86/pagetable_walker.hh b/src/arch/x86/pagetable_walker.hh index d433c7b98..90f075280 100644 --- a/src/arch/x86/pagetable_walker.hh +++ b/src/arch/x86/pagetable_walker.hh @@ -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. diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc index ff65eb04c..456f03208 100644 --- a/src/arch/x86/tlb.cc +++ b/src/arch/x86/tlb.cc @@ -421,6 +421,12 @@ TLB::unserialize(Checkpoint *cp, const std::string §ion) { } +Port * +TLB::getPort() +{ + return walker->getPort("port"); +} + } // namespace X86ISA X86ISA::TLB * diff --git a/src/arch/x86/tlb.hh b/src/arch/x86/tlb.hh index 449ca19ce..a943683af 100644 --- a/src/arch/x86/tlb.hh +++ b/src/arch/x86/tlb.hh @@ -120,6 +120,8 @@ namespace X86ISA // Checkpointing virtual void serialize(std::ostream &os); virtual void unserialize(Checkpoint *cp, const std::string §ion); + + virtual Port * getPort(); }; } -- 2.30.2