]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / DebugSupportDxe / Ia32 / PlDebugSupport.h
index 0fa93de100927ddd0045c640681fb58015f25179..0a1577fab3f80bff7fe54411bc475f4cda28114c 100644 (file)
@@ -1,8 +1,8 @@
-/**@file\r
+/** @file\r
   IA32 specific debug support macros, typedefs and prototypes.\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+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
 http://opensource.org/licenses/bsd-license.php                                            \r
@@ -12,321 +12,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _PLDEBUG_SUPPORT_H\r
-#define _PLDEBUG_SUPPORT_H\r
+#ifndef _PLDEBUG_SUPPORT_H_\r
+#define _PLDEBUG_SUPPORT_H_\r
 \r
+#include "Ia32/DebugSupport.h"\r
 \r
-#include <Uefi.h>\r
-\r
-#include <Protocol/DebugSupport.h>\r
-#include <Protocol/LoadedImage.h>\r
-\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/PcdLib.h>\r
-\r
-#define NUM_IDT_ENTRIES                 0x78\r
-#define SYSTEM_TIMER_VECTOR             0x68\r
-#define VECTOR_ENTRY_PAGES              1\r
-#define CopyDescriptor(Dest, Src)       CopyMem ((Dest), (Src), sizeof (DESCRIPTOR))\r
-#define ZeroDescriptor(Dest)            CopyDescriptor ((Dest), &NullDesc)\r
-#define ReadIdt(Vector, Dest)           CopyDescriptor ((Dest), &((GetIdtr ())[(Vector)]))\r
-#define WriteIdt(Vector, Src)           CopyDescriptor (&((GetIdtr ())[(Vector)]), (Src))\r
-#define CompareDescriptor(Desc1, Desc2) CompareMem ((Desc1), (Desc2), sizeof (DESCRIPTOR))\r
 #define EFI_ISA                         IsaIa32\r
-#define FF_FXSR                         (1 << 24)\r
-\r
-typedef UINT64  DESCRIPTOR;\r
-\r
-typedef\r
-VOID\r
-(*DEBUG_PROC) (\r
-  VOID\r
-  );\r
-\r
-typedef struct {\r
-  DESCRIPTOR  OrigDesc;\r
-  DEBUG_PROC  OrigVector;\r
-  DESCRIPTOR  NewDesc;\r
-  DEBUG_PROC  StubEntry;\r
-  VOID (*RegisteredCallback) ();\r
-} IDT_ENTRY;\r
-\r
-extern EFI_SYSTEM_CONTEXT SystemContext;\r
-extern UINT8              InterruptEntryStub[];\r
-extern UINT32             StubSize;\r
-extern VOID (*OrigVector) (VOID);\r
-\r
-VOID\r
-CommonIdtEntry (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Generic IDT entry\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-;\r
-\r
-\r
-BOOLEAN\r
-FxStorSupport (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Check whether FXSTOR is supported\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  TRUE  - supported\r
-  FALSE - not supported\r
-\r
---*/\r
-;\r
-\r
-DESCRIPTOR  *\r
-GetIdtr (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Return the physical address of IDTR\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  The physical address of IDTR\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-Vect2Desc (\r
-  DESCRIPTOR * DestDesc,\r
-  VOID (*Vector) (VOID)\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Encodes an IDT descriptor with the given physical address\r
-\r
-Arguments:\r
-\r
-  DestDesc  - The IDT descriptor address\r
-  Vector    - The interrupt vector entry\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-;\r
-\r
-BOOLEAN\r
-WriteInterruptFlag (\r
-  BOOLEAN NewState\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Programs interrupt flag to the requested state and returns previous\r
-  state.\r
-\r
-Arguments:\r
-\r
-  NewState  - New interrupt status\r
-\r
-Returns:\r
-\r
-  Old interrupt status\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-plInitializeDebugSupportDriver (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Initializes driver's handler registration database.\r
-\r
-  This code executes in boot services context.\r
-\r
-Arguments:\r
-  None\r
-\r
-Returns:\r
-  EFI_SUCCESS\r
-  EFI_UNSUPPORTED - if IA32 processor does not support FXSTOR/FXRSTOR instructions,\r
-                    the context save will fail, so these processor's are not supported.\r
-  EFI_OUT_OF_RESOURCES - not resource to finish initialization\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-plUnloadDebugSupportDriver (\r
-  IN EFI_HANDLE                       ImageHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This is the callback that is written to the LoadedImage protocol instance\r
-  on the image handle. It uninstalls all registered handlers and frees all entry\r
-  stub memory.\r
-\r
-  This code executes in boot services context.\r
-\r
-Arguments:\r
-  ImageHandle - The image handle of the unload handler\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS - always return success\r
-\r
---*/\r
-;\r
-\r
-//\r
-// DebugSupport protocol member functions\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-GetMaximumProcessorIndex (\r
-  IN EFI_DEBUG_SUPPORT_PROTOCOL       *This,\r
-  OUT UINTN                           *MaxProcessorIndex\r
-  )\r
-/*++\r
-\r
-Routine Description: This is a DebugSupport protocol member function.\r
-\r
-Arguments:\r
-  This              - The DebugSupport instance\r
-  MaxProcessorIndex - The maximuim supported processor index\r
-\r
-Returns:\r
-  Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-RegisterPeriodicCallback (\r
-  IN EFI_DEBUG_SUPPORT_PROTOCOL       *This,\r
-  IN UINTN                            ProcessorIndex,\r
-  IN EFI_PERIODIC_CALLBACK            PeriodicCallback\r
-  )\r
-/*++\r
-\r
-Routine Description: This is a DebugSupport protocol member function.\r
-\r
-Arguments:\r
-  This             - The DebugSupport instance\r
-  ProcessorIndex   - Which processor the callback applies to.\r
-  PeriodicCallback - Callback function\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS\r
-  EFI_INVALID_PARAMETER - requested uninstalling a handler from a vector that has\r
-                          no handler registered for it\r
-  EFI_ALREADY_STARTED   - requested install to a vector that already has a handler registered.\r
-\r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-RegisterExceptionCallback (\r
-  IN EFI_DEBUG_SUPPORT_PROTOCOL       *This,\r
-  IN UINTN                            ProcessorIndex,\r
-  IN EFI_EXCEPTION_CALLBACK           NewCallback,\r
-  IN EFI_EXCEPTION_TYPE               ExceptionType\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This is a DebugSupport protocol member function.\r
-\r
-  This code executes in boot services context.\r
-\r
-Arguments:\r
-  This             - The DebugSupport instance\r
-  ProcessorIndex   - Which processor the callback applies to.\r
-  NewCallback      - Callback function\r
-  ExceptionType    - Which exception to hook\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS\r
-  EFI_INVALID_PARAMETER - requested uninstalling a handler from a vector that has\r
-                          no handler registered for it\r
-  EFI_ALREADY_STARTED   - requested install to a vector that already has a handler registered.\r
-\r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-InvalidateInstructionCache (\r
-  IN EFI_DEBUG_SUPPORT_PROTOCOL       *This,\r
-  IN UINTN                            ProcessorIndex,\r
-  IN VOID                             *Start,\r
-  IN UINT64                           Length\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  This is a DebugSupport protocol member function.\r
-  Calls assembly routine to flush cache.\r
-\r
-Arguments:\r
-  This             - The DebugSupport instance\r
-  ProcessorIndex   - Which processor the callback applies to.\r
-  Start            - Physical base of the memory range to be invalidated\r
-  Length           - mininum number of bytes in instruction cache to invalidate\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS - always return success\r
-\r
---*/\r
-;\r
 \r
 #endif\r