diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-07-24 15:48:40 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-07-24 15:48:40 -0700 |
commit | 26b1c455e0aed69eda0cc165b5084edb1b557c38 (patch) | |
tree | 0b7ffa9259c55f9a639a12f09ddef033d78b084b /src/dev/sparc/mm_disk.cc | |
parent | 02c39000bfc6be620382bf89636e3b1bbb2f4cf6 (diff) | |
parent | abc76f20cb98c90e8dab416dd16dfd4a954013ba (diff) | |
download | gem5-26b1c455e0aed69eda0cc165b5084edb1b557c38.tar.xz |
Merge with head.
--HG--
extra : convert_revision : 4a34b3f91c4fc90055596245ae3efec45ea33888
Diffstat (limited to 'src/dev/sparc/mm_disk.cc')
-rw-r--r-- | src/dev/sparc/mm_disk.cc | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/src/dev/sparc/mm_disk.cc b/src/dev/sparc/mm_disk.cc index 81c5c589a..4a2550dd2 100644 --- a/src/dev/sparc/mm_disk.cc +++ b/src/dev/sparc/mm_disk.cc @@ -40,11 +40,10 @@ #include "dev/platform.hh" #include "mem/port.hh" #include "mem/packet_access.hh" -#include "sim/builder.hh" #include "sim/byteswap.hh" #include "sim/system.hh" -MmDisk::MmDisk(Params *p) +MmDisk::MmDisk(const Params *p) : BasicPioDevice(p), image(p->image), curSector((off_t)-1), dirty(false) { std::memset(&diskData, 0, SectorSize); @@ -173,39 +172,8 @@ MmDisk::serialize(std::ostream &os) } } - - - -BEGIN_DECLARE_SIM_OBJECT_PARAMS(MmDisk) - Param<Addr> pio_addr; - Param<Tick> pio_latency; - Param<Addr> pio_size; - SimObjectParam<Platform *> platform; - SimObjectParam<System *> system; - SimObjectParam<DiskImage *> image; -END_DECLARE_SIM_OBJECT_PARAMS(MmDisk) - -BEGIN_INIT_SIM_OBJECT_PARAMS(MmDisk) - - INIT_PARAM(pio_addr, "Device Address"), - INIT_PARAM(pio_latency, "Programmed IO latency"), - INIT_PARAM(pio_size, "Size of address range"), - INIT_PARAM(platform, "platform"), - INIT_PARAM(system, "system object"), - INIT_PARAM(image, "disk image") - -END_INIT_SIM_OBJECT_PARAMS(MmDisk) - -CREATE_SIM_OBJECT(MmDisk) +MmDisk * +MmDiskParams::create() { - MmDisk::Params *p = new MmDisk::Params; - p->name = getInstanceName(); - p->pio_addr = pio_addr; - p->pio_delay = pio_latency; - p->platform = platform; - p->system = system; - p->image = image; - return new MmDisk(p); + return new MmDisk(this); } - -REGISTER_SIM_OBJECT("MmDisk", MmDisk) |