projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge zizzer.eecs.umich.edu:/bk/newmem/
[gem5.git]
/
src
/
mem
/
page_table.hh
diff --git
a/src/mem/page_table.hh
b/src/mem/page_table.hh
index f7212d42311a1616e8e5f90bb8d6d88b9bf0320b..0e2b1f58c8695841620175a8a97dbba930aeac77 100644
(file)
--- a/
src/mem/page_table.hh
+++ b/
src/mem/page_table.hh
@@
-37,9
+37,10
@@
#define __PAGE_TABLE__
#include <string>
#define __PAGE_TABLE__
#include <string>
-#include <map>
+#include "sim/faults.hh"
#include "arch/isa_traits.hh"
#include "arch/isa_traits.hh"
+#include "base/hashmap.hh"
#include "base/trace.hh"
#include "mem/request.hh"
#include "mem/packet.hh"
#include "base/trace.hh"
#include "mem/request.hh"
#include "mem/packet.hh"
@@
-48,12
+49,19
@@
class System;
/**
class System;
/**
- * Page Table Decl
e
ration.
+ * Page Table Decl
a
ration.
*/
class PageTable
{
protected:
*/
class PageTable
{
protected:
- std::map<Addr,Addr> pTable;
+ m5::hash_map<Addr,Addr> pTable;
+
+ struct cacheElement {
+ Addr paddr;
+ Addr vaddr;
+ } ;
+
+ struct cacheElement pTableCache[3];
const Addr pageSize;
const Addr offsetMask;
const Addr pageSize;
const Addr offsetMask;
@@
-69,9
+77,9
@@
class PageTable
Addr pageAlign(Addr a) { return (a & ~offsetMask); }
Addr pageOffset(Addr a) { return (a & offsetMask); }
Addr pageAlign(Addr a) { return (a & ~offsetMask); }
Addr pageOffset(Addr a) { return (a & offsetMask); }
- Fault page_check(Addr addr, int size) const;
+ Fault page_check(Addr addr, int
64_t
size) const;
- void allocate(Addr vaddr, int size);
+ void allocate(Addr vaddr, int
64_t
size);
/**
* Translate function
/**
* Translate function
@@
-87,6
+95,8
@@
class PageTable
*/
Fault translate(RequestPtr &req);
*/
Fault translate(RequestPtr &req);
+ void serialize(std::ostream &os);
+ void unserialize(Checkpoint *cp, const std::string §ion);
};
#endif
};
#endif