Deleted Added
sdiff udiff text old ( 7406:ddc26bd4ea7d ) new ( 7436:b578349f9371 )
full compact
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

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

63 /** Type of page table entry ARM DDI 0406B: B3-8*/
64 enum EntryType {
65 Ignore,
66 PageTable,
67 Section,
68 Reserved
69 };
70
71 uint32_t data;
72
73 EntryType type() const
74 {
75 return (EntryType)(data & 0x3);
76 }
77
78 /** Is the page a Supersection (16MB)?*/
79 bool supersection() const
80 {

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

122 }
123
124 /** Address of L2 descriptor if it exists */
125 Addr l2Addr() const
126 {
127 return mbits(data, 31,10);
128 }
129
130 /** Memory region attributes: ARM DDI 0406B: B3-32 */
131 uint8_t texcb() const
132 {
133 return bits(data, 2) | bits(data,3) << 1 | bits(data, 14, 12) << 2;
134 }
135
136 };
137
138 /** Level 2 page table descriptor */
139 struct L2Descriptor {
140
141 uint32_t data;
142
143 /** Is the entry invalid */
144 bool invalid() const
145 {
146 return bits(data, 1,0) == 0;;
147 }
148
149 /** What is the size of the mapping? */
150 bool large() const

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

179 }
180
181 /** Return the physical frame, bits shifted right */
182 Addr pfn() const
183 {
184 return large() ? bits(data, 31, 16) : bits(data, 31, 12);
185 }
186
187 };
188
189 /** Port to issue translation requests from */
190 DmaPort *port;
191
192 /** TLB that is initiating these table walks */
193 TLB *tlb;
194

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

247
248 virtual unsigned int drain(Event *de) { panic("write me\n"); }
249 virtual Port *getPort(const std::string &if_name, int idx = -1);
250
251 Fault walk(RequestPtr req, ThreadContext *tc, uint8_t cid, TLB::Mode mode,
252 TLB::Translation *_trans, bool timing);
253
254 void setTlb(TLB *_tlb) { tlb = _tlb; }
255
256 private:
257 void memAttrs(TlbEntry &te, uint8_t texcb);
258
259 void doL1Descriptor();
260 EventWrapper<TableWalker, &TableWalker::doL1Descriptor> doL1DescEvent;
261
262 void doL2Descriptor();
263 EventWrapper<TableWalker, &TableWalker::doL2Descriptor> doL2DescEvent;
264
265
266};
267
268
269} // namespace ArmISA
270
271#endif //__ARCH_ARM_TABLE_WALKER_HH__
272