Varied fixes to get linux running. Allow for shutdown on linux.
authorAndrew Schultz <alschult@umich.edu>
Tue, 25 May 2004 20:35:18 +0000 (16:35 -0400)
committerAndrew Schultz <alschult@umich.edu>
Tue, 25 May 2004 20:35:18 +0000 (16:35 -0400)
dev/ide_disk.cc:
    Fix to PIO writes and also add command needed for shutdown
dev/pcidev.cc:
    Change the panic on write to read-only registers to a debug print.  The
    kernel tries to write back over all of the PCI registers to restore
    the saved SRM state, so we need to let it do this without panicing.
sim/system.cc:
    Add back increment of number of running systems to allow trap of halt
    work correctly.

--HG--
extra : convert_revision : 84aba4effbec14545f3610c19a8e321d7e7f7cf2

dev/ide_disk.cc
dev/pcidev.cc
sim/system.cc

index 2205db9e3db31e0af3ddbd5e2a0a45d0d0db680d..ddd4a09e7bdf7f43b370dca67c5de35a1d93c7c9 100644 (file)
@@ -644,6 +644,7 @@ IdeDisk::startCommand()
 
       case WIN_RECAL:
       case WIN_SPECIFY:
+      case WIN_STANDBYNOW1:
       case WIN_FLUSH_CACHE:
       case WIN_VERIFY:
       case WIN_SEEK:
@@ -960,6 +961,10 @@ IdeDisk::updateState(DevAction_t action)
                 cmdReg.status &= ~STATUS_DRQ_BIT;
 
                 devState = Prepare_Data_Out;
+
+                /** @todo change this to a scheduled event to simulate
+                    disk delay */
+                updateState(ACT_DATA_READY);
             }
         }
         break;
index 9ac170b5c77e8138f96ac2ff7fc1f8aa280e19e0..9d6208d6b41520a6f11785d221d83434212211c6 100644 (file)
@@ -247,7 +247,7 @@ PciDev::WriteConfig(int offset, int size, uint32_t data)
             break;
 
           default:
-            panic("writing to a read only register");
+            DPRINTF(PCIDEV, "Writing to a read only register");
         }
         break;
     }
index 619593abd301c2d2f67bc82492819566fa8e589f..b801cb25471c15fe7ad51084b3b3ccc10601106f 100644 (file)
@@ -52,6 +52,9 @@ System::System(const std::string _name,
       bin(_bin),
       binned_fns(binned_fns)
 {
+    // increment the number of running systems
+    numSystemsRunning++;
+
     // add self to global system list
     systemList.push_back(this);
     if (bin == true) {