diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-02-20 20:53:38 -0500 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-02-20 20:53:38 -0500 |
commit | b74f1b829d14e43256fb4a9efd3b951e81ad12d2 (patch) | |
tree | 5ba0c72e135db1abe31d579e825b31c3cbb19179 /mem/page_table.hh | |
parent | d142788172ee79e6e67fc8510940c884807305ad (diff) | |
download | gem5-b74f1b829d14e43256fb4a9efd3b951e81ad12d2.tar.xz |
Revert PageTable code back to non-asid version.
mem/page_table.cc:
mem/page_table.hh:
Revert back to non-asid version.
--HG--
extra : convert_revision : c8e8810584d4cf12eb86da43ab77ddf8551a9e6b
Diffstat (limited to 'mem/page_table.hh')
-rw-r--r-- | mem/page_table.hh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/mem/page_table.hh b/mem/page_table.hh index 7e534899f..d318783be 100644 --- a/mem/page_table.hh +++ b/mem/page_table.hh @@ -42,44 +42,44 @@ #include "mem/packet.hh" #include "sim/sim_object.hh" -class PhysicalMemory; +class System; /** * Page Table Decleration. */ -class PageTable : public SimObject +class PageTable { protected: std::map<Addr,Addr> pTable; - PhysicalMemory *mem; + const Addr pageSize; + const Addr offsetMask; + + System *system; public: - /** - * 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(System *_system, Addr _pageSize = VMPageSize); ~PageTable(); - void setPhysMem(PhysicalMemory *_mem) { mem = _mem; } + Addr pageAlign(Addr a) { return (a & ~offsetMask); } + Addr pageOffset(Addr a) { return (a & offsetMask); } 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. */ - Addr translate(Addr vaddr, unsigned asid); + bool translate(Addr vaddr, Addr &paddr); /** - * Perform a translation on the memory request, fills in paddr field of mem_req. + * Perform a translation on the memory request, fills in paddr + * field of mem_req. * @param req The memory request. */ Fault translate(CpuRequestPtr &req); |