diff options
author | Ron Dreslinski <rdreslin@umich.edu> | 2006-02-15 14:21:09 -0500 |
---|---|---|
committer | Ron Dreslinski <rdreslin@umich.edu> | 2006-02-15 14:21:09 -0500 |
commit | 7f114ca41930c7e0a71dfb105472671cfa25ddec (patch) | |
tree | d2d696e7633a347bb5ca2824720caed578f62fe2 /mem/page_table.hh | |
parent | 3298e937d389c2fa0a5e5a8eeb1db2a3fac3e7e3 (diff) | |
download | gem5-7f114ca41930c7e0a71dfb105472671cfa25ddec.tar.xz |
Many changes that make the new mem system compile. Now to convert the rest of the tree to use the new mem system.
mem/mem_object.hh:
Create constrtor so it compiles
mem/packet.hh:
Fix typedefs so they compile, add in a few more headers for compilation
mem/page_table.cc:
convert to new mem system so it compiles
mem/page_table.hh:
fix it to the version that had asid support. Make it compile in the new system
mem/physical.cc:
Fix some compilation bugs
mem/physical.hh:
Add a type that made compile fail
mem/port.hh:
Fix a spelling error that messed up compilation
mem/request.hh:
fix typedefs and forward declerations so it compiles
--HG--
extra : convert_revision : 580fb1ba31ada799ff0122601b8b5a8d994bb8af
Diffstat (limited to 'mem/page_table.hh')
-rw-r--r-- | mem/page_table.hh | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/mem/page_table.hh b/mem/page_table.hh index 785f0928f..7e534899f 100644 --- a/mem/page_table.hh +++ b/mem/page_table.hh @@ -38,50 +38,51 @@ #include <map> #include "base/trace.hh" -#include "mem/mem_req.hh" -#include "mem/mem_cmd.hh" +#include "mem/request.hh" +#include "mem/packet.hh" #include "sim/sim_object.hh" -class System; +class PhysicalMemory; /** * Page Table Decleration. */ -class PageTable +class PageTable : public SimObject { protected: std::map<Addr,Addr> pTable; - const Addr pageSize; - const Addr offsetMask; - - System *system; + PhysicalMemory *mem; public: - PageTable(System *_system, Addr _pageSize = VMPageSize); + /** + * Construct this interface. + * @param name The name of this interface. + * @param hier Pointer to the hierarchy wide parameters. + * @param _mem the connected memory. + */ + PageTable(const std::string &name); ~PageTable(); - Addr pageAlign(Addr a) { return (a & ~offsetMask); } - Addr pageOffset(Addr a) { return (a & offsetMask); } + void setPhysMem(PhysicalMemory *_mem) { mem = _mem; } Fault page_check(Addr addr, int size) const; - void allocate(Addr vaddr, int size); - /** * Translate function * @param vaddr The virtual address. + * @param asid The address space id. * @return Physical address from translation. */ - bool translate(Addr vaddr, Addr &paddr); + Addr translate(Addr vaddr, unsigned asid); /** * Perform a translation on the memory request, fills in paddr field of mem_req. * @param req The memory request. */ - Fault translate(MemReqPtr &req); + Fault translate(CpuRequestPtr &req); }; |