From d9044ec5553c946e20154b7b5c61cd3979472f60 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Tue, 20 Jan 2015 08:46:31 +0000 Subject: Use RLE (Run Length Encoding) to improve debugging performance. DEBUG_AGENT_REVISION is DEBUG_AGENT_REVISION_03 to disable this feature and will be changed to DEBUG_AGENT_REVISION_04 when new version of HOST is released. Reduce the stack usage by re-using the same buffer to send/receive packet. Zero out the buffer before fxsave so that the reserved field in the buffer remains 0 for better RLE compression ratio. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Jeff Fan git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16628 6f19259b-4bc3-4df7-8a09-765794883524 --- SourceLevelDebugPkg/Include/TransferProtocol.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'SourceLevelDebugPkg/Include') diff --git a/SourceLevelDebugPkg/Include/TransferProtocol.h b/SourceLevelDebugPkg/Include/TransferProtocol.h index 42add9164a..45d82c2995 100644 --- a/SourceLevelDebugPkg/Include/TransferProtocol.h +++ b/SourceLevelDebugPkg/Include/TransferProtocol.h @@ -2,7 +2,7 @@ Transfer protocol defintions used by debug agent and host. It is only intended to be used by Debug related module implementation. - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,12 +20,15 @@ // // Current revision of transfer protocol +// 0.4: Packet compression and decompression. // -#define DEBUG_AGENT_REVISION ((0 << 16) | 03) +#define DEBUG_AGENT_REVISION_03 ((0 << 16) | 03) +#define DEBUG_AGENT_REVISION_04 ((0 << 16) | 04) +#define DEBUG_AGENT_REVISION DEBUG_AGENT_REVISION_03 #define DEBUG_AGENT_CAPABILITIES 0 // -// Definitions for attach command +// Definitions for the (A)ttach command // #define DEBUG_STARTING_SYMBOL_ATTACH (0xFA) @@ -34,10 +37,15 @@ // #define DEBUG_STARTING_SYMBOL_NORMAL (0xFE) +// +// Definition for starting symbol of a (C)ompressed debug packet. Choose a non-ASCII to avoid conflict with other serial output. +// +#define DEBUG_STARTING_SYMBOL_COMPRESS (0xFC) + #pragma pack(1) // -// Definition for debug packet header for normal debug packets (not including break/attach command) +// Definition for debug packet header for debug packets (not including attach command) // typedef struct { UINT8 StartSymbol; -- cgit v1.2.3