summaryrefslogtreecommitdiff
path: root/src/dev/platform.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-07-19 17:59:04 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-07-19 17:59:04 -0400
commit15e5ce96c76a20b9b27e5f7d7ed29e962422ad1a (patch)
tree610a888b2de5d25c166f65819d8ad3058d13723c /src/dev/platform.cc
parentb36796914af8bfc6729cc8a519e57572460e43e8 (diff)
parent6175f712b3216f3e5387b07d9c41c1931c09acd9 (diff)
downloadgem5-15e5ce96c76a20b9b27e5f7d7ed29e962422ad1a.tar.xz
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem.head --HG-- extra : convert_revision : 8c747208d72ffbb0160a2ad4a75383420debdf83
Diffstat (limited to 'src/dev/platform.cc')
-rw-r--r--src/dev/platform.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/dev/platform.cc b/src/dev/platform.cc
index ed021e3b6..8546b7805 100644
--- a/src/dev/platform.cc
+++ b/src/dev/platform.cc
@@ -63,5 +63,21 @@ Platform::pciToDma(Addr pciAddr) const
panic("No PCI dma support in platform.");
}
+void
+Platform::registerPciDevice(uint8_t bus, uint8_t dev, uint8_t func, uint8_t intr)
+{
+ uint32_t bdf = bus << 16 | dev << 8 | func << 0;
+ if (pciDevices.find(bdf) != pciDevices.end())
+ fatal("Two PCI devices have same bus:device:function\n");
+
+ if (intLines.test(intr))
+ fatal("Two PCI devices have same interrupt line: %d\n", intr);
+
+ pciDevices.insert(bdf);
+
+ intLines.set(intr);
+}
+
+
DEFINE_SIM_OBJECT_CLASS_NAME("Platform", Platform)