diff options
author | Steve Reinhardt <stever@gmail.com> | 2013-07-11 21:57:04 -0500 |
---|---|---|
committer | Steve Reinhardt <stever@gmail.com> | 2013-07-11 21:57:04 -0500 |
commit | 1f43e244bda0c78844720609455fd77f6f275e51 (patch) | |
tree | 65eb7262e58a61992368dfe10f2152dd85eb6129 /src/dev/alpha | |
parent | 502ad1e6757116867e0e0529c0c080320a2b440b (diff) | |
download | gem5-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/alpha')
-rw-r--r-- | src/dev/alpha/backdoor.cc | 6 | ||||
-rw-r--r-- | src/dev/alpha/tsunami_cchip.cc | 4 | ||||
-rw-r--r-- | src/dev/alpha/tsunami_io.cc | 4 | ||||
-rw-r--r-- | src/dev/alpha/tsunami_pchip.cc | 4 |
4 files changed, 5 insertions, 13 deletions
diff --git a/src/dev/alpha/backdoor.cc b/src/dev/alpha/backdoor.cc index a3579847b..dc0e8e49f 100644 --- a/src/dev/alpha/backdoor.cc +++ b/src/dev/alpha/backdoor.cc @@ -62,12 +62,10 @@ using namespace std; using namespace AlphaISA; AlphaBackdoor::AlphaBackdoor(const Params *p) - : BasicPioDevice(p), disk(p->disk), terminal(p->terminal), + : BasicPioDevice(p, sizeof(struct AlphaAccess)), + disk(p->disk), terminal(p->terminal), system(p->system), cpu(p->cpu) { - - pioSize = sizeof(struct AlphaAccess); - alphaAccess = new Access(); alphaAccess->last_offset = pioSize - 1; diff --git a/src/dev/alpha/tsunami_cchip.cc b/src/dev/alpha/tsunami_cchip.cc index 0960c71ab..203325e75 100644 --- a/src/dev/alpha/tsunami_cchip.cc +++ b/src/dev/alpha/tsunami_cchip.cc @@ -57,10 +57,8 @@ using namespace TheISA; TsunamiCChip::TsunamiCChip(const Params *p) - : BasicPioDevice(p), tsunami(p->tsunami) + : BasicPioDevice(p, 0x10000000), tsunami(p->tsunami) { - pioSize = 0x10000000; - drir = 0; ipint = 0; itint = 0; diff --git a/src/dev/alpha/tsunami_io.cc b/src/dev/alpha/tsunami_io.cc index bccdddf85..6586cd980 100644 --- a/src/dev/alpha/tsunami_io.cc +++ b/src/dev/alpha/tsunami_io.cc @@ -69,11 +69,9 @@ TsunamiIO::RTC::RTC(const string &n, const TsunamiIOParams *p) } TsunamiIO::TsunamiIO(const Params *p) - : BasicPioDevice(p), tsunami(p->tsunami), + : BasicPioDevice(p, 0x100), tsunami(p->tsunami), pitimer(this, p->name + "pitimer"), rtc(p->name + ".rtc", p) { - pioSize = 0x100; - // set the back pointer from tsunami to myself tsunami->io = this; diff --git a/src/dev/alpha/tsunami_pchip.cc b/src/dev/alpha/tsunami_pchip.cc index fcd06c582..3ddc0f1b3 100644 --- a/src/dev/alpha/tsunami_pchip.cc +++ b/src/dev/alpha/tsunami_pchip.cc @@ -52,10 +52,8 @@ using namespace std; using namespace TheISA; TsunamiPChip::TsunamiPChip(const Params *p) -: BasicPioDevice(p) + : BasicPioDevice(p, 0x1000) { - pioSize = 0x1000; - for (int i = 0; i < 4; i++) { wsba[i] = 0; wsm[i] = 0; |