summaryrefslogtreecommitdiff
path: root/src/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/mips')
-rwxr-xr-xsrc/arch/mips/interrupts.hh4
-rw-r--r--src/arch/mips/pagetable.cc4
-rwxr-xr-xsrc/arch/mips/pagetable.hh8
-rw-r--r--src/arch/mips/tlb.cc11
-rw-r--r--src/arch/mips/tlb.hh4
5 files changed, 16 insertions, 15 deletions
diff --git a/src/arch/mips/interrupts.hh b/src/arch/mips/interrupts.hh
index 8367bf91c..3c9165bfa 100755
--- a/src/arch/mips/interrupts.hh
+++ b/src/arch/mips/interrupts.hh
@@ -116,13 +116,13 @@ class Interrupts : public SimObject
void
- serialize(std::ostream &os)
+ serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE
{
fatal("Serialization of Interrupts Unimplemented for MIPS");
}
void
- unserialize(Checkpoint *cp, const std::string &section)
+ unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE
{
fatal("Unserialization of Interrupts Unimplemented for MIPS");
}
diff --git a/src/arch/mips/pagetable.cc b/src/arch/mips/pagetable.cc
index b4304060c..26d9bf408 100644
--- a/src/arch/mips/pagetable.cc
+++ b/src/arch/mips/pagetable.cc
@@ -38,7 +38,7 @@ namespace MipsISA
{
void
-PTE::serialize(std::ostream &os)
+PTE::serialize(CheckpointOut &cp) const
{
SERIALIZE_SCALAR(Mask);
SERIALIZE_SCALAR(VPN);
@@ -57,7 +57,7 @@ PTE::serialize(std::ostream &os)
}
void
-PTE::unserialize(Checkpoint *cp, const std::string &section)
+PTE::unserialize(CheckpointIn &cp)
{
UNSERIALIZE_SCALAR(Mask);
UNSERIALIZE_SCALAR(VPN);
diff --git a/src/arch/mips/pagetable.hh b/src/arch/mips/pagetable.hh
index 992d6649b..cc4e4a859 100755
--- a/src/arch/mips/pagetable.hh
+++ b/src/arch/mips/pagetable.hh
@@ -74,8 +74,8 @@ struct PTE
int OffsetMask;
bool Valid() { return (V0 | V1); };
- void serialize(std::ostream &os);
- void unserialize(Checkpoint *cp, const std::string &section);
+ void serialize(CheckpointOut &cp) const;
+ void unserialize(CheckpointIn &cp);
};
// WARN: This particular TLB entry is not necessarily conformed to MIPS ISA
@@ -100,12 +100,12 @@ struct TlbEntry
void
updateVaddr(Addr new_vaddr) {}
- void serialize(std::ostream &os)
+ void serialize(CheckpointOut &cp) const
{
SERIALIZE_SCALAR(_pageStart);
}
- void unserialize(Checkpoint *cp, const std::string &section)
+ void unserialize(CheckpointIn &cp)
{
UNSERIALIZE_SCALAR(_pageStart);
}
diff --git a/src/arch/mips/tlb.cc b/src/arch/mips/tlb.cc
index 6c46cacc6..d2aa5ad70 100644
--- a/src/arch/mips/tlb.cc
+++ b/src/arch/mips/tlb.cc
@@ -197,25 +197,26 @@ TLB::flushAll()
}
void
-TLB::serialize(ostream &os)
+TLB::serialize(CheckpointOut &cp) const
{
SERIALIZE_SCALAR(size);
SERIALIZE_SCALAR(nlu);
for (int i = 0; i < size; i++) {
- nameOut(os, csprintf("%s.PTE%d", name(), i));
- table[i].serialize(os);
+ ScopedCheckpointSection sec(cp, csprintf("PTE%d", i));
+ table[i].serialize(cp);
}
}
void
-TLB::unserialize(Checkpoint *cp, const string &section)
+TLB::unserialize(CheckpointIn &cp)
{
UNSERIALIZE_SCALAR(size);
UNSERIALIZE_SCALAR(nlu);
for (int i = 0; i < size; i++) {
- table[i].unserialize(cp, csprintf("%s.PTE%d", section, i));
+ ScopedCheckpointSection sec(cp, csprintf("PTE%d", i));
+ table[i].unserialize(cp);
if (table[i].V0 || table[i].V1) {
lookupTable.insert(make_pair(table[i].VPN, i));
}
diff --git a/src/arch/mips/tlb.hh b/src/arch/mips/tlb.hh
index c7cd5e631..5a9069e4c 100644
--- a/src/arch/mips/tlb.hh
+++ b/src/arch/mips/tlb.hh
@@ -107,8 +107,8 @@ class TLB : public BaseTLB
static Fault checkCacheability(RequestPtr &req);
// Checkpointing
- void serialize(std::ostream &os);
- void unserialize(Checkpoint *cp, const std::string &section);
+ void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
+ void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
void regStats();