diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2004-11-22 22:32:50 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2004-11-22 22:32:50 -0500 |
commit | 409f7812b25fe7be9beea066f21a929da2bc83c8 (patch) | |
tree | 4a4f70d6a987c3cd0cc3f6f45ff1a9188d9f598e /dev/pciconfigall.cc | |
parent | eefd60f17534c1adfc598d7fd91afd95c0b4400f (diff) | |
parent | 244ce7fb29cbd7107a5dc0fb640a6154a091ec6e (diff) | |
download | gem5-409f7812b25fe7be9beea066f21a929da2bc83c8.tar.xz |
Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5
--HG--
extra : convert_revision : dac88be32ea326e8966d68925bc49c7bea90a01b
Diffstat (limited to 'dev/pciconfigall.cc')
-rw-r--r-- | dev/pciconfigall.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dev/pciconfigall.cc b/dev/pciconfigall.cc index d5302d9ad..609763e92 100644 --- a/dev/pciconfigall.cc +++ b/dev/pciconfigall.cc @@ -33,10 +33,12 @@ #include <deque> #include <string> #include <vector> +#include <bitset> #include "base/trace.hh" #include "dev/pciconfigall.hh" #include "dev/pcidev.hh" +#include "dev/pcireg.h" #include "mem/bus/bus.hh" #include "mem/bus/pio_interface.hh" #include "mem/bus/pio_interface_impl.hh" @@ -65,6 +67,33 @@ PciConfigAll::PciConfigAll(const string &name, Addr a, MemoryController *mmu, devices[x][y] = NULL; } +// If two interrupts share the same line largely bad things will happen. +// Since we don't track how many times an interrupt was set and correspondingly +// cleared two devices on the same interrupt line and assert and deassert each +// others interrupt "line". Interrupts will not work correctly. +void +PciConfigAll::startup() +{ + bitset<256> intLines; + PciDev *tempDev; + uint8_t intline; + + for (int x = 0; x < MAX_PCI_DEV; x++) { + for (int y = 0; y < MAX_PCI_FUNC; y++) { + if (devices[x][y] != NULL) { + tempDev = devices[x][y]; + intline = tempDev->interruptLine(); + if (intLines.test(intline)) + warn("Interrupt line %#X is used multiple times" + "(You probably want to fix this).\n", (uint32_t)intline); + else + intLines.set(intline); + } // devices != NULL + } // PCI_FUNC + } // PCI_DEV + +} + Fault PciConfigAll::read(MemReqPtr &req, uint8_t *data) { |