summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/alpha_access.h19
-rw-r--r--dev/alpha_console.cc6
-rw-r--r--dev/alpha_console.hh8
3 files changed, 18 insertions, 15 deletions
diff --git a/dev/alpha_access.h b/dev/alpha_access.h
index 07350d622..b62966ea0 100644
--- a/dev/alpha_access.h
+++ b/dev/alpha_access.h
@@ -33,15 +33,17 @@
* System Console Memory Mapped Register Definition
*/
-#define ALPHA_ACCESS_VERSION (1302)
+#define ALPHA_ACCESS_VERSION (1303)
-#ifndef CONSOLE
-#include <iosfwd>
-#include <string>
-class Checkpoint;
-#else
+#ifdef CONSOLE
typedef unsigned uint32_t;
typedef unsigned long uint64_t;
+#else
+#ifdef ALPHA_TLASER
+#define ALPHA_ACCESS_BASE ULL(0xfffffc8000a00000)
+#else
+#define ALPHA_ACCESS_BASE ULL(0xfffffd0200000000)
+#endif
#endif
// This structure hacked up from simos
@@ -74,11 +76,6 @@ struct AlphaAccess
uint64_t bootStrapImpure; // 70:
uint32_t bootStrapCPU; // 78:
uint32_t align2; // 7C: Dummy placeholder for alignment
-
-#ifndef CONSOLE
- void serialize(std::ostream &os);
- void unserialize(Checkpoint *cp, const std::string &section);
-#endif
};
#endif // __ALPHA_ACCESS_H__
diff --git a/dev/alpha_console.cc b/dev/alpha_console.cc
index 2cbe60f47..3c009d4bd 100644
--- a/dev/alpha_console.cc
+++ b/dev/alpha_console.cc
@@ -69,7 +69,7 @@ AlphaConsole::AlphaConsole(const string &name, SimConsole *cons, SimpleDisk *d,
pioInterface->addAddrRange(RangeSize(addr, size));
}
- alphaAccess = new AlphaAccess;
+ alphaAccess = new Access;
alphaAccess->last_offset = size - 1;
alphaAccess->version = ALPHA_ACCESS_VERSION;
@@ -268,7 +268,7 @@ AlphaConsole::cacheAccess(MemReqPtr &req)
}
void
-AlphaAccess::serialize(ostream &os)
+AlphaConsole::Access::serialize(ostream &os)
{
SERIALIZE_SCALAR(last_offset);
SERIALIZE_SCALAR(version);
@@ -291,7 +291,7 @@ AlphaAccess::serialize(ostream &os)
}
void
-AlphaAccess::unserialize(Checkpoint *cp, const std::string &section)
+AlphaConsole::Access::unserialize(Checkpoint *cp, const std::string &section)
{
UNSERIALIZE_SCALAR(last_offset);
UNSERIALIZE_SCALAR(version);
diff --git a/dev/alpha_console.hh b/dev/alpha_console.hh
index 63e0d3ae4..eb59626f5 100644
--- a/dev/alpha_console.hh
+++ b/dev/alpha_console.hh
@@ -72,8 +72,14 @@ class SimpleDisk;
class AlphaConsole : public PioDevice
{
protected:
+ struct Access : public AlphaAccess
+ {
+ void serialize(std::ostream &os);
+ void unserialize(Checkpoint *cp, const std::string &section);
+ };
+
union {
- AlphaAccess *alphaAccess;
+ Access *alphaAccess;
uint8_t *consoleData;
};