tlb.hh (7678:f19b6a3a8cec) tlb.hh (7694:de057cccee82)
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

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

92
93 uint32_t _attr; // Memory attributes for last accessed TLB entry
94
95#if FULL_SYSTEM
96 TableWalker *tableWalker;
97#endif
98
99 void nextnlu() { if (++nlu >= size) nlu = 0; }
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

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

92
93 uint32_t _attr; // Memory attributes for last accessed TLB entry
94
95#if FULL_SYSTEM
96 TableWalker *tableWalker;
97#endif
98
99 void nextnlu() { if (++nlu >= size) nlu = 0; }
100 TlbEntry *lookup(Addr vpn, uint8_t asn);
100 /** Lookup an entry in the TLB
101 * @param vpn virtual address
102 * @param asn context id/address space id to use
103 * @param functional if the lookup should modify state
104 * @return pointer to TLB entrry if it exists
105 */
106 TlbEntry *lookup(Addr vpn, uint8_t asn, bool functional = false);
101
102 // Access Stats
103 mutable Stats::Scalar read_hits;
104 mutable Stats::Scalar read_misses;
105 mutable Stats::Scalar read_acv;
106 mutable Stats::Scalar read_accesses;
107 mutable Stats::Scalar write_hits;
108 mutable Stats::Scalar write_misses;

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

149
150 void demapPage(Addr vaddr, uint64_t asn)
151 {
152 flushMvaAsid(vaddr, asn);
153 }
154
155 static bool validVirtualAddress(Addr vaddr);
156
107
108 // Access Stats
109 mutable Stats::Scalar read_hits;
110 mutable Stats::Scalar read_misses;
111 mutable Stats::Scalar read_acv;
112 mutable Stats::Scalar read_accesses;
113 mutable Stats::Scalar write_hits;
114 mutable Stats::Scalar write_misses;

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

155
156 void demapPage(Addr vaddr, uint64_t asn)
157 {
158 flushMvaAsid(vaddr, asn);
159 }
160
161 static bool validVirtualAddress(Addr vaddr);
162
163 /**
164 * Do a functional lookup on the TLB (for debugging)
165 * and don't modify any internal state
166 * @param tc thread context to get the context id from
167 * @param vaddr virtual address to translate
168 * @param pa returned physical address
169 * @return if the translation was successful
170 */
171 bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr);
172
157 /** Accessor functions for memory attributes for last accessed TLB entry
158 */
159 void
160 setAttr(uint32_t attr)
161 {
162 _attr = attr;
163 }
164 uint32_t

--- 26 unchanged lines hidden ---
173 /** Accessor functions for memory attributes for last accessed TLB entry
174 */
175 void
176 setAttr(uint32_t attr)
177 {
178 _attr = attr;
179 }
180 uint32_t

--- 26 unchanged lines hidden ---