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(const 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, const RequestPtr &req, 231 ThreadContext *tc, Mode mode, |
232 Translation *translation, bool timing, bool functional, 233 bool is_secure, ArmTranslationType tranType); 234 |
235 Fault getResultTe(TlbEntry **te, const RequestPtr &req, 236 ThreadContext *tc, Mode mode, 237 Translation *translation, bool timing, |
238 bool functional, TlbEntry *mergeTe); 239 |
240 Fault checkPermissions(TlbEntry *te, const RequestPtr &req, Mode mode); 241 Fault checkPermissions64(TlbEntry *te, const RequestPtr &req, Mode mode, |
242 ThreadContext *tc); 243 244 245 /** Reset the entire TLB 246 * @param secure_lookup if the operation affects the secure world 247 */ 248 void flushAllSecurity(bool secure_lookup, uint8_t target_el, 249 bool ignore_el = false); --- 39 unchanged lines hidden (view full) --- 289 * Invalidate all entries in the stage 2 TLB that match the given ipa 290 * and the current VMID 291 * @param ipa the address to invalidate 292 * @param secure_lookup if the operation affects the secure world 293 * @param hyp if the operation affects hyp mode 294 */ 295 void flushIpaVmid(Addr ipa, bool secure_lookup, bool hyp, uint8_t target_el); 296 |
297 Fault trickBoxCheck(const RequestPtr &req, Mode mode, 298 TlbEntry::DomainType domain); |
299 |
300 Fault walkTrickBoxCheck(Addr pa, bool is_secure, Addr va, Addr sz, 301 bool is_exec, bool is_write, 302 TlbEntry::DomainType domain, 303 LookupLevel lookup_level); 304 |
305 void printTlb() const; 306 307 void demapPage(Addr vaddr, uint64_t asn) override 308 { 309 // needed for x86 only 310 panic("demapPage() is not implemented.\n"); 311 } 312 --- 6 unchanged lines hidden (view full) --- 319 * @return if the translation was successful 320 */ 321 bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr); 322 323 /** 324 * Do a functional lookup on the TLB (for checker cpu) that 325 * behaves like a normal lookup without modifying any page table state. 326 */ |
327 Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, 328 Mode mode, ArmTranslationType tranType); |
329 Fault |
330 translateFunctional(const RequestPtr &req, 331 ThreadContext *tc, Mode mode) override |
332 { 333 return translateFunctional(req, tc, mode, NormalTran); 334 } 335 336 /** Accessor functions for memory attributes for last accessed TLB entry 337 */ 338 void 339 setAttr(uint64_t attr) 340 { 341 _attr = attr; 342 } 343 344 uint64_t 345 getAttr() const 346 { 347 return _attr; 348 } 349 |
350 Fault translateFs(const RequestPtr &req, ThreadContext *tc, Mode mode, |
351 Translation *translation, bool &delay, 352 bool timing, ArmTranslationType tranType, bool functional = false); |
353 Fault translateSe(const RequestPtr &req, ThreadContext *tc, Mode mode, |
354 Translation *translation, bool &delay, bool timing); |
355 Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode, |
356 ArmTranslationType tranType); 357 Fault |
358 translateAtomic(const RequestPtr &req, 359 ThreadContext *tc, Mode mode) override |
360 { 361 return translateAtomic(req, tc, mode, NormalTran); 362 } 363 void translateTiming( |
364 const RequestPtr &req, ThreadContext *tc, |
365 Translation *translation, Mode mode, 366 ArmTranslationType tranType); 367 void |
368 translateTiming(const RequestPtr &req, ThreadContext *tc, |
369 Translation *translation, Mode mode) override 370 { 371 translateTiming(req, tc, translation, mode, NormalTran); 372 } |
373 Fault translateComplete(const RequestPtr &req, ThreadContext *tc, |
374 Translation *translation, Mode mode, ArmTranslationType tranType, 375 bool callFromS2); 376 Fault finalizePhysical( |
377 const RequestPtr &req, 378 ThreadContext *tc, Mode mode) const override; |
379 380 void drainResume() override; 381 382 // Checkpointing 383 void serialize(CheckpointOut &cp) const override; 384 void unserialize(CheckpointIn &cp) override; 385 386 void regStats() override; --- 63 unchanged lines hidden (view full) --- 450 * @param ignore_asn if the flush should ignore the asn 451 */ 452 void _flushMva(Addr mva, uint64_t asn, bool secure_lookup, 453 bool hyp, bool ignore_asn, uint8_t target_el); 454 455 bool checkELMatch(uint8_t target_el, uint8_t tentry_el, bool ignore_el); 456 457 public: /* Testing */ |
458 Fault testTranslation(const RequestPtr &req, Mode mode, |
459 TlbEntry::DomainType domain); 460 Fault testWalk(Addr pa, Addr size, Addr va, bool is_secure, Mode mode, 461 TlbEntry::DomainType domain, 462 LookupLevel lookup_level); 463}; 464 465template<typename T> 466TLB * --- 19 unchanged lines hidden --- |