arch-arm: Add initial support for SVE contiguous loads/stores
[gem5.git] / src / arch / alpha / system.hh
index 0c073a68c00b377eb5ad50d965e50138098af16d..d0be461356eb6e573e504866e26302a676234cfc 100644 (file)
 #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 &section);
+
+    /**
+     * 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
@@ -86,26 +88,44 @@ class AlphaSystem : public System
     /** 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__