summaryrefslogtreecommitdiff
path: root/src/arch/arm/pagetable.hh
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2010-11-08 13:58:25 -0600
committerAli Saidi <Ali.Saidi@ARM.com>2010-11-08 13:58:25 -0600
commita1e82259759ce7290269aeca6742098f1adbf2fd (patch)
tree2f93b2fe1d64c24cac0e5405f9f5a7b388c57592 /src/arch/arm/pagetable.hh
parent432fa0aad6092d6a9252f6a9c83c8b36509c1341 (diff)
downloadgem5-a1e82259759ce7290269aeca6742098f1adbf2fd.tar.xz
ARM: Add checkpointing support
Diffstat (limited to 'src/arch/arm/pagetable.hh')
-rw-r--r--src/arch/arm/pagetable.hh87
1 files changed, 47 insertions, 40 deletions
diff --git a/src/arch/arm/pagetable.hh b/src/arch/arm/pagetable.hh
index 76b0e3bb8..46322046f 100644
--- a/src/arch/arm/pagetable.hh
+++ b/src/arch/arm/pagetable.hh
@@ -48,6 +48,8 @@
#include "arch/arm/vtophys.hh"
#include "config/full_system.hh"
+#include "sim/serialize.hh"
+
namespace ArmISA {
struct VAddr
@@ -71,39 +73,6 @@ struct PTE
};
-struct TlbRange
-{
- Addr va;
- Addr size;
- int contextId;
- bool global;
-
- inline bool
- operator<(const TlbRange &r2) const
- {
- if (!(global || r2.global)) {
- if (contextId < r2.contextId)
- return true;
- else if (contextId > r2.contextId)
- return false;
- }
-
- if (va < r2.va)
- return true;
- return false;
- }
-
- inline bool
- operator==(const TlbRange &r2) const
- {
- return va == r2.va &&
- size == r2.size &&
- contextId == r2.contextId &&
- global == r2.global;
- }
-};
-
-
// ITB/DTB table entry
struct TlbEntry
{
@@ -143,10 +112,8 @@ struct TlbEntry
// Access permissions
bool xn; // Execute Never
- uint8_t ap:3; // Access permissions bits
- uint8_t domain:4; // Access Domain
-
- TlbRange range; // For fast TLB searching
+ uint8_t ap; // Access permissions bits
+ uint8_t domain; // Access Domain
//Construct an entry that maps to physical address addr for SE mode
TlbEntry(Addr _asn, Addr _vaddr, Addr _paddr)
@@ -196,9 +163,49 @@ struct TlbEntry
return (pfn << N) | (va & size);
}
- void serialize(std::ostream &os) { panic("Need to Implement\n"); }
- void unserialize(Checkpoint *cp, const std::string &section)
- { panic("Need to Implement\n");}
+ void
+ serialize(std::ostream &os)
+ {
+ SERIALIZE_SCALAR(pfn);
+ SERIALIZE_SCALAR(size);
+ SERIALIZE_SCALAR(vpn);
+ SERIALIZE_SCALAR(asid);
+ SERIALIZE_SCALAR(N);
+ SERIALIZE_SCALAR(global);
+ SERIALIZE_SCALAR(valid);
+ SERIALIZE_SCALAR(nonCacheable);
+ SERIALIZE_SCALAR(sNp);
+ SERIALIZE_ENUM(mtype);
+ SERIALIZE_SCALAR(innerAttrs);
+ SERIALIZE_SCALAR(outerAttrs);
+ SERIALIZE_SCALAR(shareable);
+ SERIALIZE_SCALAR(attributes);
+ SERIALIZE_SCALAR(xn);
+ SERIALIZE_SCALAR(ap);
+ SERIALIZE_SCALAR(domain);
+ }
+ void
+ unserialize(Checkpoint *cp, const std::string &section)
+ {
+ UNSERIALIZE_SCALAR(pfn);
+ UNSERIALIZE_SCALAR(size);
+ UNSERIALIZE_SCALAR(vpn);
+ UNSERIALIZE_SCALAR(asid);
+ UNSERIALIZE_SCALAR(N);
+ UNSERIALIZE_SCALAR(global);
+ UNSERIALIZE_SCALAR(valid);
+ UNSERIALIZE_SCALAR(nonCacheable);
+ UNSERIALIZE_SCALAR(sNp);
+ UNSERIALIZE_ENUM(mtype);
+ UNSERIALIZE_SCALAR(innerAttrs);
+ UNSERIALIZE_SCALAR(outerAttrs);
+ UNSERIALIZE_SCALAR(shareable);
+ UNSERIALIZE_SCALAR(attributes);
+ UNSERIALIZE_SCALAR(xn);
+ UNSERIALIZE_SCALAR(ap);
+ UNSERIALIZE_SCALAR(domain);
+ }
+
};