+/**
+ * Declaration of functional page table.
+ */
+class FuncPageTable : public PageTableBase
+{
+ private:
+ typedef std::unordered_map<Addr, TheISA::TlbEntry> PTable;
+ typedef PTable::iterator PTableItr;
+ PTable pTable;
+
+ public:
+
+ FuncPageTable(const std::string &__name, uint64_t _pid,
+ Addr _pageSize = TheISA::PageBytes);
+
+ ~FuncPageTable();
+
+ void initState(ThreadContext* tc) override
+ {
+ }
+
+ void map(Addr vaddr, Addr paddr, int64_t size,
+ uint64_t flags = 0) override;
+ void remap(Addr vaddr, int64_t size, Addr new_vaddr) override;
+ void unmap(Addr vaddr, int64_t size) override;
+
+ /**
+ * Check if any pages in a region are already allocated
+ * @param vaddr The starting virtual address of the region.
+ * @param size The length of the region.
+ * @return True if no pages in the region are mapped.
+ */
+ bool isUnmapped(Addr vaddr, int64_t size) override;
+
+ /**
+ * Lookup function
+ * @param vaddr The virtual address.
+ * @return entry The page table entry corresponding to vaddr.
+ */
+ bool lookup(Addr vaddr, TheISA::TlbEntry &entry) override;
+
+ void serialize(CheckpointOut &cp) const override;
+ void unserialize(CheckpointIn &cp) override;
+};