summaryrefslogtreecommitdiff
path: root/MdePkg/Include
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-29 10:31:10 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-29 10:31:10 +0000
commitb206d01d42b047d7cf817e0cd3000bfce59c06f9 (patch)
treebd9ba1747c2cb4fd400e6b89a2049b5140cdc6fa /MdePkg/Include
parented9ec043eb6b0fe3ac70b580fa4cd1b259519087 (diff)
downloadedk2-platforms-b206d01d42b047d7cf817e0cd3000bfce59c06f9.tar.xz
Sync DebugSupport Protocol with UEFI2.0 spec
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@656 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include')
-rw-r--r--MdePkg/Include/Protocol/DebugSupport.h131
1 files changed, 128 insertions, 3 deletions
diff --git a/MdePkg/Include/Protocol/DebugSupport.h b/MdePkg/Include/Protocol/DebugSupport.h
index 1b782cf6a5..4f7d3d138a 100644
--- a/MdePkg/Include/Protocol/DebugSupport.h
+++ b/MdePkg/Include/Protocol/DebugSupport.h
@@ -1,5 +1,5 @@
/** @file
- DebugSupport protocol and supporting definitions as defined in the EFI 1.1
+ DebugSupport protocol and supporting definitions as defined in the UEFI2.0
specification.
The DebugSupport protocol is used by source level debuggers to abstract the
@@ -75,6 +75,26 @@ typedef struct {
UINT32 DataOffset;
UINT16 Ds;
UINT8 Reserved2[10];
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ UINT8 St0Mm0[10], Reserved3[6];
+ UINT8 St1Mm1[10], Reserved4[6];
+ UINT8 St2Mm2[10], Reserved5[6];
+ UINT8 St3Mm3[10], Reserved6[6];
+ UINT8 St4Mm4[10], Reserved7[6];
+ UINT8 St5Mm5[10], Reserved8[6];
+ UINT8 St6Mm6[10], Reserved9[6];
+ UINT8 St7Mm7[10], Reserved10[6];
+ UINT8 Xmm0[16];
+ UINT8 Xmm1[16];
+ UINT8 Xmm2[16];
+ UINT8 Xmm3[16];
+ UINT8 Xmm4[16];
+ UINT8 Xmm5[16];
+ UINT8 Xmm6[16];
+ UINT8 Xmm7[16];
+ UINT8 Reserved11[14 * 16];
+} EFI_FX_SAVE_STATE_IA32;
+#else
UINT8 St0Mm0[10], Reserved3[6];
UINT8 St0Mm1[10], Reserved4[6];
UINT8 St0Mm2[10], Reserved5[6];
@@ -84,11 +104,16 @@ typedef struct {
UINT8 St0Mm6[10], Reserved9[6];
UINT8 St0Mm7[10], Reserved10[6];
UINT8 Reserved11[22 * 16];
-} EFI_FX_SAVE_STATE_IA32;
+} EFI_FX_SAVE_STATE;
+#endif
typedef struct {
UINT32 ExceptionData;
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
EFI_FX_SAVE_STATE_IA32 FxSaveState;
+#else
+ EFI_FX_SAVE_STATE FxSaveState;
+#endif
UINT32 Dr0;
UINT32 Dr1;
UINT32 Dr2;
@@ -96,7 +121,7 @@ typedef struct {
UINT32 Dr6;
UINT32 Dr7;
UINT32 Cr0;
- UINT32 Cr1;
+ UINT32 Cr1; /* Reserved */
UINT32 Cr2;
UINT32 Cr3;
UINT32 Cr4;
@@ -123,6 +148,105 @@ typedef struct {
} EFI_SYSTEM_CONTEXT_IA32;
//
+// X64 processor exception types
+//
+#define EXCEPT_X64_DIVIDE_ERROR 0
+#define EXCEPT_X64_DEBUG 1
+#define EXCEPT_X64_NMI 2
+#define EXCEPT_X64_BREAKPOINT 3
+#define EXCEPT_X64_OVERFLOW 4
+#define EXCEPT_X64_BOUND 5
+#define EXCEPT_X64_INVALID_OPCODE 6
+#define EXCEPT_X64_DOUBLE_FAULT 8
+#define EXCEPT_X64_INVALID_TSS 10
+#define EXCEPT_X64_SEG_NOT_PRESENT 11
+#define EXCEPT_X64_STACK_FAULT 12
+#define EXCEPT_X64_GP_FAULT 13
+#define EXCEPT_X64_PAGE_FAULT 14
+#define EXCEPT_X64_FP_ERROR 16
+#define EXCEPT_X64_ALIGNMENT_CHECK 17
+#define EXCEPT_X64_MACHINE_CHECK 18
+#define EXCEPT_X64_SIMD 19
+
+//
+// X64 processor context definition
+//
+// FXSAVE_STATE
+// FP / MMX / XMM registers (see fxrstor instruction definition)
+//
+typedef struct {
+ UINT16 Fcw;
+ UINT16 Fsw;
+ UINT16 Ftw;
+ UINT16 Opcode;
+ UINT64 Rip;
+ UINT64 DataOffset;
+ UINT8 Reserved1[8];
+ UINT8 St0Mm0[10], Reserved2[6];
+ UINT8 St1Mm1[10], Reserved3[6];
+ UINT8 St2Mm2[10], Reserved4[6];
+ UINT8 St3Mm3[10], Reserved5[6];
+ UINT8 St4Mm4[10], Reserved6[6];
+ UINT8 St5Mm5[10], Reserved7[6];
+ UINT8 St6Mm6[10], Reserved8[6];
+ UINT8 St7Mm7[10], Reserved9[6];
+ UINT8 Xmm0[16];
+ UINT8 Xmm1[16];
+ UINT8 Xmm2[16];
+ UINT8 Xmm3[16];
+ UINT8 Xmm4[16];
+ UINT8 Xmm5[16];
+ UINT8 Xmm6[16];
+ UINT8 Xmm7[16];
+ UINT8 Reserved11[14 * 16];
+} EFI_FX_SAVE_STATE_X64;
+
+typedef struct {
+ UINT64 ExceptionData;
+ EFI_FX_SAVE_STATE_X64 FxSaveState;
+ UINT64 Dr0;
+ UINT64 Dr1;
+ UINT64 Dr2;
+ UINT64 Dr3;
+ UINT64 Dr6;
+ UINT64 Dr7;
+ UINT64 Cr0;
+ UINT64 Cr1; /* Reserved */
+ UINT64 Cr2;
+ UINT64 Cr3;
+ UINT64 Cr4;
+ UINT64 Cr8;
+ UINT64 Rflags;
+ UINT64 Ldtr;
+ UINT64 Tr;
+ UINT64 Gdtr[2];
+ UINT64 Idtr[2];
+ UINT64 Rip;
+ UINT64 Gs;
+ UINT64 Fs;
+ UINT64 Es;
+ UINT64 Ds;
+ UINT64 Cs;
+ UINT64 Ss;
+ UINT64 Rdi;
+ UINT64 Rsi;
+ UINT64 Rbp;
+ UINT64 Rsp;
+ UINT64 Rbx;
+ UINT64 Rdx;
+ UINT64 Rcx;
+ UINT64 Rax;
+ UINT64 R8;
+ UINT64 R9;
+ UINT64 R10;
+ UINT64 R11;
+ UINT64 R12;
+ UINT64 R13;
+ UINT64 R14;
+ UINT64 R15;
+} EFI_SYSTEM_CONTEXT_X64;
+
+//
// IPF processor exception types
//
#define EXCEPT_IPF_VHTP_TRANSLATION 0
@@ -365,6 +489,7 @@ typedef struct {
typedef union {
EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc;
EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32;
+ EFI_SYSTEM_CONTEXT_X64 *SystemContextX64;
EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf;
} EFI_SYSTEM_CONTEXT;