page_table.hh (11800:54436a1784dc) | page_table.hh (11886:43b882cada33) |
---|---|
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 } | 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) {}; |
|
197}; 198 199/** 200 * Declaration of functional page table. 201 */ 202class FuncPageTable : public PageTableBase 203{ 204 private: --- 29 unchanged lines hidden (view full) --- 234 * Lookup function 235 * @param vaddr The virtual address. 236 * @return entry The page table entry corresponding to vaddr. 237 */ 238 bool lookup(Addr vaddr, TheISA::TlbEntry &entry) override; 239 240 void serialize(CheckpointOut &cp) const override; 241 void unserialize(CheckpointIn &cp) override; | 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; |
|
242}; 243 244/** 245 * Faux page table class indended to stop the usage of 246 * an architectural page table, when there is none defined 247 * for a particular ISA. 248 */ 249class NoArchPageTable : public FuncPageTable 250{ 251 public: 252 NoArchPageTable(const std::string &__name, uint64_t _pid, System *_sys, 253 Addr _pageSize = TheISA::PageBytes) : FuncPageTable(__name, _pid) 254 { 255 fatal("No architectural page table defined for this ISA.\n"); 256 } 257}; 258 259#endif // __MEM_PAGE_TABLE_HH__ | 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__ |