diff options
author | Jeff Fan <jeff.fan@intel.com> | 2013-11-22 06:30:01 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-11-22 06:30:01 +0000 |
commit | 8cc26df4a60ec3a3b7f9d58ccefc12a1a5b6e199 (patch) | |
tree | bb7472ee01a60f805b09d718d952f601b82516d2 /SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32 | |
parent | e41aad152135f27ae1da142454af85a6597719ee (diff) | |
download | edk2-platforms-8cc26df4a60ec3a3b7f9d58ccefc12a1a5b6e199.tar.xz |
1. DebugAgentLib will install reserved vector table to persist vectors.
2. Update PeCoffExtraActionLib to detect if debug agent initialized or not by checking each IDT entry instead of whole IDT table.
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14886 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32')
-rw-r--r-- | SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S | 27 | ||||
-rw-r--r-- | SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm | 27 |
2 files changed, 50 insertions, 4 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S index e05317aaf8..284939126f 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S @@ -27,114 +27,137 @@ ASM_GLOBAL ASM_PFX(ExceptionStubHeaderSize) ASM_GLOBAL ASM_PFX(TimerInterruptHandle)
ASM_GLOBAL ASM_PFX(CommonEntry)
+.macro AGENT_HANDLER_SIGNATURE
+ .byte 0x41, 0x47, 0x54, 0x48 # AGENT_HANDLER_SIGNATURE SIGNATURE_32('A','G','T','H')
+.endm
+
.data
ASM_PFX(ExceptionStubHeaderSize): .word ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
.text
-.byte 0x41, 0x47, 0x54, 0x48 # AGENT_HANDLER_SIGNATURE SIGNATURE_32('A','G','T','H')
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception0Handle):
cli
pushl %eax
mov $0, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception1Handle):
cli
pushl %eax
mov $1, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception2Handle):
cli
pushl %eax
mov $2, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception3Handle):
cli
pushl %eax
mov $3, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception4Handle):
cli
pushl %eax
mov $4, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception5Handle):
cli
pushl %eax
mov $5, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception6Handle):
cli
pushl %eax
mov $6, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception7Handle):
cli
pushl %eax
mov $7, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception8Handle):
cli
pushl %eax
mov $8, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception9Handle):
cli
pushl %eax
mov $9, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception10Handle):
cli
pushl %eax
mov $10, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception11Handle):
cli
pushl %eax
mov $11, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception12Handle):
cli
pushl %eax
mov $12, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception13Handle):
cli
pushl %eax
mov $13, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception14Handle):
cli
pushl %eax
mov $14, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception15Handle):
cli
pushl %eax
mov $15, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception16Handle):
cli
pushl %eax
mov $16, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception17Handle):
cli
pushl %eax
mov $17, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception18Handle):
cli
pushl %eax
mov $18, %eax
jmp ASM_PFX(CommonEntry)
+AGENT_HANDLER_SIGNATURE
ASM_PFX(Exception19Handle):
cli
pushl %eax
mov $19, %eax
jmp ASM_PFX(CommonEntry)
-
+AGENT_HANDLER_SIGNATURE
ASM_PFX(TimerInterruptHandle):
cli
pushl %eax
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm index c80a33ba6c..9b219fc07d 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm @@ -32,6 +32,10 @@ InterruptProcess PROTO C public Exception0Handle, TimerInterruptHandle, ExceptionStubHeaderSize
+AGENT_HANDLER_SIGNATURE MACRO
+ db 41h, 47h, 54h, 48h ; SIGNATURE_32('A','G','T','H')
+ENDM
+
.data
ExceptionStubHeaderSize DW Exception1Handle - Exception0Handle
@@ -39,108 +43,127 @@ CommonEntryAddr DD CommonEntry .code
-db 41h, 47h, 54h, 48h ; AGENT_HANDLER_SIGNATURE SIGNATURE_32('A','G','T','H')
+AGENT_HANDLER_SIGNATURE
Exception0Handle:
cli
push eax
mov eax, 0
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception1Handle:
cli
push eax
mov eax, 1
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception2Handle:
cli
push eax
mov eax, 2
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception3Handle:
cli
push eax
mov eax, 3
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception4Handle:
cli
push eax
mov eax, 4
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception5Handle:
cli
push eax
mov eax, 5
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception6Handle:
cli
push eax
mov eax, 6
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception7Handle:
cli
push eax
mov eax, 7
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception8Handle:
cli
push eax
mov eax, 8
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception9Handle:
cli
push eax
mov eax, 9
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception10Handle:
cli
push eax
mov eax, 10
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception11Handle:
cli
push eax
mov eax, 11
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception12Handle:
cli
push eax
mov eax, 12
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception13Handle:
cli
push eax
mov eax, 13
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception14Handle:
cli
push eax
mov eax, 14
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception15Handle:
cli
push eax
mov eax, 15
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception16Handle:
cli
push eax
mov eax, 16
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception17Handle:
cli
push eax
mov eax, 17
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception18Handle:
cli
push eax
mov eax, 18
jmp dword ptr [CommonEntryAddr]
+AGENT_HANDLER_SIGNATURE
Exception19Handle:
cli
push eax
mov eax, 19
jmp dword ptr [CommonEntryAddr]
-
+AGENT_HANDLER_SIGNATURE
TimerInterruptHandle:
cli
push eax
|