Merge changes.
[gem5.git] / dev / pciconfigall.hh
index 7356e7279b1af60af030f3e73d7f22ff410579e5..9cf2cf9722652f2e63f1163e768b0c0bbdba0bb7 100644 (file)
 #ifndef __PCICONFIGALL_HH__
 #define __PCICONFIGALL_HH__
 
-#include "mem/functional_mem/functional_memory.hh"
 #include "dev/pcireg.h"
+#include "base/range.hh"
+#include "dev/io_device.hh"
+
 
 static const uint32_t MAX_PCI_DEV = 32;
 static const uint32_t MAX_PCI_FUNC = 8;
@@ -49,7 +51,7 @@ class PciDev;
  * space and passes the requests on to TsunamiPCIDev devices as
  * appropriate.
  */
-class PciConfigAll : public FunctionalMemory
+class PciConfigAll : public PioDevice
 {
   private:
     Addr addr;
@@ -67,8 +69,11 @@ class PciConfigAll : public FunctionalMemory
      * @param name name of the object
      * @param a base address of the write
      * @param mmu the memory controller
+     * @param hier object to store parameters universal the device hierarchy
+     * @param bus The bus that this device is attached to
      */
-    PciConfigAll(const std::string &name, Addr a, MemoryController *mmu);
+    PciConfigAll(const std::string &name, Addr a, MemoryController *mmu,
+                 HierParams *hier, Bus *bus, Tick pio_latency);
 
 
     /**
@@ -110,6 +115,12 @@ class PciConfigAll : public FunctionalMemory
 
     virtual Fault write(MemReqPtr &req, const uint8_t *data);
 
+    /**
+     * Start up function to check if more than one person is using an interrupt line
+     * and print a warning if such a case exists
+     */
+    virtual void startup();
+
     /**
      * Serialize this object to the given output stream.
      * @param os The stream to serialize to.
@@ -123,6 +134,13 @@ class PciConfigAll : public FunctionalMemory
      */
     virtual void unserialize(Checkpoint *cp, const std::string &section);
 
+    /**
+     * Return how long this access will take.
+     * @param req the memory request to calcuate
+     * @return Tick when the request is done
+     */
+    Tick cacheAccess(MemReqPtr &req);
+
 };
 
 #endif // __PCICONFIGALL_HH__