tlb.hh (8733:64a7bf8fa56c) tlb.hh (8756:cce8cf3906ca)
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

--- 75 unchanged lines hidden (view full) ---

84 };
85 protected:
86
87 TlbEntry *table; // the Page Table
88 int size; // TLB Size
89
90 uint32_t _attr; // Memory attributes for last accessed TLB entry
91
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

--- 75 unchanged lines hidden (view full) ---

84 };
85 protected:
86
87 TlbEntry *table; // the Page Table
88 int size; // TLB Size
89
90 uint32_t _attr; // Memory attributes for last accessed TLB entry
91
92#if FULL_SYSTEM
93 TableWalker *tableWalker;
92 TableWalker *tableWalker;
94#endif
95
96 /** Lookup an entry in the TLB
97 * @param vpn virtual address
98 * @param asn context id/address space id to use
99 * @param functional if the lookup should modify state
100 * @return pointer to TLB entrry if it exists
101 */
102 TlbEntry *lookup(Addr vpn, uint8_t asn, bool functional = false);

--- 74 unchanged lines hidden (view full) ---

177 * and don't modify any internal state
178 * @param tc thread context to get the context id from
179 * @param vaddr virtual address to translate
180 * @param pa returned physical address
181 * @return if the translation was successful
182 */
183 bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr);
184
93
94 /** Lookup an entry in the TLB
95 * @param vpn virtual address
96 * @param asn context id/address space id to use
97 * @param functional if the lookup should modify state
98 * @return pointer to TLB entrry if it exists
99 */
100 TlbEntry *lookup(Addr vpn, uint8_t asn, bool functional = false);

--- 74 unchanged lines hidden (view full) ---

175 * and don't modify any internal state
176 * @param tc thread context to get the context id from
177 * @param vaddr virtual address to translate
178 * @param pa returned physical address
179 * @return if the translation was successful
180 */
181 bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr);
182
185 /**
186 * Do a functional lookup on the TLB (for checker cpu) that
187 * behaves like a normal lookup without modifying any page table state.
188 */
189 Fault translateFunctional(RequestPtr req, ThreadContext *tc, Mode mode);
190
191 /** Accessor functions for memory attributes for last accessed TLB entry
192 */
193 void
194 setAttr(uint32_t attr)
195 {
196 _attr = attr;
197 }
198 uint32_t
199 getAttr() const
200 {
201 return _attr;
202 }
203
183 /** Accessor functions for memory attributes for last accessed TLB entry
184 */
185 void
186 setAttr(uint32_t attr)
187 {
188 _attr = attr;
189 }
190 uint32_t
191 getAttr() const
192 {
193 return _attr;
194 }
195
204#if FULL_SYSTEM
205 Fault translateFs(RequestPtr req, ThreadContext *tc, Mode mode,
196 Fault translateFs(RequestPtr req, ThreadContext *tc, Mode mode,
206 Translation *translation, bool &delay,
207 bool timing, bool functional = false);
208#else
197 Translation *translation, bool &delay, bool timing);
209 Fault translateSe(RequestPtr req, ThreadContext *tc, Mode mode,
210 Translation *translation, bool &delay, bool timing);
198 Fault translateSe(RequestPtr req, ThreadContext *tc, Mode mode,
199 Translation *translation, bool &delay, bool timing);
211#endif
212 Fault translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode);
213 Fault translateTiming(RequestPtr req, ThreadContext *tc,
214 Translation *translation, Mode mode);
215
216 // Checkpointing
217 void serialize(std::ostream &os);
218 void unserialize(Checkpoint *cp, const std::string &section);
219

--- 40 unchanged lines hidden ---
200 Fault translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode);
201 Fault translateTiming(RequestPtr req, ThreadContext *tc,
202 Translation *translation, Mode mode);
203
204 // Checkpointing
205 void serialize(std::ostream &os);
206 void unserialize(Checkpoint *cp, const std::string &section);
207

--- 40 unchanged lines hidden ---