sim: Stop using loadState in the Root SimObject.

The primary difference between using loadState and letting the default
implementation of loadState call unserialize is that whether or not that code
is called is dependent on that object being associated with a section in the
checkpoint file being unserialized. Since there's always a "root" object,
there should always be a section for it in the checkpoint and those should be
equivalent.

This removes one custom implementation of the loadState function.

Change-Id: Ia674ccc18e141f38746e22ccfddc21475b1a0731
Reviewed-on: https://gem5-review.googlesource.com/4740
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
diff --git a/src/sim/root.cc b/src/sim/root.cc
index f4aabad..41adf1c 100644
--- a/src/sim/root.cc
+++ b/src/sim/root.cc
@@ -119,19 +119,12 @@
 }
 
 void
-Root::initState()
+Root::startup()
 {
     timeSyncEnable(params()->time_sync_enable);
 }
 
 void
-Root::loadState(CheckpointIn &cp)
-{
-    SimObject::loadState(cp);
-    timeSyncEnable(params()->time_sync_enable);
-}
-
-void
 Root::serialize(CheckpointOut &cp) const
 {
     SERIALIZE_SCALAR(FullSystem);
@@ -139,10 +132,6 @@
     SERIALIZE_SCALAR(isa);
 }
 
-void
-Root::unserialize(CheckpointIn &cp)
-{}
-
 
 bool FullSystem;
 unsigned int FullSystemInt;
diff --git a/src/sim/root.hh b/src/sim/root.hh
index db207a7..c5f42b8 100644
--- a/src/sim/root.hh
+++ b/src/sim/root.hh
@@ -103,16 +103,11 @@
 
     Root(Params *p);
 
-    /** Schedule the timesync event at loadState() so that curTick is correct
+    /** Schedule the timesync event at startup().
      */
-    void loadState(CheckpointIn &cp) override;
-
-    /** Schedule the timesync event at initState() when not unserializing
-     */
-    void initState() override;
+    void startup() override;
 
     void serialize(CheckpointOut &cp) const override;
-    void unserialize(CheckpointIn &cp) override;
 };
 
 #endif // __SIM_ROOT_HH__