summaryrefslogtreecommitdiff
path: root/src/dev/platform.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-07-06 14:41:09 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-07-06 14:41:09 -0400
commit4b741100714c6f20749f344ddd4b16459f28df72 (patch)
tree613d4bf11ced3c8df4b5bb2e9a68a3df04b11333 /src/dev/platform.cc
parente60f998e2993df35460c8835016b3043a13da80a (diff)
parent93839380e7dc4799d234843d10329c03d38487fa (diff)
downloadgem5-4b741100714c6f20749f344ddd4b16459f28df72.tar.xz
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem --HG-- extra : convert_revision : 4669e87d29fa3e0ca9009f6b9dce72113220d7bc
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)