]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SourceLevelDebugPkg/Include/TransferProtocol.h
CorebootModulePkg: Remove unused PCI non-enumeration drivers
[mirror_edk2.git] / SourceLevelDebugPkg / Include / TransferProtocol.h
index bb7b07b4e286407f30f59ce1c881698c735e77c8..ef7c891c39c811ad1421bbfe42a0711a2af38ed4 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 - 2015, 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
 //\r
 // Current revision of transfer protocol\r
+// 0.4: Packet compression and decompression.\r
 //\r
-#define DEBUG_AGENT_REVISION            ((0 << 16) | 02)\r
+#define DEBUG_AGENT_REVISION_03         ((0 << 16) | 03)\r
+#define DEBUG_AGENT_REVISION_04         ((0 << 16) | 04)\r
+#define DEBUG_AGENT_REVISION            DEBUG_AGENT_REVISION_04\r
 #define DEBUG_AGENT_CAPABILITIES        0\r
 \r
 //\r
-// Definitions for break command.\r
+// Definitions for the (A)ttach 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
+// Definition for starting symbol of a (C)ompressed debug packet. Choose a non-ASCII to avoid conflict with other serial output.\r
+//\r
+#define DEBUG_STARTING_SYMBOL_COMPRESS  (0xFC)\r
 \r
 #pragma pack(1)\r
 \r
 //\r
-// Definition for debug packet header for normal debug packets (not including break/attach command)\r
+// Definition for debug packet header for debug packets (not including attach command)\r
 //\r
 typedef struct {\r
   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 +61,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 +91,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 +100,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 +315,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