{
if (if_name == "port") {
if (port != NULL)
- fatal("%s: port already connected to %s",
- name(), port->getPeer()->name());
+ return port;
System *sys = params()->sys;
Tick minb = params()->min_backoff;
Tick maxb = params()->max_backoff;
void regStats();
+ // Get the port from the table walker and return it
+ virtual Port *getPort();
+
// Caching misc register values here.
// Writing to misc registers needs to invalidate them.
// translateFunctional/translateSe/translateFs checks if they are
#include <string>
#include <sstream>
+#include "arch/tlb.hh"
#include "base/cprintf.hh"
#include "base/loader/symtab.hh"
#include "base/misc.hh"
if (DTRACE(Context))
ThreadContext::compare(oldTC, newTC);
*/
+
+ Port *old_itb_port, *old_dtb_port, *new_itb_port, *new_dtb_port;
+ old_itb_port = oldTC->getITBPtr()->getPort();
+ old_dtb_port = oldTC->getDTBPtr()->getPort();
+ new_itb_port = newTC->getITBPtr()->getPort();
+ new_dtb_port = newTC->getDTBPtr()->getPort();
+
+ // Move over any table walker ports if they exist
+ if (new_itb_port && !new_itb_port->isConnected()) {
+ assert(old_itb_port);
+ Port *peer = old_itb_port->getPeer();;
+ new_itb_port->setPeer(peer);
+ peer->setPeer(new_itb_port);
+ }
+ if (new_dtb_port && !new_dtb_port->isConnected()) {
+ assert(old_dtb_port);
+ Port *peer = old_dtb_port->getPeer();;
+ new_dtb_port->setPeer(peer);
+ peer->setPeer(new_dtb_port);
+ }
}
#if FULL_SYSTEM
class ThreadContext;
class Packet;
+class Port;
class BaseTLB : public SimObject
{
public:
virtual void demapPage(Addr vaddr, uint64_t asn) = 0;
+ /** Get any port that the TLB or hardware table walker needs.
+ * This is used for migrating port connections during a takeOverFrom()
+ * call. */
+ virtual Port* getPort() { return NULL; }
+
class Translation
{
public: