summaryrefslogtreecommitdiff
path: root/src/dev/sparc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2013-07-11 21:57:04 -0500
committerSteve Reinhardt <stever@gmail.com>2013-07-11 21:57:04 -0500
commit1f43e244bda0c78844720609455fd77f6f275e51 (patch)
tree65eb7262e58a61992368dfe10f2152dd85eb6129 /src/dev/sparc
parent502ad1e6757116867e0e0529c0c080320a2b440b (diff)
downloadgem5-1f43e244bda0c78844720609455fd77f6f275e51.tar.xz
dev: make BasicPioDevice take size in constructor
Instead of relying on derived classes explicitly assigning to the BasicPioDevice pioSize field, require them to pass a size value in to the constructor. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/dev/sparc')
-rw-r--r--src/dev/sparc/dtod.cc4
-rw-r--r--src/dev/sparc/mm_disk.cc4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/dev/sparc/dtod.cc b/src/dev/sparc/dtod.cc
index c7243cfb8..abbab2dee 100644
--- a/src/dev/sparc/dtod.cc
+++ b/src/dev/sparc/dtod.cc
@@ -50,13 +50,11 @@ using namespace std;
using namespace TheISA;
DumbTOD::DumbTOD(const Params *p)
- : BasicPioDevice(p)
+ : BasicPioDevice(p, 0x08)
{
struct tm tm = p->time;
char *tz;
- pioSize = 0x08;
-
tz = getenv("TZ");
setenv("TZ", "", 1);
tzset();
diff --git a/src/dev/sparc/mm_disk.cc b/src/dev/sparc/mm_disk.cc
index 0095d9f1d..0a6d14445 100644
--- a/src/dev/sparc/mm_disk.cc
+++ b/src/dev/sparc/mm_disk.cc
@@ -45,10 +45,10 @@
#include "sim/system.hh"
MmDisk::MmDisk(const Params *p)
- : BasicPioDevice(p), image(p->image), curSector((off_t)-1), dirty(false)
+ : BasicPioDevice(p, p->image->size() * SectorSize),
+ image(p->image), curSector((off_t)-1), dirty(false)
{
std::memset(&diskData, 0, SectorSize);
- pioSize = image->size() * SectorSize;
}
Tick