]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/DebugSupport.h
Add ARM specific CPU context to the Debug Support Protocol
[mirror_edk2.git] / MdePkg / Include / Protocol / DebugSupport.h
index 843c829354e0ba1db0da28d8c7c0453093a70db9..fb1d589ec4be15b4d447591238befa06e1d2a2df 100644 (file)
@@ -5,7 +5,8 @@
   The DebugSupport protocol is used by source level debuggers to abstract the\r
   processor and handle context save and restore operations.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2009, Intel Corporation<BR>       \r
+  Portions Copyright (c) 2008-2009 Apple Inc.<BR>
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
@@ -471,14 +472,61 @@ typedef struct {
   UINT64  Ip;\r
 } EFI_SYSTEM_CONTEXT_EBC;\r
 \r
-///\r
-/// Universal EFI_SYSTEM_CONTEXT definition\r
-///\r
+
+
+///
+///  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
+///
 typedef union {\r
   EFI_SYSTEM_CONTEXT_EBC  *SystemContextEbc;\r
   EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32;\r
   EFI_SYSTEM_CONTEXT_X64  *SystemContextX64;\r
   EFI_SYSTEM_CONTEXT_IPF  *SystemContextIpf;\r
+  EFI_SYSTEM_CONTEXT_ARM  *SystemContextArm;
 } EFI_SYSTEM_CONTEXT;\r
 \r
 //\r
@@ -515,10 +563,11 @@ VOID
 /// Machine type definition\r
 ///\r
 typedef enum {\r
-  IsaIa32 = IMAGE_FILE_MACHINE_I386,  ///< 0x014C\r
-  IsaX64  = IMAGE_FILE_MACHINE_X64,   ///< 0x8664\r
-  IsaIpf  = IMAGE_FILE_MACHINE_IA64,  ///< 0x0200\r
-  IsaEbc  = IMAGE_FILE_MACHINE_EBC    ///< 0x0EBC\r
+  IsaIa32 = IMAGE_FILE_MACHINE_I386,           ///< 0x014C\r
+  IsaX64  = IMAGE_FILE_MACHINE_X64,            ///< 0x8664\r
+  IsaIpf  = IMAGE_FILE_MACHINE_IA64,           ///< 0x0200\r
+  IsaEbc  = IMAGE_FILE_MACHINE_EBC,            ///< 0x0EBC
+  IsaArm  = IMAGE_FILE_MACHINE_ARMTHUMB_MIXED  ///< 0x01c2
 } EFI_INSTRUCTION_SET_ARCHITECTURE;\r
 \r
 \r