changes to make interrupts part of the platform rather than tsunami
authorAli Saidi <saidi@eecs.umich.edu>
Mon, 25 Oct 2004 22:14:13 +0000 (18:14 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Mon, 25 Oct 2004 22:14:13 +0000 (18:14 -0400)
specific

--HG--
extra : convert_revision : f51788dd41c23f13b253268bb2b286a5225ef087

dev/ide_ctrl.cc
dev/ide_disk.cc
dev/ns_gige.cc
dev/platform.hh
dev/tsunami.cc
dev/tsunami.hh

index e40248461bd8d8fdf8bd23a6c742733e55ab4763..ec881ed1511eca60179acadb62947cf6ad655c01 100644 (file)
@@ -245,13 +245,13 @@ IdeController::setDmaComplete(IdeDisk *disk)
 void
 IdeController::intrPost()
 {
-    tsunami->cchip->postDRIR(configData->config.hdr.pci0.interruptLine);
+    tsunami->postPciInt(configData->config.hdr.pci0.interruptLine);
 }
 
 void
 IdeController::intrClear()
 {
-    tsunami->cchip->clearDRIR(configData->config.hdr.pci0.interruptLine);
+    tsunami->clearPciInt(configData->config.hdr.pci0.interruptLine);
 }
 
 ////
index 99724f07788c1c5f7b5cde237ccf465274da6319..f4e7c1ef1ef0c651c09f8ff1c5c77fc93af9bd5a 100644 (file)
@@ -732,6 +732,7 @@ IdeDisk::startCommand()
 void
 IdeDisk::intrPost()
 {
+    DPRINTF(IdeDisk, "IDE Disk Posting Interrupt\n");
     if (intrPending)
         panic("Attempt to post an interrupt with one pending\n");
 
@@ -745,6 +746,7 @@ IdeDisk::intrPost()
 void
 IdeDisk::intrClear()
 {
+    DPRINTF(IdeDisk, "IDE Disk Clearing Interrupt\n");
     if (!intrPending)
         panic("Attempt to clear a non-pending interrupt\n");
 
index 9238a7c7eb9443a8599cb15c368d45dabaca0a83..7260ecde49698ba32c2f0feb14987034ffc04bcf 100644 (file)
@@ -1038,7 +1038,7 @@ NSGigE::cpuInterrupt()
         cpuPendingIntr = true;
 
         DPRINTF(EthernetIntr, "posting cchip interrupt\n");
-        tsunami->cchip->postDRIR(configData->config.hdr.pci0.interruptLine);
+        tsunami->postPciInt(configData->config.hdr.pci0.interruptLine);
     }
 }
 
@@ -1058,7 +1058,7 @@ NSGigE::cpuIntrClear()
     cpuPendingIntr = false;
 
     DPRINTF(EthernetIntr, "clearing cchip interrupt\n");
-    tsunami->cchip->clearDRIR(configData->config.hdr.pci0.interruptLine);
+    tsunami->clearPciInt(configData->config.hdr.pci0.interruptLine);
 }
 
 bool
index 7920480bc58c54decd8acde299ac592096f78a1b..0c90e06bac6bf019f2260bce42c7b06271535926 100644 (file)
@@ -65,6 +65,8 @@ class Platform : public SimObject
     virtual void postConsoleInt() = 0;
     virtual void clearConsoleInt() = 0;
     virtual Tick intrFrequency() = 0;
+    virtual void postPciInt(int line) = 0;
+    virtual void clearPciInt(int line) = 0;
 };
 
 #endif // __PLATFORM_HH_
index c44da69b7f134a52ef7b14988bfbe0f5f3dbe0e7..ce2d473a91bcd17f0b3fd6262dc7023adf0b7173 100644 (file)
@@ -74,6 +74,18 @@ Tsunami::clearConsoleInt()
     io->clearPIC(0x10);
 }
 
+void
+Tsunami::postPciInt(int line)
+{
+   this->cchip->postDRIR(line);
+}
+
+void
+Tsunami::clearPciInt(int line)
+{
+   this->cchip->clearDRIR(line);
+}
+
 void
 Tsunami::serialize(std::ostream &os)
 {
index db266d62d271a184607fa9f7fc3f7958370150b1..df804956abd04846c80ab66ad003fe8bdb6d23b8 100644 (file)
@@ -112,6 +112,16 @@ class Tsunami : public Platform
     virtual void clearConsoleInt();
 
     /**
+     * Cause the chipset to post a cpi interrupt to the CPU.
+     */
+    virtual void postPciInt(int line);
+
+    /**
+     * Clear a posted PCI->CPU interrupt
+     */
+    virtual void clearPciInt(int line);
+
+  /**
      * Serialize this object to the given output stream.
      * @param os The stream to serialize to.
      */