X86: Change I8254 and PCSpeaker devices from subdevices to SimObjects and eliminate...
[gem5.git] / src / dev / x86 / south_bridge / south_bridge.hh
index 171589cf3d217d02ab5ac756054e4f5b81f761e7..9e7963a7bd25c77ec91da2e7cf786348e7fba413 100644 (file)
 #ifndef __DEV_X86_SOUTH_BRIDGE_SOUTH_BRIDGE_HH__
 #define __DEV_X86_SOUTH_BRIDGE_SOUTH_BRIDGE_HH__
 
-#include "base/range_map.hh"
-#include "dev/io_device.hh"
-#include "dev/x86/south_bridge/i8254.hh"
-#include "dev/x86/south_bridge/speaker.hh"
-#include "dev/x86/south_bridge/sub_device.hh"
+#include "sim/sim_object.hh"
 #include "params/SouthBridge.hh"
 
-class SouthBridge : public PioDevice
+namespace X86ISA
 {
-  protected:
-    AddrRangeList rangeList;
-
-    typedef range_map<Addr, X86ISA::SubDevice *> RangeMap;
-    typedef RangeMap::iterator RangeMapIt;
-    RangeMap rangeMap;
-
+    class I8254;
+    class I8259;
+    class Cmos;
+    class Speaker;
+}
 
-    void addDevice(X86ISA::SubDevice &);
+class SouthBridge : public SimObject
+{
+  protected:
+    Platform * platform;
 
   public:
-    // I8254 Programmable Interval Timer
-    X86ISA::I8254 pit;
-
-    // PC speaker
-    X86ISA::Speaker speaker;
+    X86ISA::I8254 * pit;
+    X86ISA::I8259 * pic1;
+    X86ISA::I8259 * pic2;
+    X86ISA::Cmos * cmos;
+    X86ISA::Speaker speaker;
 
   public:
-
-    void addressRanges(AddrRangeList &range_list);
-
-    Tick read(PacketPtr pkt);
-    Tick write(PacketPtr pkt);
-
     typedef SouthBridgeParams Params;
     SouthBridge(const Params *p);