misc: Remove FullSystem check for networking components

Ethernet devices are currently only hooked up if running in FS mode.  Much of
the Ethernet networking code is generic and can be used to build non-Ethernet
device models.  Some of these device models do not require a complex driver
stack and can be built to use an EmulatedDriver in SE mode. This patch enables
etherent interfaces to properly connect regardless of whether the simulation
is in FS or SE mode.
This commit is contained in:
Michael LeBeane 2016-09-13 23:06:32 -04:00
parent 4c903d0412
commit cc58148fe1

View file

@ -77,25 +77,23 @@ connectPorts(SimObject *o1, const std::string &name1, int i1,
SimObject *o2, const std::string &name2, int i2) SimObject *o2, const std::string &name2, int i2)
{ {
#if THE_ISA != NULL_ISA #if THE_ISA != NULL_ISA
if (FullSystem) { EtherObject *eo1, *eo2;
EtherObject *eo1, *eo2; EtherDevice *ed1, *ed2;
EtherDevice *ed1, *ed2; eo1 = dynamic_cast<EtherObject*>(o1);
eo1 = dynamic_cast<EtherObject*>(o1); ed1 = dynamic_cast<EtherDevice*>(o1);
ed1 = dynamic_cast<EtherDevice*>(o1); eo2 = dynamic_cast<EtherObject*>(o2);
eo2 = dynamic_cast<EtherObject*>(o2); ed2 = dynamic_cast<EtherDevice*>(o2);
ed2 = dynamic_cast<EtherDevice*>(o2);
if ((eo1 || ed1) && (eo2 || ed2)) { if ((eo1 || ed1) && (eo2 || ed2)) {
EtherInt *p1 = lookupEthPort(o1, name1, i1); EtherInt *p1 = lookupEthPort(o1, name1, i1);
EtherInt *p2 = lookupEthPort(o2, name2, i2); EtherInt *p2 = lookupEthPort(o2, name2, i2);
if (p1 != NULL && p2 != NULL) { if (p1 != NULL && p2 != NULL) {
p1->setPeer(p2); p1->setPeer(p2);
p2->setPeer(p1); p2->setPeer(p1);
return 1; return 1;
}
} }
} }
#endif #endif