📄 angel_reasons.h
字号:
* If the target cannot operate at any combination of the offered parameters,
* it will reply with an error status.
*
* Message arguments:
* word n-parameter-blocks
* n-parameter-blocks * {
* word ADP_Parameter
* word n-options
* n-options * { word parameter-value }
* }
*
* Reply:
* word status
* if (status == RDIError_NoError) {
* word n-parameters
* n-parameters * {
* word ADP_Parameter
* word chosen-value
* }
* }
*/
#define ADP_LinkCheck ADPREASON(CI_HBOOT, 6)
/*
* This should be the first message that the host sends after a successful
* parameter negotiation. It is really just a 'ping'.
*
* Message arguments:
* - empty message
*
* Reply:
* - empty acknowledgement
*/
/********************************************************************
*
* CI_HADP messages
*
*/
#define ADP_HADPUnrecognised ADPREASON(CI_HADP,0)
/* This message is unusual in that it is normally sent in reply to
* another message which is not understood. This is an exception
* to the normal protocol which says that a reply must have the
* same base reason code as the original. There is a single reply
* parameter which is the reason code which was not understood.
*
* As well as being a reply this message can also be sent and will
* return as if this message were unrecognised!
*
* Parameters:
* none
*
* Reply:
* word reason code which was not recognised
*/
#define ADP_Info ADPREASON(CI_HADP,1)
/* This is the new ADP information message. It is used to interrogate
* the target debug agent. It provides information on the processor,
* as well as the state of the debug world. This allows the host to
* configure itself to the capabilities of the target.
*
* We try not to use feature bitsets, since we could quickly run out
* of known bits. Thus when the feature set is extended, this can be
* done in a couple of supported ways:
*
* If an undivided reason code is to be added (no reason subcodes)
* then add a new ADP_Info code which responds with a flag indicating
* whether that feature is supported by the target. If this has not
* even been implemented then the reply will be ADP_HADPUnrecognised
*
* If a reason code which is subdivided into reason subcodes is
* added then reason subcode 0 should be set aside to indicate
* whether the functionality of that reason code is supported
* by the target. If it is not even implemented then the reply will
* be ADP_Unrecognised.
*
* The first parameter to ADP_Info is a reason subcode, and subsequent
* parameters are defined by that subcode
*
* Parameters:
* word reason subcode
* other arguments as reason subcode determines.
*
* Reply:
* word reason subcode
* other argument as reason subcode determines
*/
/* ADP_Info reason subcodes: */
#define ADP_Info_NOP ADPSUBREASON(CI_HADP,0)
/* ADP_Info_NOP
* ------------
* Summary: This message is used to check for ADP_Info being supported.
*
* Arguments:
* Send: ()
* Return: (word status)
*
* 'status' returns RDIError_NoError for success, non-zero indicates an error.
* If an error is returned then there is no handler for the ADP_Info
* message. The normal action will be to return an OK status.
*/
#define ADP_Info_Target ADPSUBREASON(CI_HADP,1)
/* ADP_Info_Target
* ---------------
* Summary:
* This reason code is used to interrogate target system details.
*
* Arguments:
* Send: ()
* Return: (word status, word bitset, word model)
*
* 'status' is RDIError_NoError to indicate OK, or non-zero to indicate
* some sort of error.
* 'bitset' is described in more detail below, and is mostly compatible
* with the old RDI/RDP system to avoid gratuitous changes to the debugger
* toolbox.
* 'model' is the target hardware ID word, as returned by the ADP_Booted
* message.
*
* NOTE: The minimum and maximum protocol levels are no longer supported.
* It is the Angel view that debugging complexity should be shifted to the
* host if at all possible. This means that the host debugger should
* always try to configure itself to the features available in the target
* debug agent. This can be done by checking individual messages, rather
* than by a blanket version number dictating the feature set.
*/
/* 'bitset':- */
/* Target speed in instructions per second = 10**(bits0..3). */
#define ADP_Info_Target_LogSpeedMask (0xF)
/* Target is running on [0 = emulator / 1 = hardware] */
#define ADP_Info_Target_HW (1 << 4)
/* Bits 5..10 are currently undefined and should be zero. */
/* Other bis are kept the same as the RDP in order to */
/* eliminate the need to change the position of some bits */
/* If set then the debug agent can be reloaded. */
#define ADP_Info_Target_CanReloadAgent (1 << 11)
/* Can request AngelBufferSize information. */
#define ADP_Info_Target_CanInquireBufferSize (1 << 12)
/* Bit 13 is no longer required as it inquired whether
* a special RDP Interrupt code was supported
*/
/* Debug agent can perform profiling. */
#define ADP_Info_Target_Profiling (1 << 14)
/* Debug agent can support Thumb code. */
#define ADP_Info_Target_Thumb (1 << 15)
/* Bit 16 was the communications channel check.
* This is always available on Angel systems.
*/
#define ADP_Info_Points ADPSUBREASON(CI_HADP,2)
/* ADP_Info_Points
* ---------------
* Summary: Returns a 32bit wide bitset of break- and watch-point
* features supported by the target debug agent.
*
* Arguments:
* Send: ()
* Return: (word status, word breakinfo)
*
* 'status' returns RDIError_NoError on success or non-zero to indicate
* some sort of error.
* 'breakinfo' is a 32bit wide bitset described in detail below. Note
* that only bits 1..12 are used.
*/
/* 'breakinfo':- */
/* Can trap on address equality. */
#define ADP_Info_Points_Comparison (1 << 0)
/* Can trap on address range. */
#define ADP_Info_Points_Range (1 << 1)
/* Can trap on 8bit memory reads. */
#define ADP_Info_Points_ReadByteWatch (1 << 2)
/* Can trap on 16bit memory reads. */
#define ADP_Info_Points_ReadHalfWatch (1 << 3)
/* Can trap on 32bit memory reads. */
#define ADP_Info_Points_ReadWordWatch (1 << 4)
/* Can trap on 8bit write accesses. */
#define ADP_Info_Points_WriteByteWatch (1 << 5)
/* Can trap on 16bit write accesses. */
#define ADP_Info_Points_WriteHalfWatch (1 << 6)
/* Can trap on 32bit write accesses. */
#define ADP_Info_Points_WriteWordWatch (1 << 7)
/* Like range, but based on address bitmask<. */
#define ADP_Info_Points_Mask (1 << 8)
/* Multi-threaded support only - thread specific breakpoints. */
#define ADP_Info_Points_ThreadBreak (1 << 9)
/* Multi-threaded support only - thread specific watchpoints. */
#define ADP_Info_Points_ThreadWatch (1 << 10)
/* Allows conditional breakpoints. */
#define ADP_Info_Points_Conditionals (1 << 11)
/* Break- and watch-points can be interrogated */
#define ADP_Info_Points_Status (1 << 12)
#define ADP_Info_Step ADPSUBREASON(CI_HADP,3)
/* ADP_Info_Step
* -------------
* Summary: Returns a 32bit wide bitmask of the single-stepping
* capabilities of the target debug agent.
*
* Arguments:
* Send: ()
* Return: (word status, word stepinfo)
*
* 'status' returns RDIError_NoError on success, or non-zero to indicate
* some kind of error.
* 'stepinfo' is a 32bit wide bitmask described in detail below. Note that
* only 3 bits are used.
*/
/* 'stepinfo':- */
/* Single-stepping of more than one instruction is possible. */
#define ADP_Info_Step_Multiple (1 << 0)
/* Single-stepping until next direct PC change is possible. */
#define ADP_Info_Step_PCChange (1 << 1)
/* Single-stepping of a single instruction is possible. */
#define ADP_Info_Step_Single (1 << 2)
#define ADP_Info_MMU ADPSUBREASON(CI_HADP,4)
/* ADP_Info_MMU
* ------------
* Summary: Returns information about the memory management system (if
* any).
*
* Arguments:
* Send: ()
* Return: (word status, word meminfo)
*
* 'status' returns RDIError_NoError to indicate success or non-zero to
* indicate some kind of error.
* 'meminfo' should be a 32bit unique ID, or zero if there is no MMU
* support on the target.
*/
#define ADP_Info_SemiHosting ADPSUBREASON(CI_HADP,5)
/* ADP_Info_SemiHosting
* --------------------
* Summary: This message is used to check whether semi-hosting info calls
* are available on the target.
*
* Arguments:
* Send: ()
* Return: (word status)
*
* 'status' returns RDIError_NoError if semi-hosting info calls are available,
* non-zero otherwise.
*/
#define ADP_Info_CoPro ADPSUBREASON(CI_HADP,6)
/* ADP_Info_CoPro
* --------------
* Summary: This message checks whether CoProcessor info calls are
* supported.
*
* Arguments:
* Send: ()
* Return: (word status)
*
* 'status' returns RDIError_NoError to indicate these facilities
* are supported, non-zero otherwise.
*/
#define ADP_Info_Cycles ADPSUBREASON(CI_HADP,7)
/* ADP_Info_Cycles
* ---------------
* Summary: Returns the number of instructions and cycles executed since
* the target was initialised.
*
* Arguments:
* Send: ()
* Return: (word status, word ninstr, word Scycles, word Ncycles,
* word Icycles, word Ccycles, word Fcycles)
*
* 'status' is RDIError_NoError to indicate success, or non-zero if there
* is no target support for gathering cycle count information.
* 'ninstr' is the number of instructions executed.
* 'Scycles' is the number of S-cycles executed.
* 'Ncycles' is the number of N-cycles executed.
* 'Icycles' is the number of I-cycles executed.
* 'Ccycles' is the number of C-cycles executed.
* 'Fcycles' is the number of F-cycles executed.
*/
#define ADP_Info_DescribeCoPro ADPSUBREASON(CI_HADP,8)
/* ADP_Info_DescribeCoPro
* ----------------------
* Summary: Describe the registers of a coprocessor. Use only if
* ADP_Info_CoPro return RDIError_NoError.
*
* Arguments:
* Send: Arguments of the form:
* (byte cpno, byte rmin, byte rmax, byte nbytes, byte access,
* byte cprt_r_b0, byte cprt_r_b1, byte cprt_w_b0, byte cprt_w_b1)
* And a terminating byte = 0xff. Must be within maximum buffer size.
* Return: (word status)
*
* 'cpno' is the number of the coprocessor to be described.
* 'rmin' is the bottom of a range of registers with the same description.
* 'rmax' is the top of a range of registers with the same description.
* 'nbytes' is the size of the register.
* 'access' describes access to the register and is described in more detail
* below.
*
* If bit 2 of access is set:-
* 'cprt_r0' provides bits 0 to 7, and
* 'cprt_r1' provides bits 16 to 23 of a CPRT instruction to read the
* register.
* 'cprt_w0' provides bits 0 to 7, and
* 'cprt_w1' provides bits 16 to 23 of a CPRT instruction to write the
* register.
*
* Otherwise, 'cprt_r0' provides bits 12 to 15, and 'cprt_r1' bit 22 of CPDT
* instructions to read and write the register ('cprt_w0' and 'cprt_w1' are
* junk).
*/
/* 'access':- */
/* Readable. */
#define ADP_Info_DescribeCoPro_Readable (1 << 0)
/* Writeable. */
#define ADP_Info_DescribeCoPro_Writeable (1 << 1)
/* Registers read or written via CPDT instructions (else CPRT) with this
bit set. */
#define ADP_Info_DescribeCoPro_CPDT (1 << 2)
#define ADP_Info_RequestCoProDesc ADPSUBREASON(CI_HADP,9)
/* ADP_Info_RequestCoProDesc
* -------------------------
* Summary: Requests a description of the registers of a coprocessor. Use
* only if ADP_Info_CoPro return RDIError_NoError.
*
* Arguments:
* Send: (byte cpno)
* Return: Arguments of the form:-
* (word status, byte rmin, byte rmax, byte nbytes, byte access)
* Followed by a terminating byte = 0xFF. Must be within maximum
* buffer size.
* 'cpno' is the number of the coprocessor to describe.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'rmin' is the bottom of a range of registers with the same description.
* 'rmax' is the top of a range of registers with the same description.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -