summaryrefslogtreecommitdiffstats
path: root/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2015-01-20 08:46:31 +0000
committerniruiyu <niruiyu@Edk2>2015-01-20 08:46:31 +0000
commitd9044ec5553c946e20154b7b5c61cd3979472f60 (patch)
treecbe2b29bd84274d87dae2df4c43dbdeae8e54cde /SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm
parent6a39a6a1a8a35a84e4e13900a2b5e8da1b6435f2 (diff)
downloadedk2-d9044ec5553c946e20154b7b5c61cd3979472f60.tar.gz
edk2-d9044ec5553c946e20154b7b5c61cd3979472f60.tar.bz2
edk2-d9044ec5553c946e20154b7b5c61cd3979472f60.zip
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 <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16628 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm')
-rw-r--r--SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm15
1 files changed, 11 insertions, 4 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm
index 0f076a76da..6d01f64d0f 100644
--- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm
+++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm
@@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;
-; Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
; 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
@@ -286,16 +286,23 @@ NoExtrPush:
mov rax, dr0
push rax
+ ;; Clear Direction Flag
+ cld
+
sub rsp, 512
mov rdi, rsp
+ ;; Clear the buffer
+ xor rax, rax
+ push rcx
+ mov rcx, 64 ;= 512 / 8
+ rep stosq
+ pop rcx
+ mov rdi, rsp
db 0fh, 0aeh, 00000111y ;fxsave [rdi]
;; save the exception data
push qword ptr [rbp + 16]
- ;; Clear Direction Flag
- cld
-
; call the C interrupt process function
mov rdx, rsp ; Structure
mov r15, rcx ; save vector in r15