13.07.2015 Views

Intel 80200 Processor based on Intel XScale Microarchitecture

Intel 80200 Processor based on Intel XScale Microarchitecture

Intel 80200 Processor based on Intel XScale Microarchitecture

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Errata39. CP15 Data Cache Unlock Command Can Cause Unlock in User Mode orwhen Flushed from the Pipe in Supervisor ModeProblem:Correct behavior for the “unlock data cache” command (mcr p15, 0, Rd, c9, c2, 1) issued in usermode, is to generate an invalid instructi<strong>on</strong> excepti<strong>on</strong> and not affect the state of the cache. Instead,the excepti<strong>on</strong> is generated, but the cache is unlocked anyway. In this case, the illegal instructi<strong>on</strong>event is generated. When the OS does not attempt to recover from illegal instructi<strong>on</strong>s, this erratumshould not be an issue.Workaround:A sec<strong>on</strong>dary effect of this erratum is, that even in a privileged mode, when an instructi<strong>on</strong> shouldexecute, the data cache unlock hardware activity can occur while the actual mcr instructi<strong>on</strong> is stillin the executi<strong>on</strong> pipeline. When an interrupt or some other event causes the instructi<strong>on</strong> to beflushed from the pipe, the hardware activity may still occur. It is likely that the instructi<strong>on</strong> executesshortly after returning from the handler, so unlocking the cache early probably would not be anissue, unless the event handler code makes an assumpti<strong>on</strong> about data cache locking.When user mode code is well c<strong>on</strong>trolled, the OS can detect that user code did the illegal operati<strong>on</strong>and report the error for software debugging purposes. Then re-code the user applicati<strong>on</strong> and tryagain.When code deliberately trying to crash the machine is a c<strong>on</strong>cern, here are possible ways to recoverif the cache is unlocked in user mode:1. When data cache locking is used with the knowledge of the OS to keep local copies of externaldata for performance, it is possible, but not graceful, for the OS to fix things. The OS woulddetect that the invalid instructi<strong>on</strong> fault was caused by a coprocessor 15 operati<strong>on</strong>, clean out thecache, and relock the data that was supposed to be locked. The offending user applicati<strong>on</strong>should be terminated.2. When data cache locking is used as part of the data cache as SRAM (allocated with theallocate data cache line operati<strong>on</strong>, rather than loading in existing memory), it becomes difficultfor the machine to recover. When any of the SRAM locati<strong>on</strong>s are evicted, external memory ata random locati<strong>on</strong> could be corrupted. One soluti<strong>on</strong> is, to immediately turn off the data cacheat the beginning of the invalid instructi<strong>on</strong> event handler, to avoid evicti<strong>on</strong>s in the cache. TheSRAM c<strong>on</strong>tents could then be copied to scratch memory, the cache cleaned and invalidated,and the SRAM reallocated and locked. At that point, the c<strong>on</strong>tents could be copied back in andoperati<strong>on</strong> could c<strong>on</strong>tinue.When early unlocking of the data cache in privileged modes is a c<strong>on</strong>cern, the following softwareworkarounds exist:1. Disable interrupts before unlocking the data cache, and ensure that no abort c<strong>on</strong>diti<strong>on</strong>s existaround the unlock code. Imprecise external data aborts and parity errors are still potentialissues, when software attempts to recover from these situati<strong>on</strong>s.2. Do not make assumpti<strong>on</strong>s about data cache lock state in the event handlers. When the eventhandler code does not require access to locked data cache regi<strong>on</strong>s, the early unlock istransparent, as the unlock mcr is executed <strong>on</strong>ce the handler is finished.Status: Fixed. Fixed <strong>on</strong> C-step. See the Table “Summary Table of Changes” <strong>on</strong> page 7.<str<strong>on</strong>g>Intel</str<strong>on</strong>g> ® <str<strong>on</strong>g>80200</str<strong>on</strong>g> <str<strong>on</strong>g>Processor</str<strong>on</strong>g> <str<strong>on</strong>g>based</str<strong>on</strong>g> <strong>on</strong> <str<strong>on</strong>g>Intel</str<strong>on</strong>g> ® <strong>XScale</strong> <strong>Microarchitecture</strong> Specificati<strong>on</strong> Update 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!