arch-arm: Add initial support for SVE contiguous loads/stores
[gem5.git] / src / arch / sparc / system.hh
index 9cf3bb568c4467f1a24fa1126d7e5b876c019be2..ac877a9646ace58b920a9347a85227f176ae879a 100644 (file)
 #include "base/loader/symtab.hh"
 #include "cpu/pc_event.hh"
 #include "kern/system_events.hh"
+#include "params/SparcSystem.hh"
 #include "sim/sim_object.hh"
 #include "sim/system.hh"
 
 class SparcSystem : public System
 {
   public:
-    struct Params : public System::Params
-    {
-        PhysicalMemory *rom;
-        Addr reset_addr;
-        Addr hypervisor_addr;
-        Addr openboot_addr;
-        std::string reset_bin;
-        std::string hypervisor_bin;
-        std::string openboot_bin;
-        std::string boot_osflags;
-    };
-
+    typedef SparcSystemParams Params;
     SparcSystem(Params *p);
-
     ~SparcSystem();
 
-    virtual bool breakpoint();
+    void initState() override;
 
 /**
  * Serialization stuff
  */
   public:
-    virtual void serialize(std::ostream &os);
-    virtual void unserialize(Checkpoint *cp, const std::string &section);
+    void serializeSymtab(CheckpointOut &cp) const override;
+    void unserializeSymtab(CheckpointIn &cp) override;
 
     /** reset binary symbol table */
     SymbolTable *resetSymtab;
@@ -77,6 +66,15 @@ class SparcSystem : public System
     /** openboot symbol table */
     SymbolTable *openbootSymtab;
 
+    /** nvram symbol table? */
+    SymbolTable *nvramSymtab;
+
+    /** hypervisor desc symbol table? */
+    SymbolTable *hypervisorDescSymtab;
+
+    /** partition desc symbol table? */
+    SymbolTable *partitionDescSymtab;
+
     /** Object pointer for the reset binary */
     ObjectFile *reset;
 
@@ -86,37 +84,47 @@ class SparcSystem : public System
     /** Object pointer for the openboot code */
     ObjectFile *openboot;
 
+    /** Object pointer for the nvram image */
+    ObjectFile *nvram;
+
+    /** Object pointer for the hypervisor description image */
+    ObjectFile *hypervisor_desc;
+
+    /** Object pointer for the partition description image */
+    ObjectFile *partition_desc;
+
     /** System Tick for syncronized tick across all cpus. */
     Tick sysTick;
 
-    /** functional port to ROM */
-    FunctionalPort funcRomPort;
-
   protected:
     const Params *params() const { return (const Params *)_params; }
 
     /** Add a function-based event to reset binary. */
     template <class T>
-    T *SparcSystem::addResetFuncEvent(const char *lbl)
+    T *
+    addResetFuncEvent(const char *lbl)
     {
         return addFuncEvent<T>(resetSymtab, lbl);
     }
 
     /** Add a function-based event to the hypervisor. */
     template <class T>
-    T *SparcSystem::addHypervisorFuncEvent(const char *lbl)
+    T *
+    addHypervisorFuncEvent(const char *lbl)
     {
         return addFuncEvent<T>(hypervisorSymtab, lbl);
     }
 
     /** Add a function-based event to the openboot. */
     template <class T>
-    T *SparcSystem::addOpenbootFuncEvent(const char *lbl)
+    T *
+    addOpenbootFuncEvent(const char *lbl)
     {
         return addFuncEvent<T>(openbootSymtab, lbl);
     }
 
-    virtual Addr fixFuncEventAddr(Addr addr)
+    Addr
+    fixFuncEventAddr(Addr addr) override
     {
         //XXX This may eventually have to do something useful.
         return addr;