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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

When Monitor debug-mode is configured, abort vector catches are ignored in v6 Debug<br />

// <strong>and</strong> v6.1 Debug, but UNPREDICTABLE in v7 Debug.<br />

if a_match && DBGDSCR == ‘10’ then<br />

if UInt(DBGDIDR.Version) < 3 then<br />

a_match = FALSE;<br />

else<br />

UNPREDICTABLE;<br />

return match || a_match;<br />

Watchpoints<br />

Debug Events<br />

If invasive debug is enabled, the Debug_CheckDataAccess() function checks WRP matches for each data<br />

access. If the implementation includes IMPLEMENTATION DEFINED support for watchpoint generation on<br />

memory hint operations, or on cache maintenance operations, the function also checks for WRP matches on<br />

the appropriate operations. If a match is found the function calls WatchpointDebugEvent(). If the debug event<br />

is not permitted, it is ignored by the processor.<br />

On a simple sequential execution model:<br />

for a synchronous watchpoint, the Debug_CheckDataAccess() test is made before the data access<br />

for an asynchronous watchpoint, the Debug_CheckDataAccess() test is made after the data access.<br />

For more information see Synchronous <strong>and</strong> Asynchronous Watchpoint debug events on page C3-18.<br />

The WRPMatch() function checks an individual WRP match. In <strong>ARM</strong>v7, it is IMPLEMENTATION DEFINED<br />

whether WRP matches use eight byte lanes or four. The WRPUsesEightByteLanes() function returns TRUE if<br />

they use eight byte lanes <strong>and</strong> FALSE if they use four. Using eight byte lanes is permitted only in <strong>ARM</strong>v7.<br />

boolean WRPUsesEightByteLanes()<br />

For these functions the parameters read, write, privileged <strong>and</strong> secure are determined at the point the access<br />

is made, <strong>and</strong> not from the state of the processor at the point where WRPMatch() is executed. For swaps,<br />

read = write =TRUE.<br />

// Debug_CheckDataAccess()<br />

// =======================<br />

boolean Debug_CheckDataAccess(bits(32) address, integer size, boolean read,<br />

boolean write, boolean privileged, boolean secure)<br />

// Do nothing if debug disabled;<br />

if DBGDSCR == ‘00’ then return;<br />

match = FALSE;<br />

// Each byte accessed by the data access is checked<br />

for byte = address to address + size - 1<br />

for N = 0 to UInt(DBGDIDR.WRPs)<br />

if WRPMatch(N, byte, read, write, privileged, secure) then match = TRUE;<br />

if match then WatchpointDebugEvent();<br />

return;<br />

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

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

Saved successfully!

Ooh no, something went wrong!