diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-07-06 14:54:09 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-07-06 14:54:09 -0400 |
commit | c8a37ce71514de9362640e8cb18c1744f0e2f83b (patch) | |
tree | 70eb71e46428c20bd6a44eed1d08a019abb70e25 /src/dev/platform.cc | |
parent | 05eef5ee1569f7a1c399a2b358a11323e88a48f8 (diff) | |
parent | 4b741100714c6f20749f344ddd4b16459f28df72 (diff) | |
download | gem5-c8a37ce71514de9362640e8cb18c1744f0e2f83b.tar.xz |
Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-merge
--HG--
extra : convert_revision : 0c4fbbe0826358a6a58f844bec34ce830ffd4ced
Diffstat (limited to 'src/dev/platform.cc')
-rw-r--r-- | src/dev/platform.cc | 16 |
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) |