1/* 2 * Copyright (c) 2014 Advanced Micro Devices, Inc. 3 * Copyright (c) 2003 The Regents of The University of Michigan 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 180 unchanged lines hidden (view full) --- 189 if (pTableCache[0].valid && pTableCache[0].vaddr == vaddr) { 190 pTableCache[0].valid = false; 191 } else if (pTableCache[1].valid && pTableCache[1].vaddr == vaddr) { 192 pTableCache[1].valid = false; 193 } else if (pTableCache[2].valid && pTableCache[2].vaddr == vaddr) { 194 pTableCache[2].valid = false; 195 } 196 } |
197 198 virtual void getMappings(std::vector<std::pair<Addr, Addr>> 199 *addr_mappings) {}; |
200}; 201 202/** 203 * Declaration of functional page table. 204 */ 205class FuncPageTable : public PageTableBase 206{ 207 private: --- 29 unchanged lines hidden (view full) --- 237 * Lookup function 238 * @param vaddr The virtual address. 239 * @return entry The page table entry corresponding to vaddr. 240 */ 241 bool lookup(Addr vaddr, TheISA::TlbEntry &entry) override; 242 243 void serialize(CheckpointOut &cp) const override; 244 void unserialize(CheckpointIn &cp) override; |
245 246 void getMappings(std::vector<std::pair<Addr, Addr>> *addr_maps) override; |
247}; 248 249/** 250 * Faux page table class indended to stop the usage of 251 * an architectural page table, when there is none defined 252 * for a particular ISA. 253 */ 254class NoArchPageTable : public FuncPageTable 255{ 256 public: 257 NoArchPageTable(const std::string &__name, uint64_t _pid, System *_sys, 258 Addr _pageSize = TheISA::PageBytes) : FuncPageTable(__name, _pid) 259 { 260 fatal("No architectural page table defined for this ISA.\n"); 261 } 262}; 263 264#endif // __MEM_PAGE_TABLE_HH__ |