]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/GdbStub/GdbStubInternal.h
EmbeddedPkg: Apply uncrustify changes
[mirror_edk2.git] / EmbeddedPkg / GdbStub / GdbStubInternal.h
index b08159302cfa6881cfece670c4ed4d9bee8e2c74..9c3929c812b30cbb0527fd7cd34ef1c79ecc13e4 100644 (file)
 #include <Guid/DebugImageInfoTable.h>\r
 #include <IndustryStandard/PeImage.h>\r
 \r
-extern CONST CHAR8 mHexToStr[];\r
+extern CONST CHAR8  mHexToStr[];\r
 \r
 // maximum size of input and output buffers\r
 // This value came from the show remote command of the gdb we tested against\r
-#define MAX_BUF_SIZE 2000\r
+#define MAX_BUF_SIZE  2000\r
 \r
 // maximum size of address buffer\r
-#define MAX_ADDR_SIZE 32\r
+#define MAX_ADDR_SIZE  32\r
 \r
 // maximum size of register number buffer\r
-#define MAX_REG_NUM_BUF_SIZE 32\r
+#define MAX_REG_NUM_BUF_SIZE  32\r
 \r
 // maximum size of length buffer\r
-#define MAX_LENGTH_SIZE 32\r
+#define MAX_LENGTH_SIZE  32\r
 \r
 // maximum size of T signal members\r
-#define MAX_T_SIGNAL_SIZE 64\r
+#define MAX_T_SIGNAL_SIZE  64\r
 \r
 // the mask used to clear all the cache\r
-#define TF_BIT 0x00000100\r
-\r
+#define TF_BIT  0x00000100\r
 \r
 //\r
 // GDB Signal definitions - generic names for interrupts\r
 //\r
-#define GDB_SIGILL      4  // Illegal instruction\r
-#define GDB_SIGTRAP     5  // Trace Trap (Breakpoint and SingleStep)\r
-#define GDB_SIGEMT      7  // Emulator Trap\r
-#define GDB_SIGFPE      8  // Floating point exception\r
-#define GDB_SIGSEGV     11 // Segment violation, page fault\r
-\r
+#define GDB_SIGILL   4     // Illegal instruction\r
+#define GDB_SIGTRAP  5     // Trace Trap (Breakpoint and SingleStep)\r
+#define GDB_SIGEMT   7     // Emulator Trap\r
+#define GDB_SIGFPE   8     // Floating point exception\r
+#define GDB_SIGSEGV  11    // Segment violation, page fault\r
 \r
 //\r
 // GDB File I/O Error values, zero means no error\r
 // Includes all general GDB Unix like error values\r
 //\r
-#define GDB_EBADMEMADDRBUFSIZE   11  // the buffer that stores memory Address to be read from/written to is not the right size\r
-#define GDB_EBADMEMLENGBUFSIZE   12  // the buffer that stores Length is not the right size\r
-#define GDB_EBADMEMLENGTH        13  // Length, the given number of bytes to read or write, is not the right size\r
-#define GDB_EBADMEMDATA          14  // one of the bytes or nibbles of the memory is less than 0\r
-#define GDB_EBADMEMDATASIZE      15  // the memory data, 'XX..', is too short or too long\r
-#define GDB_EBADBUFSIZE          21  // the buffer created is not the correct size\r
-#define GDB_EINVALIDARG          31  // argument is invalid\r
-#define GDB_ENOSPACE             41  //\r
-#define GDB_EINVALIDBRKPOINTTYPE 51  // the breakpoint type is not recognized\r
-#define GDB_EINVALIDREGNUM       61  // given register number is not valid: either <0 or >=Number of Registers\r
-#define GDB_EUNKNOWN             255 // unknown\r
-\r
+#define GDB_EBADMEMADDRBUFSIZE    11  // the buffer that stores memory Address to be read from/written to is not the right size\r
+#define GDB_EBADMEMLENGBUFSIZE    12  // the buffer that stores Length is not the right size\r
+#define GDB_EBADMEMLENGTH         13  // Length, the given number of bytes to read or write, is not the right size\r
+#define GDB_EBADMEMDATA           14  // one of the bytes or nibbles of the memory is less than 0\r
+#define GDB_EBADMEMDATASIZE       15  // the memory data, 'XX..', is too short or too long\r
+#define GDB_EBADBUFSIZE           21  // the buffer created is not the correct size\r
+#define GDB_EINVALIDARG           31  // argument is invalid\r
+#define GDB_ENOSPACE              41  //\r
+#define GDB_EINVALIDBRKPOINTTYPE  51  // the breakpoint type is not recognized\r
+#define GDB_EINVALIDREGNUM        61  // given register number is not valid: either <0 or >=Number of Registers\r
+#define GDB_EUNKNOWN              255 // unknown\r
 \r
 //\r
 // These devices are open by GDB so we can just read and write to them\r
@@ -85,7 +82,7 @@ extern CONST CHAR8 mHexToStr[];
 #define GDB_STDERR  0x02\r
 \r
 //\r
-//Define Register size for different architectures\r
+// Define Register size for different architectures\r
 //\r
 #if defined (MDE_CPU_IA32)\r
 #define REG_SIZE  32\r
@@ -95,12 +92,12 @@ extern CONST CHAR8 mHexToStr[];
 #define REG_SIZE  32\r
 #endif\r
 \r
-#define GDB_SERIAL_DEV_SIGNATURE    SIGNATURE_32 ('g', 'd', 'b', 's')\r
+#define GDB_SERIAL_DEV_SIGNATURE  SIGNATURE_32 ('g', 'd', 'b', 's')\r
 \r
 typedef struct {\r
-  VENDOR_DEVICE_PATH                     VendorDevice;\r
-  UINT32                                 Index;         // Support more than one\r
-  EFI_DEVICE_PATH_PROTOCOL               End;\r
+  VENDOR_DEVICE_PATH          VendorDevice;\r
+  UINT32                      Index;                    // Support more than one\r
+  EFI_DEVICE_PATH_PROTOCOL    End;\r
 } GDB_SERIAL_DEVICE_PATH;\r
 \r
 //\r
@@ -113,25 +110,22 @@ typedef struct {
 //      DevicePath  EFI_DEVICE_PATH_PROTOCOL *: Device path of the serial device\r
 //\r
 typedef struct {\r
-  UINTN                                  Signature;\r
-  EFI_HANDLE                             Handle;\r
-  EFI_SERIAL_IO_PROTOCOL                 SerialIo;\r
-  EFI_SERIAL_IO_MODE                     SerialMode;\r
-  GDB_SERIAL_DEVICE_PATH                 DevicePath;\r
-  INTN                                   InFileDescriptor;\r
-  INTN                                   OutFileDescriptor;\r
+  UINTN                     Signature;\r
+  EFI_HANDLE                Handle;\r
+  EFI_SERIAL_IO_PROTOCOL    SerialIo;\r
+  EFI_SERIAL_IO_MODE        SerialMode;\r
+  GDB_SERIAL_DEVICE_PATH    DevicePath;\r
+  INTN                      InFileDescriptor;\r
+  INTN                      OutFileDescriptor;\r
 } GDB_SERIAL_DEV;\r
 \r
-\r
-#define GDB_SERIAL_DEV_FROM_THIS(a) CR (a, GDB_SERIAL_DEV, SerialIo, GDB_SERIAL_DEV_SIGNATURE)\r
-\r
+#define GDB_SERIAL_DEV_FROM_THIS(a)  CR (a, GDB_SERIAL_DEV, SerialIo, GDB_SERIAL_DEV_SIGNATURE)\r
 \r
 typedef struct {\r
-    EFI_EXCEPTION_TYPE  Exception;\r
-    UINT8               SignalNo;\r
+  EFI_EXCEPTION_TYPE    Exception;\r
+  UINT8                 SignalNo;\r
 } EFI_EXCEPTION_TYPE_ENTRY;\r
 \r
-\r
 #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)\r
 \r
 //\r
@@ -141,17 +135,17 @@ typedef struct {
 //\r
 typedef union {\r
   struct {\r
-    UINT32  B0:1;           // Breakpoint condition detected\r
-    UINT32  B1:1;           // Breakpoint condition detected\r
-    UINT32  B2:1;           // Breakpoint condition detected\r
-    UINT32  B3:1;           // Breakpoint condition detected\r
-    UINT32  Reserved_1:9;   // Reserved\r
-    UINT32  BD:1;           // Debug register access detected\r
-    UINT32  BS:1;           // Single step\r
-    UINT32  BT:1;           // Task switch\r
-    UINT32  Reserved_2:16;  // Reserved\r
+    UINT32    B0         : 1;  // Breakpoint condition detected\r
+    UINT32    B1         : 1;  // Breakpoint condition detected\r
+    UINT32    B2         : 1;  // Breakpoint condition detected\r
+    UINT32    B3         : 1;  // Breakpoint condition detected\r
+    UINT32    Reserved_1 : 9;  // Reserved\r
+    UINT32    BD         : 1;  // Debug register access detected\r
+    UINT32    BS         : 1;  // Single step\r
+    UINT32    BT         : 1;  // Task switch\r
+    UINT32    Reserved_2 : 16; // Reserved\r
   } Bits;\r
-  UINTN     UintN;\r
+  UINTN    UintN;\r
 } IA32_DR6;\r
 \r
 //\r
@@ -161,65 +155,64 @@ typedef union {
 //\r
 typedef union {\r
   struct {\r
-    UINT32  L0:1;           // Local breakpoint enable\r
-    UINT32  G0:1;           // Global breakpoint enable\r
-    UINT32  L1:1;           // Local breakpoint enable\r
-    UINT32  G1:1;           // Global breakpoint enable\r
-    UINT32  L2:1;           // Local breakpoint enable\r
-    UINT32  G2:1;           // Global breakpoint enable\r
-    UINT32  L3:1;           // Local breakpoint enable\r
-    UINT32  G3:1;           // Global breakpoint enable\r
-    UINT32  LE:1;           // Local exact breakpoint enable\r
-    UINT32  GE:1;           // Global exact breakpoint enable\r
-    UINT32  Reserved_1:3;   // Reserved\r
-    UINT32  GD:1;           // Global detect enable\r
-    UINT32  Reserved_2:2;   // Reserved\r
-    UINT32  RW0:2;          // Read/Write field\r
-    UINT32  LEN0:2;         // Length field\r
-    UINT32  RW1:2;          // Read/Write field\r
-    UINT32  LEN1:2;         // Length field\r
-    UINT32  RW2:2;          // Read/Write field\r
-    UINT32  LEN2:2;         // Length field\r
-    UINT32  RW3:2;          // Read/Write field\r
-    UINT32  LEN3:2;         // Length field\r
+    UINT32    L0         : 1; // Local breakpoint enable\r
+    UINT32    G0         : 1; // Global breakpoint enable\r
+    UINT32    L1         : 1; // Local breakpoint enable\r
+    UINT32    G1         : 1; // Global breakpoint enable\r
+    UINT32    L2         : 1; // Local breakpoint enable\r
+    UINT32    G2         : 1; // Global breakpoint enable\r
+    UINT32    L3         : 1; // Local breakpoint enable\r
+    UINT32    G3         : 1; // Global breakpoint enable\r
+    UINT32    LE         : 1; // Local exact breakpoint enable\r
+    UINT32    GE         : 1; // Global exact breakpoint enable\r
+    UINT32    Reserved_1 : 3; // Reserved\r
+    UINT32    GD         : 1; // Global detect enable\r
+    UINT32    Reserved_2 : 2; // Reserved\r
+    UINT32    RW0        : 2; // Read/Write field\r
+    UINT32    LEN0       : 2; // Length field\r
+    UINT32    RW1        : 2; // Read/Write field\r
+    UINT32    LEN1       : 2; // Length field\r
+    UINT32    RW2        : 2; // Read/Write field\r
+    UINT32    LEN2       : 2; // Length field\r
+    UINT32    RW3        : 2; // Read/Write field\r
+    UINT32    LEN3       : 2; // Length field\r
   } Bits;\r
-  UINTN     UintN;\r
+  UINTN    UintN;\r
 } IA32_DR7;\r
 \r
 #endif /* if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) */\r
 \r
 typedef enum {\r
-  InstructionExecution,   //Hardware breakpoint\r
-  DataWrite,              //watch\r
-  DataRead,               //rwatch\r
-  DataReadWrite,          //awatch\r
-  SoftwareBreakpoint,     //Software breakpoint\r
+  InstructionExecution,   // Hardware breakpoint\r
+  DataWrite,              // watch\r
+  DataRead,               // rwatch\r
+  DataReadWrite,          // awatch\r
+  SoftwareBreakpoint,     // Software breakpoint\r
   NotSupported\r
 } BREAK_TYPE;\r
 \r
 //\r
 // Array of exception types that need to be hooked by the debugger\r
 //\r
-extern EFI_EXCEPTION_TYPE_ENTRY gExceptionType[];\r
+extern EFI_EXCEPTION_TYPE_ENTRY  gExceptionType[];\r
 \r
 //\r
 // Set TRUE if F Reply package signals a ctrl-c. We can not process the Ctrl-c\r
 // here we need to wait for the periodic callback to do this.\r
 //\r
-extern BOOLEAN gCtrlCBreakFlag;\r
+extern BOOLEAN  gCtrlCBreakFlag;\r
 \r
 //\r
 // If the periodic callback is called while we are processing an F packet we need\r
 // to let the callback know to not read from the serial stream as it could steal\r
 // characters from the F response packet\r
 //\r
-extern BOOLEAN gProcessingFPacket;\r
-\r
+extern BOOLEAN  gProcessingFPacket;\r
 \r
 // The offsets of registers SystemContext.\r
 // The fields in the array are in the gdb ordering.\r
 //\r
-extern UINTN    gRegisterOffsets[];\r
+extern UINTN  gRegisterOffsets[];\r
 \r
 /**\r
  Return the number of entries in the gExceptionType[]\r
@@ -231,7 +224,6 @@ MaxEfiException (
   VOID\r
   );\r
 \r
-\r
 /**\r
  Return the number of entries in the gRegisters[]\r
 \r
@@ -242,7 +234,6 @@ MaxRegisterCount (
   VOID\r
   );\r
 \r
-\r
 /**\r
  Check to see if the ISA is supported.\r
  ISA = Instruction Set Architecture\r
@@ -252,10 +243,9 @@ MaxRegisterCount (
  **/\r
 BOOLEAN\r
 CheckIsa (\r
-  IN    EFI_INSTRUCTION_SET_ARCHITECTURE    Isa\r
+  IN    EFI_INSTRUCTION_SET_ARCHITECTURE  Isa\r
   );\r
 \r
-\r
 /**\r
  Send the T signal with the given exception type (in gdb order) and possibly with n:r pairs related to the watchpoints\r
 \r
@@ -269,7 +259,6 @@ GdbSendTSignal (
   IN  UINT8               GdbExceptionType\r
   );\r
 \r
-\r
 /**\r
  Translates the EFI mapping to GDB mapping\r
 \r
@@ -278,10 +267,9 @@ GdbSendTSignal (
  **/\r
 UINT8\r
 ConvertEFItoGDBtype (\r
-  IN  EFI_EXCEPTION_TYPE EFIExceptionType\r
+  IN  EFI_EXCEPTION_TYPE  EFIExceptionType\r
   );\r
 \r
-\r
 /**\r
  Empties the given buffer\r
  @param *Buf pointer to the first element in buffer to be emptied\r
@@ -291,7 +279,6 @@ EmptyBuffer (
   IN CHAR8  *Buf\r
   );\r
 \r
-\r
 /**\r
  Converts an 8-bit Hex Char into a INTN.\r
 \r
@@ -301,10 +288,9 @@ EmptyBuffer (
  **/\r
 INTN\r
 HexCharToInt (\r
-  IN  CHAR8 Char\r
+  IN  CHAR8  Char\r
   );\r
 \r
-\r
 /** 'E NN'\r
  Send an error with the given error number after converting to hex.\r
  The error number is put into the buffer in hex. '255' is the biggest errno we can send.\r
@@ -315,10 +301,9 @@ HexCharToInt (
 VOID\r
 EFIAPI\r
 SendError (\r
-  IN  UINT8     ErrorNum\r
+  IN  UINT8  ErrorNum\r
   );\r
 \r
-\r
 /**\r
  Send 'OK' when the function is done executing successfully.\r
  **/\r
@@ -328,7 +313,6 @@ SendSuccess (
   VOID\r
   );\r
 \r
-\r
 /**\r
  Send empty packet to specify that particular command/functionality is not supported.\r
  **/\r
@@ -349,7 +333,6 @@ ReadNthRegister (
   IN    CHAR8               *InBuffer\r
   );\r
 \r
-\r
 /** ‘g’\r
  Reads the general registers into an output buffer  and sends it as a packet\r
  @param     SystemContext           Register content at time of the exception\r
@@ -360,7 +343,6 @@ ReadGeneralRegisters (
   IN    EFI_SYSTEM_CONTEXT  SystemContext\r
   );\r
 \r
-\r
 /** ‘P n...=r...’\r
  Writes the new value of n-th register received into the input buffer to the n-th register\r
  @param     SystemContext       Register content at time of the exception\r
@@ -373,7 +355,6 @@ WriteNthRegister (
   IN    CHAR8               *InBuffer\r
   );\r
 \r
-\r
 /** ‘G XX...’\r
  Writes the new values received into the input buffer to the general registers\r
  @param     SystemContext               Register content at time of the exception\r
@@ -387,7 +368,6 @@ WriteGeneralRegisters (
   IN    CHAR8               *InBuffer\r
   );\r
 \r
-\r
 /** ‘m addr,length ’\r
  Find the Length of the area to read and the start address. Finally, pass them to\r
  another function, TransferFromMemToOutBufAndSend, that will read from that memory space and\r
@@ -401,7 +381,6 @@ ReadFromMemory (
   IN  CHAR8  *PacketData\r
   );\r
 \r
-\r
 /** ‘M addr,length :XX...’\r
  Find the Length of the area in bytes to write and the start address. Finally, pass them to\r
  another function, TransferFromInBufToMem, that will write to that memory space the info in\r
@@ -412,10 +391,9 @@ ReadFromMemory (
 VOID\r
 EFIAPI\r
 WriteToMemory (\r
-  IN CHAR8 *PacketData\r
+  IN CHAR8  *PacketData\r
   );\r
 \r
-\r
 /** ‘c [addr ]’\r
  Continue. addr is Address to resume. If addr is omitted, resume at current\r
  Address.\r
@@ -427,11 +405,10 @@ WriteToMemory (
 VOID\r
 EFIAPI\r
 ContinueAtAddress (\r
-  IN  EFI_SYSTEM_CONTEXT   SystemContext,\r
-  IN  CHAR8                *PacketData\r
+  IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
+  IN  CHAR8               *PacketData\r
   );\r
 \r
-\r
 /** ‘s [addr ]’\r
  Single step. addr is the Address at which to resume. If addr is omitted, resume\r
  at same Address.\r
@@ -466,7 +443,6 @@ RemoveSingleStep (
   IN  EFI_SYSTEM_CONTEXT  SystemContext\r
   );\r
 \r
-\r
 /**\r
   ‘Z1, [addr], [length]’\r
   ‘Z2, [addr], [length]’\r
@@ -481,12 +457,11 @@ RemoveSingleStep (
 **/\r
 VOID\r
 EFIAPI\r
-InsertBreakPoint(\r
+InsertBreakPoint (\r
   IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
   IN  CHAR8               *PacketData\r
   );\r
 \r
-\r
 /**\r
   ‘z1, [addr], [length]’\r
   ‘z2, [addr], [length]’\r
@@ -501,12 +476,11 @@ InsertBreakPoint(
 **/\r
 VOID\r
 EFIAPI\r
-RemoveBreakPoint(\r
+RemoveBreakPoint (\r
   IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
   IN  CHAR8               *PacketData\r
   );\r
 \r
-\r
 /**\r
  Exception Handler for GDB. It will be called for all exceptions\r
  registered via the gExceptionType[] array.\r
@@ -522,7 +496,6 @@ GdbExceptionHandler (
   IN OUT EFI_SYSTEM_CONTEXT  SystemContext\r
   );\r
 \r
-\r
 /**\r
  Periodic callback for GDB. This function is used to catch a ctrl-c or other\r
  break in type command from GDB.\r
@@ -536,7 +509,6 @@ GdbPeriodicCallBack (
   IN OUT EFI_SYSTEM_CONTEXT  SystemContext\r
   );\r
 \r
-\r
 /**\r
   Make two serial consoles: 1) StdIn and StdOut via GDB. 2) StdErr via GDB.\r
 \r
@@ -549,7 +521,6 @@ GdbInitializeSerialConsole (
   VOID\r
   );\r
 \r
-\r
 /**\r
   Send a GDB Remote Serial Protocol Packet\r
 \r
@@ -566,10 +537,9 @@ GdbInitializeSerialConsole (
 **/\r
 UINTN\r
 SendPacket (\r
-  IN  CHAR8 *PacketData\r
+  IN  CHAR8  *PacketData\r
   );\r
 \r
-\r
 /**\r
  Receive a GDB Remote Serial Protocol Packet\r
 \r
@@ -588,10 +558,9 @@ SendPacket (
  **/\r
 UINTN\r
 ReceivePacket (\r
- OUT  CHAR8 *PacketData,\r
- IN   UINTN PacketDataSize\r
- );\r
-\r
+  OUT  CHAR8  *PacketData,\r
+  IN   UINTN  PacketDataSize\r
+  );\r
 \r
 /**\r
   Read data from a FileDescriptor. On success number of bytes read is returned. Zero indicates\r
@@ -607,12 +576,11 @@ ReceivePacket (
 **/\r
 INTN\r
 GdbRead (\r
-  IN  INTN    FileDescriptor,\r
-  OUT VOID    *Buffer,\r
-  IN  UINTN   Count\r
+  IN  INTN   FileDescriptor,\r
+  OUT VOID   *Buffer,\r
+  IN  UINTN  Count\r
   );\r
 \r
-\r
 /**\r
   Write data to a FileDescriptor. On success number of bytes written is returned. Zero indicates\r
   nothing was written. On error -1 is returned.\r
@@ -627,29 +595,29 @@ GdbRead (
 **/\r
 INTN\r
 GdbWrite (\r
-  IN  INTN          FileDescriptor,\r
-  OUT CONST VOID    *Buffer,\r
-  IN  UINTN         Count\r
+  IN  INTN        FileDescriptor,\r
+  OUT CONST VOID  *Buffer,\r
+  IN  UINTN       Count\r
   );\r
 \r
 UINTN *\r
 FindPointerToRegister (\r
-  IN  EFI_SYSTEM_CONTEXT    SystemContext,\r
-  IN  UINTN                 RegNumber\r
+  IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
+  IN  UINTN               RegNumber\r
   );\r
 \r
 CHAR8 *\r
 BasicReadRegister (\r
-  IN  EFI_SYSTEM_CONTEXT      SystemContext,\r
-  IN  UINTN                   RegNumber,\r
-  IN  CHAR8                   *OutBufPtr\r
+  IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
+  IN  UINTN               RegNumber,\r
+  IN  CHAR8               *OutBufPtr\r
   );\r
 \r
 VOID\r
 TransferFromInBufToMem (\r
-  IN  UINTN   Length,\r
-  IN  UINT8   *Address,\r
-  IN  CHAR8   *NewData\r
+  IN  UINTN  Length,\r
+  IN  UINT8  *Address,\r
+  IN  CHAR8  *NewData\r
   );\r
 \r
 VOID\r
@@ -660,22 +628,22 @@ TransferFromMemToOutBufAndSend (
 \r
 CHAR8 *\r
 BasicWriteRegister (\r
-  IN  EFI_SYSTEM_CONTEXT    SystemContext,\r
-  IN  UINTN                 RegNumber,\r
-  IN  CHAR8                 *InBufPtr\r
+  IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
+  IN  UINTN               RegNumber,\r
+  IN  CHAR8               *InBufPtr\r
   );\r
 \r
 VOID\r
 PrintReg (\r
-  EFI_SYSTEM_CONTEXT SystemContext\r
+  EFI_SYSTEM_CONTEXT  SystemContext\r
   );\r
 \r
 UINTN\r
 ParseBreakpointPacket (\r
-  IN  CHAR8 *PacketData,\r
-  OUT UINTN *Type,\r
-  OUT UINTN *Address,\r
-  OUT UINTN *Length\r
+  IN  CHAR8  *PacketData,\r
+  OUT UINTN  *Type,\r
+  OUT UINTN  *Address,\r
+  OUT UINTN  *Length\r
   );\r
 \r
 UINTN\r
@@ -717,18 +685,18 @@ EnableDebugRegister (
 \r
 EFI_STATUS\r
 FindMatchingDebugRegister (\r
- IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
- IN  UINTN               Address,\r
- IN  UINTN               Length,\r
- IN  UINTN               Type,\r
- OUT UINTN               *Register\r
- );\r
 IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
 IN  UINTN               Address,\r
 IN  UINTN               Length,\r
 IN  UINTN               Type,\r
 OUT UINTN               *Register\r
 );\r
 \r
 EFI_STATUS\r
 DisableDebugRegister (\r
- IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
- IN  UINTN               Register\r
- );\r
 IN  EFI_SYSTEM_CONTEXT  SystemContext,\r
 IN  UINTN               Register\r
 );\r
 \r
 VOID\r
 InitializeProcessor (\r
@@ -742,8 +710,8 @@ ValidateAddress (
 \r
 BOOLEAN\r
 ValidateException (\r
-  IN  EFI_EXCEPTION_TYPE    ExceptionType,\r
-  IN OUT EFI_SYSTEM_CONTEXT SystemContext\r
+  IN  EFI_EXCEPTION_TYPE     ExceptionType,\r
+  IN OUT EFI_SYSTEM_CONTEXT  SystemContext\r
   );\r
 \r
 #endif\r