TransferProtocol.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
2N/A Transfer protocol defintions used by debug agent and host. It is only 2N/A intended to be used by Debug related module implementation. 2N/A Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR> 2N/A This program and the accompanying materials 2N/A are licensed and made available under the terms and conditions of the BSD License 2N/A which accompanies this distribution. The full text of the license may be found at 2N/A THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 2N/A WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 2N/A// Definitions for break command. 2N/A// Definition for starting symbol of a normal debug packet. Choose a non-ASCII to avoid conflict with other serial output. 2N/A// Definition for common header for normal debug packets (not including break command) // Structure to facilitate debug packet header parsing or construction // Definition for Command field for debug packets // The below are target side initiated commands. // The below 2 commands are used when transferring big data (like > ~250 bytes). The sequence is: // Host Macine Target Macine // <= IN_PROGRESS with part of the data // (could have multiple IN_PROGRESS and CONTINUE interactions) // <= OK with the last part of data // OK (no data as ACK) => // The below 2 commands are used to support deferred halt. HALT_DEFERRED will be returned when a halt request received while target is already in inter-active mode. // HALT_PROCESSED will be return as a possible return value for GO command, if target has a pending halt request. // Definition for data field for debug packets #
define DEBUG_DATA_UPPER_LIMIT 0xff // This is the upper limit for the data size, by the limit of the packet header definition.// Response data for DEBUG_COMMAND_BREAK_CAUSE // Break type defintions for DEBUG_DATA_BREAK_CAUSE // Response data for DEBUG_COMMAND_ARCH_MODE, defined as SOFT_DEBUGGER_PROCESSOR_... // Cpu architecture defintions for DEBUG_DATA_RESPONSE_ARCH_MODE // Command and response data for DEBUG_COMMAND_XX_YY_BREAKPOINT UINT8 Length:
2;
// Refer to below DEBUG_DATA_BREAKPOINT_LENGTH_XX macros UINT8 Access:
2;
// Refer to below DEBUG_DATA_BREAKPOINT_ACCESS_XX macros // Command data for DEBUG_COMMAND_SET_HW_BREAKPOINT // Command data for DEBUG_COMMAND_CLEAR_HW_BREAKPOINT // Command data for DEBUG_COMMAND_SET_SW_BREAKPOINT // Response data for DEBUG_COMMAND_SET_SW_BREAKPOINT // Command data for DEBUG_COMMAND_CLEAR_SW_BREAKPOINT // Command data for DEBUG_COMMAND_READ_MEMORY_XX // Command data for DEBUG_COMMAND_WRITE_MEMORY_XX UINT8 Data;
// The actual length for this field is decided by Width x Count // Command data for DEBUG_COMMAND_READ_IO // Response data for DEBUG_COMMAND_READ_IO UINT8 Data;
// The actual length of this structure will be adjusted according to the Width field // Command data for DEBUG_COMMAND_WRITE_IO UINT8 Data;
// The actual length of this structure will be adjusted according to the Width field // Command data for DEBUG_COMMAND_READ_REGISTER UINT8 Index;
// defined as DEBUG_DEFINITION_REGISTER_XX // Command data for DEBUG_COMMAND_WRITE_REGISTER UINT8 Index;
// defined as DEBUG_DEFINITION_REGISTER_XX // Command data for DEBUG_COMMAND_READ_MSR // Response data for DEBUG_COMMAND_READ_MSR // Command data for DEBUG_COMMAND_WRITE_MSR // Command data for DEBUG_COMMAND_READ_REGISTER_GROUP // For possible values, refer to the definition for DEBUG_DEFINITION_REGISTER_GROUP_XXX (in another .h file as it is architecture specific) // Response data for DEBUG_COMMAND_GET_REVISION // Response data for DEBUG_COMMAND_GET_EXCEPTION UINT8 DRn;
// The index of DR register which to be used as temporary breakpoint // Command data for DEBUG_COMMAND_SET_DEBUG_FLAG UINT32 DebugFlag;
// The index of DR register which to be used as temporary breakpoint // Command data for DEBUG_COMMAND_SET_VIEWPOINT // If viewpoint is changed successfully, DEBUG_COMMAND_OK will be returned. // If viewpoint is not availabe, DEBUG_COMMAND_NOT_SUPPORTED will be returned. // Response data for DEBUG_COMMAND_GET_VIEWPOINT