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
This commit is contained in:
lgao4 2006-06-29 10:31:10 +00:00
parent ed9ec043eb
commit b206d01d42
1 changed files with 128 additions and 3 deletions

View File

@ -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;
@ -122,6 +147,105 @@ typedef struct {
UINT32 Eax;
} 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
//
@ -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;