Intel IXC1100 用户手册

下载
页码 568
Intel
®
 IXP42X Product Line of Network Processors and IXC1100 Control Plane Processor
September 2006
DM
Order Number: 252480-006US
129
Intel XScale
®
 Processor—Intel
®
 IXP42X product line and IXC1100 control plane processors
3.6.15.2.3
Dynamic Debug Handler
On the IXP42X product line and IXC1100 control plane processors, the debug handler 
and override vector tables reside in the 2-Kbyte, mini instruction cache, separate from 
the main instruction cache. A “static” Debug Handler is downloaded during reset. This 
is the base handler code, necessary to do common operations such as handler entry/
exit, parse commands from the debugger, read/write ARM registers, read/write 
memory, etc. 
Some functions may require large amounts of code or may not be used very often. As 
long as there is space in the mini-instruction cache, these functions can be downloaded 
as part of the static Debug Handler. However, if space is limited, the debug handler also 
has a dynamic capability that allows a function to be downloaded when it is needed. 
There are three methods for implementing a dynamic debug handler (using the mini 
instruction cache, main instruction cache, or external memory). Each method has their 
limitations and advantages
 
describes how do dynamically load the mini or main instruction cache.
• Using the Mini IC
The static debug handler can support a command which can have functionality 
dynamically mapped to it. This dynamic command does not have any specific 
functionality associated with it until the debugger downloads a function into the 
mini instruction cache. When the debugger sends the dynamic command to the 
handler, new functionality can be downloaded, or the previously downloaded 
functionality can be used. 
There are also variations in which the debug handler supports multiple dynamic 
commands, each mapped to a different dynamic function; or a single dynamic 
command that can branch to one of several downloaded dynamic functions based 
on a parameter passed by the debugger.
Debug Handlers that allow code to be dynamically downloaded into the mini 
instruction cache must be carefully written to avoid inadvertently overwriting a 
critical piece of debug handler code. Dynamic code is downloaded to the way 
pointed to by the round-robin pointer. Thus, it is possible for critical debug handler 
code to be overwritten, if the pointer does not select the expected way. 
To avoid this problem, the debug handler should be written to avoid placing critical 
code in either way of a set that is intended for dynamic code download. This allows 
code to be downloaded into either way, and the only code that is overwritten is the 
previously downloaded dynamic function. This method requires that space within 
the mini instruction cache be allocated for dynamic download, limiting the space 
available for the static Debug Handler. Also, the space available may not be suitable 
for a larger dynamic function. 
Once downloaded, a dynamic function essentially becomes part of the Debug 
Handler. Since it is in the mini instruction cache, it does not get overwritten by 
application code. It remains in the cache until it is replaced by another dynamic 
function or the lines where it is downloaded are invalidated. 
• Using  the  Main  IC.
The steps for downloading dynamic functions into the main instruction cache is 
similar to downloading into the mini instruction cache. However, using the main 
instruction cache has its advantages.
Using the main instruction cache eliminates the problem of inadvertently 
overwriting static Debug Handler code by writing to the wrong way of a set, since 
the main and mini instruction caches are separate. The debug handler code does 
not need to be specially mapped out to avoid this problem. Also, space for dynamic 
functions does not need to be allocated in the mini instruction cache and dynamic 
functions are not limited to the size allocated.
The dynamic function can actually be downloaded anywhere in the address space. 
The debugger specifies the location of the dynamic function by writing the address 
to RX when it signals to the handler to continue. The debug handler then does a 
branch-and-link to that address.