05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

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.

Debug State<br />

C5.8 Memory system behavior in Debug state<br />

The Debug architecture places requirements on the memory system. There are two general guidelines:<br />

Memory coherency has to be maintained during debugging.<br />

It is best if debugging is non-intrusive. This requires a way to preserve, for example, the contents of<br />

memory caches <strong>and</strong> translation lookaside buffers (TLBs), so the state of the target application is not<br />

altered.<br />

In Debug state, it is strongly recommended that the caches <strong>and</strong> TLBs, where implemented, behave as<br />

described here. For preservation purposes it is strongly recommended that it is possible to:<br />

disable cache evictions <strong>and</strong> linefills, so that cache accesses, on read or write, do not cause the contents<br />

of caches to change.<br />

disable TLB evictions <strong>and</strong> replacements, so that translations do not cause the contents of TLBs to<br />

change.<br />

The mechanisms for disabling these operations:<br />

must be accessible by the external debugger<br />

are only required when in Debug state.<br />

In v6.1 Debug <strong>and</strong> v7 Debug, the Debug State Cache Control Register (DBGDSCCR) <strong>and</strong> the Debug State<br />

MMU Control Register (DBGDSMCR) are used for this purpose.<br />

While the processor is in Debug state, no instruction fetches occur <strong>and</strong> therefore:<br />

if the system implements separate instruction <strong>and</strong> data caches then there might be no instruction<br />

cache evictions or replacements<br />

if the system implements separate instruction <strong>and</strong> data TLBs then there might be no instruction TLB<br />

evictions or replacements.<br />

In Debug state, reads must behave as in Non-debug state:<br />

cache reads return data from the cache<br />

cache misses fetch from external memory.<br />

A debugger must be able to maintain coherency between instruction <strong>and</strong> data memory, <strong>and</strong> maintain<br />

coherency in a multiprocessor system. This means that in Debug state a debugger must be able to force all<br />

writes to update all levels of memory to the point of coherency.<br />

It must be possible to reset the memory system of the processor to a known safe <strong>and</strong> coherent state. Also, it<br />

must be possible to reset any caches of meta-information, such as branch predictor arrays, to a safe <strong>and</strong><br />

coherent state.<br />

For debugging purposes <strong>ARM</strong> recommends that TLBs can be disabled so that all TLB accesses are read<br />

from the main translation tables, <strong>and</strong> not from the TLB. This enables a debugger to access memory without<br />

using any virtual to physical memory mapping that is implemented for the application.<br />

C5-24 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B

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

Saved successfully!

Ooh no, something went wrong!