📄 angel_reasons.h
字号:
* '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 reason subcode
* other arguments as reason subcode determines
*
*/
/* ADP__HW_Emulation sub-reason codes: */
#define ADP_HW_Emul_Supported ADPSUBREASON(CI_HADP,0)
/* ADP_HW_Emul_Supported
* ---------------------
* Summary: Enquires whether calls to the next 4 messages are available
* (MemoryAccess, MemoryMap, Set_CPUspeed, ReadClock).
*
* Arguments:
* Send: ()
* Return: (word status)
*
* 'status' is RDIError_NoError to indicate the messages are available,
* non-zero otherwise.
*
* NOTE: Equivalent to RDI_Info_Memory_Stats.
*/
#define ADP_HW_Emul_MemoryAccess ADPSUBREASON(CI_HADP,1)
/* ADP_HW_Emul_MemoryAccess
* ------------------------
* Summary: Get memory access information for memory block with specified
* handle.
*
* Arguments:
* Send: (word handle)
* Return: (word status, word nreads, word nwrites, word sreads,
* word swrites, word ns, word s)
*
* 'handle' is a handle to a memory block.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'nreads' is the number of non-sequential reads.
* 'nwrites' is the number of non-sequential writes.
* 'sreads' is the number of sequential reads.
* 'swrites' is the number of sequential writes.
* 'ns' is time in nano seconds.
* 's' is time in seconds.
*
* NOTE: Equivalent to RDIMemory_Access.
*/
#define ADP_HW_Emul_MemoryMap ADPSUBREASON(CI_HADP,2)
/* ADP_HW_Emul_MemoryMap
* ---------------------
* Summary: Sets memory characteristics.
*
* Arguments:
* Send: (word n,
Then 'n' sets of arguments of the form:-
word handle, word start, word limit, byte width,
byte access, word Nread_ns, word Nwrite_ns, word Sread_ns,
word Swrite_ns)
* Return: (word status)
*
* 'n' is the number of sets of arguments.
* 'handle' is a handle to the region.
* 'start' is the start of this region.
* 'limit' is the limit of this region.
* 'width' is the memory width, described in detail below.
* 'access' is described in detail below.
* 'Nread_ns' is the access time for N read cycles in nano seconds.
* 'Nwrite_ns' is the access time for N write cycles in nano seconds.
* 'Sread_ns' is the access time for S read cycles in nano seconds.
* 'Swrite_ns' is the access time for S write cycles in nano seconds.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* NOTE: Equivalent to RDIMemory_Map.
*/
/* 'width':- */
/* 8 bit memory width. */
#define ADP_HW_Emul_MemoryMap_Width8 (0)
/* 16 bit memory width. */
#define ADP_HW_Emul_MemoryMap_Width16 (1)
/* 32 bit memory width. */
#define ADP_HW_Emul_MemoryMap_Width32 (2)
/* 'access':- */
/* Bit 0 - read access. */
#define ADP_HW_Emul_MemoryMap_Access_Read (1 << 0)
/* Bit 1 - write access. */
#define ADP_HW_Emul_MemoryMap_Access_Write (1 << 1)
/* Bit 2 - latched 32 bit memory. */
#define ADP_HW_Emul_MemoryMap_Access_Latched (1 << 2)
#define ADP_HW_Emul_SetCPUSpeed ADPSUBREASON(CI_HADP,3)
/* ADP_HW_Emul_SetCPUSpeed
* -----------------------
* Summary: Sets the speed of the CPU.
*
* Arguments:
* Send: (word speed)
* Return: (word status)
*
* 'speed' is the CPU speed in nano seconds.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*
* NOTE: Equivalent to RDISet_CPUSpeed.
*/
#define ADP_HW_Emul_ReadClock ADPSUBREASON(CI_HADP,4)
/* ADP_HW_Emul_ReadClock
* ---------------------
* Summary: Reads simulated time.
*
* Arguments:
* Send: ()
* Return: (word status, word ns, word s)
*
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'ns' is time in nano seconds.
* 's' is time in seconds.
*
* NOTE: Equivalent to RDIRead_Clock.
*/
#define ADP_ICEbreakerHADP ADPREASON(CI_HADP,17)
/* The first parameter to ADP_ICEbreaker is a Reason Subcode, and
* subsequent parameters are defined by that subcode
*
* word reason subcode
* other arguments as reason subcode determines
*
*/
/* ADP_ICEbreaker sub-reason codes: */
#define ADP_ICEB_Exists ADPSUBREASON(CI_HADP,0)
/* ADP_ICEB_Exists
* ---------------
* Summary: Is there an ICEbreaker in the system?
*
* Arguments:
* Send: ()
* Return: (word status)
*
* 'status' is RDIError_NoError to indicate there is an ICEbreaker,
* non-zero otherwise.
*/
#define ADP_ICEB_GetLocks ADPSUBREASON(CI_HADP,1)
/* ADP_ICEB_GetLocks
* -----------------
* Summary: Returns which ICEbreaker registers are locked.
*
* Arguments:
* Send: ()
* Return: (word status, word lockedstate)
*
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'lockedstate' is a bitmap if the ICEbreaker registers locked against use
* by IceMan (because explicitly written by the user). Bit n represents
* hardware breakpoint n, and if set the register is locked.
*
* NOTE: Equivalent to RDIIcebreaker_GetLocks. Should only be used if
* ADP_ICEB_Exists didn't return an error.
*/
#define ADP_ICEB_SetLocks ADPSUBREASON(CI_HADP,2)
/* ADP_ICEB_SetLocks
* -----------------
* Summary: Sets which ICEbreaker registers are locked.
*
* Arguments:
* Send: (word lockedstate)
* Return: (word status)
*
* 'lockedstate' is the same as in ADP_ICEB_GetLocks above.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*
* NOTE: Equivalent to RDIIcebreaker_SetLocks. Should only be used if
* ADP_ICEB_Exists didn't return an error.
*/
#define ADP_ICEB_CC_Exists ADPSUBREASON(CI_HADP,3)
/* ADP_ICEB_CC_Exists
* ------------------
* Summary: Is there an ICEbreaker Comms Channel?
*
* Arguments:
* Send: ()
* Return: (word status)
*
* 'status' is RDIError_NoError to indicate there is a Comms Channel,
* non-zero otherwise.
*
* NOTE: Should only be used if ADP_ICEB_Exists didn't return an error.
*/
#define ADP_ICEB_CC_Connect_ToHost ADPSUBREASON(CI_HADP,4)
/* ADP_ICEB_CC_Connect_ToHost
* --------------------------
* Summary: Connect Comms Channel in ToHost direction.
*
* Ar
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -