Make bus address conflict error more informative
authorSteve Reinhardt <stever@gmail.com>
Sat, 21 Jun 2008 05:06:27 +0000 (01:06 -0400)
committerSteve Reinhardt <stever@gmail.com>
Sat, 21 Jun 2008 05:06:27 +0000 (01:06 -0400)
src/mem/bus.cc

index 9dd3353fda9340570e711ca59b5acbf6bc7e081e..4468262ac41ef92c7117c10dbdb2d0bf8d0df011 100644 (file)
@@ -524,9 +524,12 @@ Bus::recvStatusChange(Port::Status status, int id)
         for (iter = ranges.begin(); iter != ranges.end(); iter++) {
             DPRINTF(BusAddrRanges, "Adding range %#llx - %#llx for id %d\n",
                     iter->start, iter->end, id);
-            if (portMap.insert(*iter, id) == portMap.end())
-                panic("Two devices with same range\n");
-
+            if (portMap.insert(*iter, id) == portMap.end()) {
+                int conflict_id = portMap.find(*iter)->second;
+                fatal("%s has two ports with same range:\n\t%s\n\t%s\n",
+                      name(), interfaces[id]->getPeer()->name(),
+                      interfaces[conflict_id]->getPeer()->name());
+            }
         }
     }
     DPRINTF(MMU, "port list has %d entries\n", portMap.size());