sparc: Fix FS Checkpoint loading
authorKhalique <khalique913@gmail.com>
Thu, 22 Feb 2018 19:19:40 +0000 (13:19 -0600)
committerKhalique Ahmed <khalique913@gmail.com>
Sat, 24 Feb 2018 00:28:29 +0000 (00:28 +0000)
Proposed changes to SPARC FS simulation, testing indicates that checkpoints are now loaded correctly with the following command: build/SPARC/gem5.opt configs/example/fs.py -r 1

Change-Id: Icd44f01a74c41a78828ef6fd7b661e584bdb6966
Reviewed-on: https://gem5-review.googlesource.com/8581
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/arch/sparc/isa.cc
src/arch/sparc/tlb.cc
src/dev/sparc/mm_disk.cc

index b8906e95fa0eae11a8a96f4f45c1bda5ba1c6820..f6b941e2d42dc76c54107b7f443e212b91a0f10a 100644 (file)
@@ -654,12 +654,12 @@ ISA::serialize(CheckpointOut &cp) const
     SERIALIZE_ARRAY(tstate,MaxTL);
     SERIALIZE_ARRAY(tt,MaxTL);
     SERIALIZE_SCALAR(tba);
-    SERIALIZE_SCALAR((uint16_t)pstate);
+    SERIALIZE_SCALAR(pstate);
     SERIALIZE_SCALAR(tl);
     SERIALIZE_SCALAR(pil);
     SERIALIZE_SCALAR(cwp);
     SERIALIZE_SCALAR(gl);
-    SERIALIZE_SCALAR((uint64_t)hpstate);
+    SERIALIZE_SCALAR(hpstate);
     SERIALIZE_ARRAY(htstate,MaxTL);
     SERIALIZE_SCALAR(hintp);
     SERIALIZE_SCALAR(htba);
index 997bfe991070aab7e75c8383446513abba65ed1d..f4564c6fd92588d0672ab863048057836b79cabc 100644 (file)
@@ -1367,12 +1367,12 @@ TLB::serialize(CheckpointOut &cp) const
     SERIALIZE_SCALAR(cx_config);
     SERIALIZE_SCALAR(sfsr);
     SERIALIZE_SCALAR(tag_access);
+    SERIALIZE_SCALAR(sfar);
 
     for (int x = 0; x < size; x++) {
         ScopedCheckpointSection sec(cp, csprintf("PTE%d", x));
         tlb[x].serialize(cp);
     }
-    SERIALIZE_SCALAR(sfar);
 }
 
 void
index a6ce1d09f5d20ab3ee392c4500f8ed697f138651..b3223e85947ac8bb657a1465bed84bd820fc6230 100644 (file)
@@ -182,6 +182,7 @@ MmDisk::serialize(CheckpointOut &cp) const
             image->write(diskData, curSector);
         assert(bytes_read == SectorSize);
     }
+    ClockedObject::serialize(cp);
 }
 
 MmDisk *