Major changes to how SimObjects are created and initialized. Almost all
[gem5.git] / src / dev / pciconfigall.cc
index 39c8f0fa05bde32a7744bef1a2b1706505407e34..6214e48c4a1ba5db3104838b1d9798524b4f5d03 100644 (file)
@@ -39,7 +39,7 @@
 #include "dev/platform.hh"
 #include "mem/packet.hh"
 #include "mem/packet_access.hh"
-#include "sim/builder.hh"
+#include "params/PciConfigAll.hh"
 #include "sim/system.hh"
 
 using namespace std;
@@ -83,8 +83,10 @@ PciConfigAll::write(PacketPtr pkt)
 {
     assert(pkt->result == Packet::Unknown);
     panic("Attempting to write to config space on non-existant device\n");
+    M5_DUMMY_RETURN
 }
 
+
 void
 PciConfigAll::addressRanges(AddrRangeList &range_list)
 {
@@ -95,27 +97,8 @@ PciConfigAll::addressRanges(AddrRangeList &range_list)
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 
-BEGIN_DECLARE_SIM_OBJECT_PARAMS(PciConfigAll)
-
-    Param<Tick> pio_latency;
-    Param<int> bus;
-    Param<Addr> size;
-    SimObjectParam<Platform *> platform;
-    SimObjectParam<System *> system;
-
-END_DECLARE_SIM_OBJECT_PARAMS(PciConfigAll)
-
-BEGIN_INIT_SIM_OBJECT_PARAMS(PciConfigAll)
-
-    INIT_PARAM(pio_latency, "Programmed IO latency"),
-    INIT_PARAM(bus, "Bus that this object handles config space for"),
-    INIT_PARAM(size, "The size of config space"),
-    INIT_PARAM(platform, "platform"),
-    INIT_PARAM(system, "system object")
-
-END_INIT_SIM_OBJECT_PARAMS(PciConfigAll)
-
-CREATE_SIM_OBJECT(PciConfigAll)
+PciConfigAll *
+PciConfigAllParams::create()
 {
     PciConfigAll::Params *p = new PciConfigAll::Params;
     p->pio_delay = pio_latency;
@@ -127,6 +110,4 @@ CREATE_SIM_OBJECT(PciConfigAll)
     return new PciConfigAll(p);
 }
 
-REGISTER_SIM_OBJECT("PciConfigAll", PciConfigAll)
-
 #endif // DOXYGEN_SHOULD_SKIP_THIS