#include <string>
#include <vector>
-#include "sim/system.hh"
#include "base/loader/symtab.hh"
#include "cpu/pc_event.hh"
#include "kern/system_events.hh"
+#include "mem/fs_translating_port_proxy.hh"
+#include "params/AlphaSystem.hh"
#include "sim/sim_object.hh"
+#include "sim/system.hh"
class AlphaSystem : public System
{
public:
- struct Params : public System::Params
- {
- std::string console_path;
- std::string palcode;
- uint64_t system_type;
- uint64_t system_rev;
- };
-
+ typedef AlphaSystemParams Params;
AlphaSystem(Params *p);
-
~AlphaSystem();
- virtual bool breakpoint();
-
-/**
- * Serialization stuff
- */
public:
- virtual void serialize(std::ostream &os);
- virtual void unserialize(Checkpoint *cp, const std::string §ion);
+
+ /**
+ * Initialise the state of the system.
+ */
+ void initState() override;
+
+ /**
+ * Serialization stuff
+ */
+ void serializeSymtab(CheckpointOut &cp) const override;
+ void unserializeSymtab(CheckpointIn &cp) override;
+
+ /** Override startup() to provide a path to call setupFuncEvents()
+ */
+ void startup() override;
/**
* Set the m5AlphaAccess pointer in the console
/** Event to halt the simulator if the console calls panic() */
BreakPCEvent *consolePanicEvent;
#endif
+
protected:
+ Tick intrFreq;
+
+ /**
+ * Proxy used to copy arguments directly into kernel memory.
+ */
+ FSTranslatingPortProxy virtProxy;
+
const Params *params() const { return (const Params *)_params; }
+
+ /** Setup all the function events. Must be done after init() for Alpha since
+ * fixFuncEvent() requires a function port
+ */
+ virtual void setupFuncEvents();
+
/** Add a function-based event to PALcode. */
template <class T>
- T *AlphaSystem::addPalFuncEvent(const char *lbl)
+ T *
+ addPalFuncEvent(const char *lbl)
{
return addFuncEvent<T>(palSymtab, lbl);
}
/** Add a function-based event to the console code. */
template <class T>
- T *AlphaSystem::addConsoleFuncEvent(const char *lbl)
+ T *
+ addConsoleFuncEvent(const char *lbl)
{
return addFuncEvent<T>(consoleSymtab, lbl);
}
- virtual Addr fixFuncEventAddr(Addr addr);
+ Addr fixFuncEventAddr(Addr addr) override;
+ public:
+ void setIntrFreq(Tick freq) { intrFreq = freq; }
};
-#endif
+#endif // __ARCH_ALPHA_SYSTEM_HH__