Config: Cause a fatal() when a parameter without a default value isn't set(FS #315).
[gem5.git] / src / dev / ide_disk.hh
index 2ed860013085e991ea40a2c4d9d8678d552b6ba6..68ae5c3c0b8e04e249f72210b1983d741146ee16 100644 (file)
@@ -42,6 +42,8 @@
 #include "dev/ide_wdcreg.h"
 #include "dev/io_device.hh"
 #include "sim/eventq.hh"
+#include "params/IdeDisk.hh"
+
 
 class ChunkGenerator;
 
@@ -248,14 +250,8 @@ class IdeDisk : public SimObject
     Stats::Formula totBytes;
 
   public:
-    /**
-     * Create and initialize this Disk.
-     * @param name The name of this disk.
-     * @param img The disk image of this disk.
-     * @param id The disk ID (master=0/slave=1)
-     * @param disk_delay The disk delay in milliseconds
-     */
-    IdeDisk(const std::string &name, DiskImage *img, int id, Tick disk_delay);
+    typedef IdeDiskParams Params;
+    IdeDisk(const Params *p);
 
     /**
      * Delete the data buffer.
@@ -282,8 +278,10 @@ class IdeDisk : public SimObject
     }
 
     // Device register read/write
-    void read(const Addr &offset, IdeRegType regtype, uint8_t *data);
-    void write(const Addr &offset, IdeRegType regtype, const uint8_t *data);
+    void readCommand(const Addr offset, int size, uint8_t *data);
+    void readControl(const Addr offset, int size, uint8_t *data);
+    void writeCommand(const Addr offset, int size, const uint8_t *data);
+    void writeControl(const Addr offset, int size, const uint8_t *data);
 
     // Start/abort functions
     void startDma(const uint32_t &prdTableBase);