Deleted Added
sdiff udiff text old ( 12735:e3da526a0654 ) new ( 12749:223c83ed9979 )
full compact
1/*
2 * Copyright (c) 2010-2013, 2016 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

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

72 /**
73 * Check if a TLB translation should be forced to fail.
74 *
75 * @param req Request requiring a translation.
76 * @param is_priv Access from a privileged mode (i.e., not EL0)
77 * @param mode Access type
78 * @param domain Domain type
79 */
80 virtual Fault translationCheck(RequestPtr req, bool is_priv,
81 BaseTLB::Mode mode,
82 TlbEntry::DomainType domain) = 0;
83
84 /**
85 * Check if a page table walker access should be forced to fail.
86 *
87 * @param pa Physical address the walker is accessing
88 * @param size Walker access size

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

222 TableWalker *getTableWalker() { return tableWalker; }
223
224 void setMMU(Stage2MMU *m, MasterID master_id);
225
226 int getsize() const { return size; }
227
228 void insert(Addr vaddr, TlbEntry &pte);
229
230 Fault getTE(TlbEntry **te, RequestPtr req, ThreadContext *tc, Mode mode,
231 Translation *translation, bool timing, bool functional,
232 bool is_secure, ArmTranslationType tranType);
233
234 Fault getResultTe(TlbEntry **te, RequestPtr req, ThreadContext *tc,
235 Mode mode, Translation *translation, bool timing,
236 bool functional, TlbEntry *mergeTe);
237
238 Fault checkPermissions(TlbEntry *te, RequestPtr req, Mode mode);
239 Fault checkPermissions64(TlbEntry *te, RequestPtr req, Mode mode,
240 ThreadContext *tc);
241
242
243 /** Reset the entire TLB
244 * @param secure_lookup if the operation affects the secure world
245 */
246 void flushAllSecurity(bool secure_lookup, uint8_t target_el,
247 bool ignore_el = false);

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

287 * Invalidate all entries in the stage 2 TLB that match the given ipa
288 * and the current VMID
289 * @param ipa the address to invalidate
290 * @param secure_lookup if the operation affects the secure world
291 * @param hyp if the operation affects hyp mode
292 */
293 void flushIpaVmid(Addr ipa, bool secure_lookup, bool hyp, uint8_t target_el);
294
295 Fault trickBoxCheck(RequestPtr req, Mode mode, TlbEntry::DomainType domain);
296 Fault walkTrickBoxCheck(Addr pa, bool is_secure, Addr va, Addr sz, bool is_exec,
297 bool is_write, TlbEntry::DomainType domain, LookupLevel lookup_level);
298
299 void printTlb() const;
300
301 void demapPage(Addr vaddr, uint64_t asn) override
302 {
303 // needed for x86 only
304 panic("demapPage() is not implemented.\n");
305 }
306

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

313 * @return if the translation was successful
314 */
315 bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr);
316
317 /**
318 * Do a functional lookup on the TLB (for checker cpu) that
319 * behaves like a normal lookup without modifying any page table state.
320 */
321 Fault translateFunctional(RequestPtr req, ThreadContext *tc, Mode mode,
322 ArmTranslationType tranType);
323 Fault
324 translateFunctional(RequestPtr req, ThreadContext *tc, Mode mode) override
325 {
326 return translateFunctional(req, tc, mode, NormalTran);
327 }
328
329 /** Accessor functions for memory attributes for last accessed TLB entry
330 */
331 void
332 setAttr(uint64_t attr)
333 {
334 _attr = attr;
335 }
336
337 uint64_t
338 getAttr() const
339 {
340 return _attr;
341 }
342
343 Fault translateFs(RequestPtr req, ThreadContext *tc, Mode mode,
344 Translation *translation, bool &delay,
345 bool timing, ArmTranslationType tranType, bool functional = false);
346 Fault translateSe(RequestPtr req, ThreadContext *tc, Mode mode,
347 Translation *translation, bool &delay, bool timing);
348 Fault translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode,
349 ArmTranslationType tranType);
350 Fault
351 translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode) override
352 {
353 return translateAtomic(req, tc, mode, NormalTran);
354 }
355 void translateTiming(
356 RequestPtr req, ThreadContext *tc,
357 Translation *translation, Mode mode,
358 ArmTranslationType tranType);
359 void
360 translateTiming(RequestPtr req, ThreadContext *tc,
361 Translation *translation, Mode mode) override
362 {
363 translateTiming(req, tc, translation, mode, NormalTran);
364 }
365 Fault translateComplete(RequestPtr req, ThreadContext *tc,
366 Translation *translation, Mode mode, ArmTranslationType tranType,
367 bool callFromS2);
368 Fault finalizePhysical(
369 RequestPtr req, ThreadContext *tc, Mode mode) const override;
370
371 void drainResume() override;
372
373 // Checkpointing
374 void serialize(CheckpointOut &cp) const override;
375 void unserialize(CheckpointIn &cp) override;
376
377 void regStats() override;

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

441 * @param ignore_asn if the flush should ignore the asn
442 */
443 void _flushMva(Addr mva, uint64_t asn, bool secure_lookup,
444 bool hyp, bool ignore_asn, uint8_t target_el);
445
446 bool checkELMatch(uint8_t target_el, uint8_t tentry_el, bool ignore_el);
447
448 public: /* Testing */
449 Fault testTranslation(RequestPtr req, Mode mode,
450 TlbEntry::DomainType domain);
451 Fault testWalk(Addr pa, Addr size, Addr va, bool is_secure, Mode mode,
452 TlbEntry::DomainType domain,
453 LookupLevel lookup_level);
454};
455
456template<typename T>
457TLB *

--- 19 unchanged lines hidden ---