]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SourceLevelDebugPkg/Include/TransferProtocol.h
Fix a bug in DebugAgent that hang happens when the ACK for GO is lost.
[mirror_edk2.git] / SourceLevelDebugPkg / Include / TransferProtocol.h
index bb7b07b4e286407f30f59ce1c881698c735e77c8..42add9164a831e2447c73e3c9e82e9c921c6ea56 100644 (file)
@@ -2,7 +2,7 @@
   Transfer protocol defintions used by debug agent and host. It is only\r
   intended to be used by Debug related module implementation.\r
 \r
-  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 //\r
 // Current revision of transfer protocol\r
 //\r
-#define DEBUG_AGENT_REVISION            ((0 << 16) | 02)\r
+#define DEBUG_AGENT_REVISION            ((0 << 16) | 03)\r
 #define DEBUG_AGENT_CAPABILITIES        0\r
 \r
-//\r
-// Definitions for break command.\r
-//\r
-#define DEBUG_STARTING_SYMBOL_BREAK         (0xFC)\r
-\r
 //\r
 // Definitions for attach command\r
 //\r
-#define DEBUG_STARTING_SYMBOL_ATTACH        (0xFA)\r
+#define DEBUG_STARTING_SYMBOL_ATTACH    (0xFA)\r
 \r
 //\r
 // Definition for starting symbol of a normal debug packet. Choose a non-ASCII to avoid conflict with other serial output.\r
 //\r
 #define DEBUG_STARTING_SYMBOL_NORMAL    (0xFE)\r
 \r
-\r
 #pragma pack(1)\r
 \r
 //\r
@@ -49,7 +43,8 @@ typedef struct {
   UINT8                      StartSymbol;\r
   UINT8                      Command;\r
   UINT8                      Length;    // Length of Debug Packet including header and payload in byte\r
-  UINT8                      CheckSum;\r
+  UINT8                      SequenceNo;\r
+  UINT16                     Crc;\r
 } DEBUG_PACKET_HEADER;\r
 \r
 //\r
@@ -58,6 +53,8 @@ typedef struct {
 #define DEBUG_COMMAND_REQUEST      (0 << 7)\r
 #define DEBUG_COMMAND_RESPONSE     (1 << 7)\r
 \r
+#define IS_REQUEST(x)              (((x)->Command & DEBUG_COMMAND_RESPONSE) == 0)\r
+\r
 //\r
 // HOST initiated commands\r
 //\r
@@ -86,6 +83,7 @@ typedef struct {
 #define DEBUG_COMMAND_DETACH                      (DEBUG_COMMAND_REQUEST | 0x16)\r
 #define DEBUG_COMMAND_CPUID                       (DEBUG_COMMAND_REQUEST | 0x17)\r
 #define DEBUG_COMMAND_SEARCH_SIGNATURE            (DEBUG_COMMAND_REQUEST | 0x18)\r
+#define DEBUG_COMMAND_HALT                        (DEBUG_COMMAND_REQUEST | 0x19)\r
 \r
 //\r
 // TARGET initiated commands\r
@@ -94,6 +92,7 @@ typedef struct {
 #define DEBUG_COMMAND_BREAK_POINT                 (DEBUG_COMMAND_REQUEST | 0x3E)\r
 #define DEBUG_COMMAND_MEMORY_READY                (DEBUG_COMMAND_REQUEST | 0x3D)\r
 #define DEBUG_COMMAND_PRINT_MESSAGE               (DEBUG_COMMAND_REQUEST | 0x3C)\r
+#define DEBUG_COMMAND_ATTACH_BREAK                (DEBUG_COMMAND_REQUEST | 0x3B)\r
 \r
 //\r
 // Response commands\r
@@ -308,8 +307,9 @@ typedef struct {
 //\r
 // Supported keys\r
 //\r
-#define DEBUG_AGENT_SETTING_SMM_ENTRY_BREAK     1\r
-#define DEBUG_AGENT_SETTING_PRINT_ERROR_LEVEL   2\r
+#define DEBUG_AGENT_SETTING_SMM_ENTRY_BREAK          1\r
+#define DEBUG_AGENT_SETTING_PRINT_ERROR_LEVEL        2\r
+#define DEBUG_AGENT_SETTING_BOOT_SCRIPT_ENTRY_BREAK  3\r
 //\r
 // Bitmask of print error level for debug message\r
 //\r