summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/efi/Protocol/DebugSupport.h
diff options
context:
space:
mode:
authorGeoff Lywood2010-05-29 00:06:24 +0200
committerMichael Brown2010-05-30 00:49:39 +0200
commiteef46c23d6baf3f2717aa8fc201c83928018d162 (patch)
tree108a0da79e18ea1860d6f0c5dd61a5d04f82e328 /src/include/ipxe/efi/Protocol/DebugSupport.h
parent[dhcp] Use correct DHCP options on EFI systems (diff)
downloadipxe-eef46c23d6baf3f2717aa8fc201c83928018d162.tar.gz
ipxe-eef46c23d6baf3f2717aa8fc201c83928018d162.tar.xz
ipxe-eef46c23d6baf3f2717aa8fc201c83928018d162.zip
[efi] Update UEFI header files with latest version from TianoCore
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi/Protocol/DebugSupport.h')
-rw-r--r--src/include/ipxe/efi/Protocol/DebugSupport.h143
1 files changed, 96 insertions, 47 deletions
diff --git a/src/include/ipxe/efi/Protocol/DebugSupport.h b/src/include/ipxe/efi/Protocol/DebugSupport.h
index 370614d70..0b6f4ed09 100644
--- a/src/include/ipxe/efi/Protocol/DebugSupport.h
+++ b/src/include/ipxe/efi/Protocol/DebugSupport.h
@@ -5,27 +5,26 @@
The DebugSupport protocol is used by source level debuggers to abstract the
processor and handle context save and restore operations.
- Copyright (c) 2006 - 2008, 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
- http://opensource.org/licenses/bsd-license.php
+Copyright (c) 2006 - 2010, 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 that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __DEBUG_SUPPORT_H__
#define __DEBUG_SUPPORT_H__
-#include <ipxe/efi/ProcessorBind.h>
#include <ipxe/efi/IndustryStandard/PeImage.h>
typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;
///
-/// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}
+/// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}.
///
#define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
{ \
@@ -33,13 +32,14 @@ typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;
}
///
-/// Debug Support definitions
+/// Processor exception to be hooked.
+/// All exception types for IA32, X64, Itanium and EBC processors are defined.
///
typedef INTN EFI_EXCEPTION_TYPE;
-//
-// IA-32 processor exception types
-//
+///
+/// IA-32 processor exception types.
+///
#define EXCEPT_IA32_DIVIDE_ERROR 0
#define EXCEPT_IA32_DEBUG 1
#define EXCEPT_IA32_NMI 2
@@ -59,11 +59,8 @@ typedef INTN EFI_EXCEPTION_TYPE;
#define EXCEPT_IA32_SIMD 19
///
-/// IA-32 processor context definition
-///
-///
-/// FXSAVE_STATE
-/// FP / MMX / XMM registers (see fxrstor instruction definition)
+/// FXSAVE_STATE.
+/// FP / MMX / XMM registers (see fxrstor instruction definition).
///
typedef struct {
UINT16 Fcw;
@@ -95,6 +92,9 @@ typedef struct {
UINT8 Reserved11[14 * 16];
} EFI_FX_SAVE_STATE_IA32;
+///
+/// IA-32 processor context definition.
+///
typedef struct {
UINT32 ExceptionData;
EFI_FX_SAVE_STATE_IA32 FxSaveState;
@@ -131,9 +131,9 @@ typedef struct {
UINT32 Eax;
} EFI_SYSTEM_CONTEXT_IA32;
-//
-// X64 processor exception types
-//
+///
+/// x64 processor exception types.
+///
#define EXCEPT_X64_DIVIDE_ERROR 0
#define EXCEPT_X64_DEBUG 1
#define EXCEPT_X64_NMI 2
@@ -153,10 +153,8 @@ typedef struct {
#define EXCEPT_X64_SIMD 19
///
-/// X64 processor context definition
-///
-/// FXSAVE_STATE
-/// FP / MMX / XMM registers (see fxrstor instruction definition)
+/// FXSAVE_STATE.
+/// FP / MMX / XMM registers (see fxrstor instruction definition).
///
typedef struct {
UINT16 Fcw;
@@ -188,6 +186,9 @@ typedef struct {
UINT8 Reserved11[14 * 16];
} EFI_FX_SAVE_STATE_X64;
+///
+/// x64 processor context definition.
+///
typedef struct {
UINT64 ExceptionData;
EFI_FX_SAVE_STATE_X64 FxSaveState;
@@ -233,9 +234,9 @@ typedef struct {
UINT64 R15;
} EFI_SYSTEM_CONTEXT_X64;
-//
-// IPF processor exception types
-//
+///
+/// Itanium Processor Family Exception types.
+///
#define EXCEPT_IPF_VHTP_TRANSLATION 0
#define EXCEPT_IPF_INSTRUCTION_TLB 1
#define EXCEPT_IPF_DATA_TLB 2
@@ -279,12 +280,12 @@ typedef struct {
#define EXCEPT_IPF_IA32_INTERRUPT 47
///
-/// IPF processor context definition
+/// IPF processor context definition.
///
typedef struct {
//
// The first reserved field is necessary to preserve alignment for the correct
- // bits in UNAT and to insure F2 is 16 byte aligned..
+ // bits in UNAT and to insure F2 is 16 byte aligned.
//
UINT64 Reserved;
UINT64 R1;
@@ -434,27 +435,27 @@ typedef struct {
} EFI_SYSTEM_CONTEXT_IPF;
-//
-// EBC processor exception types
-//
+///
+/// EBC processor exception types.
+///
#define EXCEPT_EBC_UNDEFINED 0
#define EXCEPT_EBC_DIVIDE_ERROR 1
#define EXCEPT_EBC_DEBUG 2
#define EXCEPT_EBC_BREAKPOINT 3
#define EXCEPT_EBC_OVERFLOW 4
-#define EXCEPT_EBC_INVALID_OPCODE 5 // opcode out of range
+#define EXCEPT_EBC_INVALID_OPCODE 5 ///< Opcode out of range.
#define EXCEPT_EBC_STACK_FAULT 6
#define EXCEPT_EBC_ALIGNMENT_CHECK 7
-#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 // malformed instruction
-#define EXCEPT_EBC_BAD_BREAK 9 // BREAK 0 or undefined BREAK
-#define EXCEPT_EBC_STEP 10 // to support debug stepping
+#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 ///< Malformed instruction.
+#define EXCEPT_EBC_BAD_BREAK 9 ///< BREAK 0 or undefined BREAK.
+#define EXCEPT_EBC_STEP 10 ///< To support debug stepping.
///
/// For coding convenience, define the maximum valid EBC exception.
///
#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP
///
-/// EBC processor context definition
+/// EBC processor context definition.
///
typedef struct {
UINT64 R0;
@@ -470,14 +471,61 @@ typedef struct {
UINT64 Ip;
} EFI_SYSTEM_CONTEXT_EBC;
+
+
+///
+/// ARM processor exception types.
+///
+#define EXCEPT_ARM_RESET 0
+#define EXCEPT_ARM_UNDEFINED_INSTRUCTION 1
+#define EXCEPT_ARM_SOFTWARE_INTERRUPT 2
+#define EXCEPT_ARM_PREFETCH_ABORT 3
+#define EXCEPT_ARM_DATA_ABORT 4
+#define EXCEPT_ARM_RESERVED 5
+#define EXCEPT_ARM_IRQ 6
+#define EXCEPT_ARM_FIQ 7
+
+///
+/// For coding convenience, define the maximum valid ARM exception.
+///
+#define MAX_ARM_EXCEPTION EXCEPT_ARM_FIQ
+
+///
+/// ARM processor context definition.
+///
+typedef struct {
+ UINT32 R0;
+ UINT32 R1;
+ UINT32 R2;
+ UINT32 R3;
+ UINT32 R4;
+ UINT32 R5;
+ UINT32 R6;
+ UINT32 R7;
+ UINT32 R8;
+ UINT32 R9;
+ UINT32 R10;
+ UINT32 R11;
+ UINT32 R12;
+ UINT32 SP;
+ UINT32 LR;
+ UINT32 PC;
+ UINT32 CPSR;
+ UINT32 DFSR;
+ UINT32 DFAR;
+ UINT32 IFSR;
+ UINT32 IFAR;
+} EFI_SYSTEM_CONTEXT_ARM;
+
///
-/// Universal EFI_SYSTEM_CONTEXT definition
+/// Universal EFI_SYSTEM_CONTEXT definition.
///
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_ARM *SystemContextArm;
} EFI_SYSTEM_CONTEXT;
//
@@ -487,13 +535,13 @@ typedef union {
/**
Registers and enables an exception callback function for the specified exception.
- @param ExceptionType Exception types in EBC, IA-32, X64, or IPF
+ @param ExceptionType Exception types in EBC, IA-32, x64, or IPF.
@param SystemContext Exception content.
**/
typedef
VOID
-(*EFI_EXCEPTION_CALLBACK)(
+(EFIAPI *EFI_EXCEPTION_CALLBACK)(
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
@@ -506,7 +554,7 @@ VOID
**/
typedef
VOID
-(*EFI_PERIODIC_CALLBACK)(
+(EFIAPI *EFI_PERIODIC_CALLBACK)(
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
@@ -514,10 +562,11 @@ VOID
/// Machine type definition
///
typedef enum {
- IsaIa32 = IMAGE_FILE_MACHINE_I386, ///< 0x014C
- IsaX64 = IMAGE_FILE_MACHINE_X64, ///< 0x8664
- IsaIpf = IMAGE_FILE_MACHINE_IA64, ///< 0x0200
- IsaEbc = IMAGE_FILE_MACHINE_EBC ///< 0x0EBC
+ IsaIa32 = IMAGE_FILE_MACHINE_I386, ///< 0x014C
+ IsaX64 = IMAGE_FILE_MACHINE_X64, ///< 0x8664
+ IsaIpf = IMAGE_FILE_MACHINE_IA64, ///< 0x0200
+ IsaEbc = IMAGE_FILE_MACHINE_EBC, ///< 0x0EBC
+ IsaArm = IMAGE_FILE_MACHINE_ARMTHUMB_MIXED ///< 0x01c2
} EFI_INSTRUCTION_SET_ARCHITECTURE;
@@ -571,7 +620,7 @@ EFI_STATUS
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
@param ProcessorIndex Specifies which processor the callback function applies to.
- @param PeriodicCallback A pointer to a function of type EXCEPTION_CALLBACK that is called
+ @param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called
when the processor exception specified by ExceptionType occurs.
@param ExceptionType Specifies which processor exception to hook.