#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"
AlphaSystem(Params *p);
~AlphaSystem();
-/**
- * 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 *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 *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__