tlb.hh (7406:ddc26bd4ea7d) | tlb.hh (7436:b578349f9371) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 74 unchanged lines hidden (view full) --- 83 protected: 84 typedef std::multimap<Addr, int> PageTable; 85 PageTable lookupTable; // Quick lookup into page table 86 87 TlbEntry *table; // the Page Table 88 int size; // TLB Size 89 int nlu; // not last used entry (for replacement) 90 | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 74 unchanged lines hidden (view full) --- 83 protected: 84 typedef std::multimap<Addr, int> PageTable; 85 PageTable lookupTable; // Quick lookup into page table 86 87 TlbEntry *table; // the Page Table 88 int size; // TLB Size 89 int nlu; // not last used entry (for replacement) 90 |
91 uint32_t _attr; // Memory attributes for last accessed TLB entry 92 |
|
91#if FULL_SYSTEM 92 TableWalker *tableWalker; 93#endif 94 95 void nextnlu() { if (++nlu >= size) nlu = 0; } 96 TlbEntry *lookup(Addr vpn, uint8_t asn); 97 98 // Access Stats --- 47 unchanged lines hidden (view full) --- 146 147 void demapPage(Addr vaddr, uint64_t asn) 148 { 149 flushMvaAsid(vaddr, asn); 150 } 151 152 static bool validVirtualAddress(Addr vaddr); 153 | 93#if FULL_SYSTEM 94 TableWalker *tableWalker; 95#endif 96 97 void nextnlu() { if (++nlu >= size) nlu = 0; } 98 TlbEntry *lookup(Addr vpn, uint8_t asn); 99 100 // Access Stats --- 47 unchanged lines hidden (view full) --- 148 149 void demapPage(Addr vaddr, uint64_t asn) 150 { 151 flushMvaAsid(vaddr, asn); 152 } 153 154 static bool validVirtualAddress(Addr vaddr); 155 |
156 /** Accessor functions for memory attributes for last accessed TLB entry 157 */ 158 void 159 setAttr(uint32_t attr) 160 { 161 _attr = attr; 162 } 163 uint32_t 164 getAttr() const 165 { 166 return _attr; 167 } 168 |
|
154#if FULL_SYSTEM 155 Fault translateFs(RequestPtr req, ThreadContext *tc, Mode mode, 156 Translation *translation, bool &delay, bool timing); 157#else 158 Fault translateSe(RequestPtr req, ThreadContext *tc, Mode mode, 159 Translation *translation, bool &delay, bool timing); 160#endif 161 Fault translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode); --- 13 unchanged lines hidden --- | 169#if FULL_SYSTEM 170 Fault translateFs(RequestPtr req, ThreadContext *tc, Mode mode, 171 Translation *translation, bool &delay, bool timing); 172#else 173 Fault translateSe(RequestPtr req, ThreadContext *tc, Mode mode, 174 Translation *translation, bool &delay, bool timing); 175#endif 176 Fault translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode); --- 13 unchanged lines hidden --- |