📄 adp.h
字号:
#define ADP_CPUread_32bitUndef (0x1B)
/* #32bit System mode - Added in Architecture 4 ARMs e.g.ARM7TDMI */
#define ADP_CPUread_32bitSystem (0x1F)
/* 'mask':- */
/* Request registers RO-R14. */
#define ADP_CPUread_RegsMask (0x7FFF)
/* Request Program Counter (including mode and flag bits in 26-bit modes. */
#define ADP_CPUread_PCmode (1 << 15)
/* Request Program Counter (without mode and flag bits in 26-bit modes. */
#define ADP_CPUread_PCnomode (1 << 16)
/* Requests the transfer of the CPSR */
#define ADP_CPUread_CPSR (1 << 17)
/* In processor modes with an SPSR(non-user modes), bit 19 requests its
transfer */
#define ADP_CPUread_SPSR (1 << 18)
#define ADP_CPUwrite ADPREASON(CI_HADP,6)
/* ADP_CPUwrite
* ------------
* Summary: This is a request to write values to the CPU.
*
* Arguments:
* Send: (byte mode, word mask, words data)
* Return: (word status)
*
* 'mode' defines the processor mode to which the transfer should be made.
* The mode number is the same as the mode number used by ARM; a value of
* 255 indicates the current mode. See ADP_CPUread above for more detail.
* 'mask' indicates which registers should be transferred. Setting a bit to
* one will cause the designated register to be transferred. The details
* of mask are specified above in ADP_CPUread.
* 'data' holds the values of the registers to be transferred. The first
* value is written to the lowest numbered register. NOTE: data must not
* cause the buffer size to exceed the maximum allowed buffer size.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*/
#define ADP_CPread ADPREASON(CI_HADP,7)
/* ADP_CPread
* ----------
* Summary: This message requests a co-processors internal state.
*
* Arguments:
* Send: (byte CPnum, word mask)
* Return: (word status, words data)
*
* 'CPnum' is the number of the co-processor to transfer values from.
* 'mask' specifies which registers to transfer and is co-processor
* specific.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'data' holds the registers specified in 'mask' if successful, otherwise
* just rubbish. The lowest numbered register is transferred first.
* NOTE: data must not cause the buffer size to exceed the maximum allowed
* buffer size.
*/
#define ADP_CPwrite ADPREASON(CI_HADP,8)
/* ADP_CPwrite
* -----------
* Summary: This message requests a write to a co-processors internal state.
*
* Arguments:
* Send: (byte CPnum, word mask, words data)
* Return: (word status)
*
* 'CPnum' is the number of the co-processor to transfer values to.
* 'mask' specifies which registers to transfer and is co-processor
* specific.
* 'data' holds the values to transfer to the registers specified in 'mask'.
* The first value is written to the lowest numbered register.
* NOTE: data must not cause the buffer size to exceed the maximum allowed
* buffer size.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*/
#define ADP_SetBreak ADPREASON(CI_HADP,9)
/* ADP_SetBreak
* ------------
* Summary: Sets a breakpoint.
*
* Arguments:
* Send: (word address, byte type [, word bound])
* Return: (word status, word pointhandle, word raddress, word rbound)
*
* 'address' is the address of the instruction to set the breakpoint on.
* 'type' specifies the sort of breakpoint and is described in more detail
* below.
* 'bound' is included if the least significant 4 bits of type are set to
* 5 or above (see below for more detail).
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'pointhandle' returns a handle to the breakpoint, it will be valid if bit
* 7 of 'type' is set. See below for more detail.
* 'raddress' is valid depending on 'type', see below for more detail.
* 'rbound' is valid depending on 'type', see below for more detail.
*/
/* 'type':- */
/* The least significant 4 bits define the sort of breakpoint to set:- */
/* Halt if the pc is equal to 'address'. */
#define ADP_SetBreak_EqualsAddress (0)
/* Halt if the pc is greater than 'address'. */
#define ADP_SetBreak_GreaterAddress (1)
/* Halt if the pc is greater than or equal to 'address'. */
#define ADP_SetBreak_GEqualsAddress (2)
/* Halt if the pc is less than 'address'. */
#define ADP_SetBreak_LessAddress (3)
/* Halt if the pc is less than or equal to 'address'. */
#define ADP_SetBreak_LEqualsAddress (4)
/* Halt if the pc is in the range from 'address' to 'bound' inclusive. */
#define ADP_SetBreak_Range (5)
/* Halt if the pc is not in the range from 'address' to 'bound' inclusive. */
#define ADP_SetBreak_NotRange (6)
/* Halt if (pc & 'bound') = 'address'. */
#define ADP_SetBreak_AndBound (7)
/* Bits 5,6 and 7 are used as follows :- */
/* If set this indicates that the breakpoint is on a 16bit (Thumb)
instruction rather than a 32bit (ARM) instruction. */
#define ADP_SetBreak_Thumb (1 << 4)
/* This requests that the breakpoint should be conditional (execution halts
only if the breakpointed instruction is executed, not if it is
conditionally skipped). If bit 5 is not set, execution halts whenever
the breakpointed instruction is reached (whether executed or skipped). */
#define ADP_SetBreak_Cond (1 << 5)
/* This requests a dry run: the breakpoint is not set and the 'raddress', and
if appropriate the 'rbound', that would be used, are returned (for
comparison and range breakpoints the address and bound used need not be
exactly as requested). A RDIError_NoError 'status' byte indicates that
resources are currently available to set the breakpoint, non-zero
indicates an error. RDIError_NoMorePoints indicates that the required
breakpoint resources are not currently available. */
#define ADP_SetBreak_DryRun (1 << 6)
/* If the request is successful, but there are no more breakpoint registers
(of the requested type), then the value RDIError_NoMorePoints is
returned. */
/* If a breakpoint is set on a location which already has a breakpoint, the
first breakpoint will be removed before the new breakpoint is set. */
#define ADP_ClearBreak ADPREASON(CI_HADP,10)
/* ADP_ClearBreak
* --------------
* Summary: Clears a breakpoint.
*
* Arguments:
* Send: (word pointhandle)
* Return: (word status)
*
* 'pointhandle' is a handle returned by a previous ADP_SetBreak.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*/
#define ADP_SetWatch ADPREASON(CI_HADP,11)
/* ADP_SetWatch
* ------------
* Summary: Sets a watchpoint.
*
* Arguments:
* Send: (word address, byte type, byte datatype [,word bound])
* Return: (word status, word pointhandle, word raddress, word rbound)
*
* 'address' is the address at which to set the watchpoint.
* 'type' is the type of watchpoint to set and is described in detail below.
* 'datatype' defines the sort of data access to watch for and is described
* in more detail below.
* 'bound' is included depending on the value of type (see description of
* type below).
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'pointhandle' is valid depending on the value of type (see description
* of type below).
* 'raddress' is valid depending on the value of type (see description
* of type below).
* 'rbound' is valid depending on the value of type (see description
* of type below).
*/
/* 'type':- */
/* The least significant 4 bits of 'type' define the sort of watchpoint to
set:- */
/* Halt on a data access to the address equal to 'address'. */
#define ADP_SetWatch_EqualsAddress (0)
/* Halt on a data access to an address greater than 'address'. */
#define ADP_SetWatch_GreaterAddress (1)
/* Halt on a data access to an address greater than or equal to 'address'. */
#define ADP_SetWatch_GEqualsAddress (2)
/* Halt on a data access to an address less than 'address'. */
#define ADP_SetWatch_LessAddress (3)
/* Halt on a data access to an address less than or equal to 'address'. */
#define ADP_SetWatch_LEqualsAddress (4)
/* Halt on a data access to an address in the range from 'address' to
'bound' inclusive. */
#define ADP_SetWatch_Range (5)
/* Halt on a data access to an address not in the range from 'address' to
'bound' inclusive. */
#define ADP_SetWatch_NotRange (6)
/* Halt if (data-access-address & 'bound')='address'. */
#define ADP_SetWatch_AndBound (7)
/* Bits 6 and 7 of 'type' also have further significance:-
NOTE: they must not be simulataneously set. */
/* Bit 6 of 'type' set: Requests a dry run: the watchpoint is not set and
the 'address' and, if appropriate, the 'bound', that would be used are
returned (for range and comparison watchpoints, the 'address' and 'bound'
used need not be exactly as requested). A RDIError_NoError status byte
indicates that resources are currently available to set the watchpoint;
RDIError_NoMorePoints indicates that the required watchpoint resources
are not currently available. */
/* Bit 7 of 'type' set: Requests that a handle should be returned for the
watchpoint by which it will be identified subsequently. If bit 7 is
set, a handle will be returned ('pointhandle'), whether or not the
request succeeds or fails (but, obviously, it will only be meaningful
if the request succeesd). */
/* 'datatype':- */
/* The 'datatype' argument defines the sort of data access to watch for,
values can be summed or ORed together to halt on any set of sorts of
memory access. */
/* Watch for byte reads. */
#define ADP_SetWatch_ByteReads (1)
/* Watch for half-word reads. */
#define ADP_SetWatch_HalfWordReads (2)
/* Watch for word reads. */
#define ADP_SetWatch_WordReads (4)
/* Watch for half-word reads. */
#define ADP_SetWatch_ByteWrites (8)
/* Watch for half-word reads. */
#define ADP_SetWatch_HalfWordWrites (16)
/* Watch for half-word reads. */
#define ADP_SetWatch_WordWrites (32)
/* On successful completion a RDIError_NoError 'status' byte is returned. On
unsuccessful completion, a non-zero error code byte is returned. If the
request is successful, but there are now no more watchpoint registers
(of the requested type), then the value RDIError_NoMorePoints is
returned. */
/* If a watchpoint is set on a location which already has a watchpoint, the
first watchpoint will be removed before the new watchpoint is set. */
#define ADP_ClearWatch ADPREASON(CI_HADP,12)
/* ADP_ClearWatch
* --------------
* Summary: Clears a watchpoint.
*
* Arguments:
* Send: (word pointhandle)
* Return: (word status)
*
* 'pointhandle' is a handle to a watchpoint returned by a previous
* ADP_SetWatch.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*/
#define ADP_Execute ADPREASON(CI_HADP,13)
/* ADP_Execute
* -----------
* Summary: This message requests that the target starts executing from
* the stored CPU state.
*
* Arguments:
* Send: ()
* Return: (word status)
*
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* The message will *ALWAYS* respond immediately with an ACK (unlike the
* old RDI definition, which allowed asynchronous message replies).
*
* Execution will stop when allowed system events occur. The host will
* be notified via a ADP_Stopped message (described below).
*/
#define ADP_Step ADPREASON(CI_HADP,14)
/* ADP_Step
* --------
* Summary: Execute 'ninstr' instructions.
*
* Arguments:
* Send: (word ninstr)
* Return: (word status)
*
* 'ninstr' is the number of instructions to execute, starting at the
* address currently loaded into the CPU program counter. If it is zero,
* the target should execute instructions upto the next instruction that
* explicitly alters the Program Counter. i.e. a branch or ALU operation
* with the PC as the destination.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*
* The ADP_Step function (unlike the earlier RDI system) will *ALWAYS*
* return an ACK immediately. A subsequent ADP_Stopped message will be
* delivered from the target to the host when the ADP_Step operation
* has completed.
*/
#define ADP_InterruptRequest ADPREASON(CI_HADP,15)
/* ADP_InterruptRequest
* --------------------
* Summary: Interrupt execution.
*
* Arguments:
* Send: ()
* Return: (word status)
*
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* On receiving this message the target should attempt to stop execution.
*/
#define ADP_HW_Emulation ADPREASON(CI_HADP,16)
/* ADP_HW_Emulation
* ----------------
* The first parameter to ADP_HW_Emulation is a Reason Subcode, and
* subsequent parameters are defined by that subcode
*
* word
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -