TLB(const Params *p);
virtual ~TLB();
+ void takeOverFrom(BaseTLB *otlb) {}
+
virtual void regStats();
int getsize() const { return size; }
miscRegValid = false;
}
+void
+TLB::takeOverFrom(BaseTLB *_otlb)
+{
+ TLB *otlb = dynamic_cast<TLB*>(_otlb);
+ /* Make sure we actually have a valid type */
+ if (otlb) {
+ _attr = otlb->_attr;
+ haveLPAE = otlb->haveLPAE;
+ directToStage2 = otlb->directToStage2;
+ stage2Req = otlb->stage2Req;
+ bootUncacheability = otlb->bootUncacheability;
+
+ /* Sync the stage2 MMU if they exist in both
+ * the old CPU and the new
+ */
+ if (!isStage2 &&
+ stage2Tlb && otlb->stage2Tlb) {
+ stage2Tlb->takeOverFrom(otlb->stage2Tlb);
+ }
+ } else {
+ panic("Incompatible TLB type!");
+ }
+}
+
void
TLB::serialize(ostream &os)
{
virtual ~TLB();
+ void takeOverFrom(BaseTLB *otlb);
+
/// setup all the back pointers
virtual void init();
int probeEntry(Addr vpn,uint8_t) const;
MipsISA::PTE *getEntry(unsigned) const;
virtual ~TLB();
+
+ void takeOverFrom(BaseTLB *otlb) {}
+
int smallPages;
int getsize() const { return size; }
TLB(const Params *p);
virtual ~TLB();
+ void takeOverFrom(BaseTLB *otlb) {}
+
int probeEntry(Addr vpn,uint8_t) const;
PowerISA::PTE *getEntry(unsigned) const;
typedef SparcTLBParams Params;
TLB(const Params *p);
+ void takeOverFrom(BaseTLB *otlb) {}
+
void
demapPage(Addr vaddr, uint64_t asn)
{
typedef X86TLBParams Params;
TLB(const Params *p);
+ void takeOverFrom(BaseTLB *otlb) {}
+
TlbEntry *lookup(Addr va, bool update_lru = true);
void setConfigAddress(uint32_t addr);
old_dtb_port->unbind();
new_dtb_port->bind(slavePort);
}
+ newTC->getITBPtr()->takeOverFrom(oldTC->getITBPtr());
+ newTC->getDTBPtr()->takeOverFrom(oldTC->getDTBPtr());
// Checker whether or not we have to transfer CheckerCPU
// objects over in the switch
BaseMasterPort *new_checker_dtb_port =
newChecker->getDTBPtr()->getMasterPort();
+ newChecker->getITBPtr()->takeOverFrom(oldChecker->getITBPtr());
+ newChecker->getDTBPtr()->takeOverFrom(oldChecker->getDTBPtr());
+
// Move over any table walker ports if they exist for checker
if (new_checker_itb_port) {
assert(!new_checker_itb_port->isConnected());
*/
virtual void flushAll() = 0;
+ /**
+ * Take over from an old tlb context
+ */
+ virtual void takeOverFrom(BaseTLB *otlb) = 0;
+
/**
* Get the table walker master port if present. This is used for
* migrating port connections during a CPU takeOverFrom()