]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ECC clean up.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 5 Nov 2008 08:44:03 +0000 (08:44 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 5 Nov 2008 08:44:03 +0000 (08:44 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6405 6f19259b-4bc3-4df7-8a09-765794883524

12 files changed:
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c
MdeModulePkg/Universal/DebugPortDxe/DebugPort.c
MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c
MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c
MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h
MdeModulePkg/Universal/DebugSupportDxe/Ipf/PlDebugSupport.c
MdeModulePkg/Universal/DebugSupportDxe/Ipf/PlDebugSupport.h
MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.c
MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h

index dacef61d45d59118961e6b160b99150574c15508..67052b20b3a58c5cea773727ca7e1b5648f362f7 100644 (file)
@@ -2242,7 +2242,7 @@ ConSplitterAddOutputMode (
 }\r
 \r
 /**\r
-  Reconstruct TextOutModeMap to get intersection of modes\r
+  Reconstruct TextOutModeMap to get intersection of modes.\r
 \r
   This routine reconstruct TextOutModeMap to get the intersection\r
   of modes for all console out devices. Because EFI/UEFI spec require\r
@@ -2256,8 +2256,6 @@ ConSplitterAddOutputMode (
   @param MaxMode         Current max text mode\r
   @param CurrentMode     Current text mode\r
 \r
-  @retval None\r
-\r
 **/\r
 VOID\r
 ConSplitterGetIntersection (\r
index bb80120d38cb38be887794b4af97481854e2f8ae..5d0cb42ae76baa34f292c5cec4467cec5cf70f83 100644 (file)
@@ -30,7 +30,7 @@ CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
 \r
   @param  This                    Protocol instance pointer.\r
   @param  Mode                    Are we in text of grahics mode.\r
-  @param  GopExists               TRUE if Console Spliter has found a GOP or UGA device\r
+  @param  GopUgaExists            TRUE if Console Spliter has found a GOP or UGA device\r
   @param  StdInLocked             TRUE if StdIn device is keyboard locked\r
 \r
   @retval EFI_SUCCESS             Mode information returned.\r
index 862826c83ef495ef4e535e4ae3f0dbcc66cc0ab6..57fdb07c18b4755a7bb7af4cc9411b5dfd24d214 100644 (file)
@@ -586,7 +586,7 @@ TerminalConOutEnableCursor (
   Test to see if this driver supports Controller. \r
 \r
   @param  This                Protocol instance pointer.\r
-  @param  Controller          Handle of device to test\r
+  @param  ControllerHandle    Handle of device to test\r
   @param  RemainingDevicePath Optional parameter use to pick a specific child\r
                               device to start.\r
 \r
@@ -1305,8 +1305,6 @@ UnicodeToUtf8 (
   @param  ValidBytes          The count of returned VT-VTF8 characters. \r
                               If ValidBytes is zero, no valid VT-UTF8 returned.\r
 \r
-  @retval None.\r
-\r
 **/\r
 VOID\r
 GetOneValidUtf8Char (\r
index acdb8ca6f5c7244d176922a866937e2ed27de1b2..6b1ec577f810ea8e5f2f9bff63c407a750f2855c 100644 (file)
@@ -60,8 +60,6 @@ VTUTF8RawDataToUnicode (
   @param  ValidBytes          The count of returned VT-VTF8 characters. \r
                               If ValidBytes is zero, no valid VT-UTF8 returned.\r
 \r
-  @retval None.\r
-\r
 **/\r
 VOID\r
 GetOneValidUtf8Char (\r
index b91003f212ea111f8e9ceac435aabaf670e72abf..932c772d48fca683974dc2e1d63c685c5c42eac8 100644 (file)
@@ -114,7 +114,7 @@ GetDebugPortVariable (
 //\r
 \r
 /**\r
-  Debug Port Driver entry pointo\r
+  Debug Port Driver entry point. \r
 \r
   Reads DebugPort variable to determine what device and settings to use as the\r
   debug port.  Binds exclusively to SerialIo. Reverts to defaults if no variable\r
index 04be432e9f9c06a35843992b59a951c3737659d2..ed4d86038aa8d75b72f7d8a752e53e4d4139f613 100644 (file)
@@ -28,31 +28,26 @@ EFI_DEBUG_SUPPORT_PROTOCOL  gDebugSupportProtocolInterface = {
   InvalidateInstructionCache\r
 };\r
 \r
-//\r
-// Driver Entry Point\r
-//\r
+\r
+/**\r
+  Debug Port Driver entry point. \r
+\r
+  Checks to see there's not already a DebugSupport protocol installed for \r
+  the selected processor before installing protocol.\r
+\r
+  @param[in] ImageHandle       The firmware allocated handle for the EFI image.  \r
+  @param[in] SystemTable       A pointer to the EFI System Table.\r
+  \r
+  @retval EFI_SUCCESS          The entry point is executed successfully.\r
+  @retval EFI_ALREADY_STARTED  DebugSupport protocol is installed already.\r
+  @retval other                Some error occurs when executing this entry point.\r
+\r
+**/\r
 EFI_STATUS\r
 InitializeDebugSupportDriver (\r
   IN EFI_HANDLE               ImageHandle,\r
   IN EFI_SYSTEM_TABLE         *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Driver entry point.  Checks to see there's not already a DebugSupport protocol\r
-  installed for the selected processor before installing protocol.\r
-\r
-Arguments:\r
-  IN EFI_HANDLE               ImageHandle,\r
-  IN EFI_SYSTEM_TABLE         *SystemTable\r
-\r
-Returns:\r
-\r
-  EFI_STATUS\r
-\r
---*/\r
-// TODO:    ImageHandle - add argument and description to function comment\r
-// TODO:    SystemTable - add argument and description to function comment\r
 {\r
   EFI_LOADED_IMAGE_PROTOCOL   *LoadedImageProtocolPtr;\r
   EFI_STATUS                  Status;\r
@@ -111,12 +106,12 @@ Returns:
     goto ErrExit;\r
   }\r
 \r
-  LoadedImageProtocolPtr->Unload = plUnloadDebugSupportDriver;\r
+  LoadedImageProtocolPtr->Unload = PlUnloadDebugSupportDriver;\r
 \r
   //\r
   // Call hook for platform specific initialization\r
   //\r
-  Status = plInitializeDebugSupportDriver ();\r
+  Status = PlInitializeDebugSupportDriver ();\r
   ASSERT (!EFI_ERROR (Status));\r
   if (Status != EFI_SUCCESS) {\r
     goto ErrExit;\r
index 6c219d01e4865ceaf705af947c84b4d1b2e676af..c650e6391fd7fe52a38fa75abc2e5b270f512d81 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   IA32 specific debug support functions\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation\r
 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
@@ -23,25 +23,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 IDT_ENTRY   *IdtEntryTable  = NULL;\r
 DESCRIPTOR  NullDesc        = 0;\r
 \r
+/**\r
+  Allocate pool for a new IDT entry stub.\r
+\r
+  Copy the generic stub into the new buffer and fixup the vector number\r
+  and jump target address.\r
+\r
+  @param  ExceptionType   This is the exception type that the new stub will be created\r
+                          for.\r
+  @param  Stub            On successful exit, *Stub contains the newly allocated entry stub.\r
+\r
+  @retval EFI_SUCCESS     Always.\r
+\r
+**/\r
 EFI_STATUS\r
 CreateEntryStub (\r
   IN EFI_EXCEPTION_TYPE     ExceptionType,\r
   OUT VOID                  **Stub\r
   )\r
-/*++\r
-\r
-Routine Description: Allocate pool for a new IDT entry stub.  Copy the generic\r
-    stub into the new buffer and fixup the vector number and jump target address.\r
-\r
-Arguments:\r
-    ExceptionType - This is the exception type that the new stub will be created\r
-                    for.\r
-    Stub - On successful exit, *Stub contains the newly allocated entry stub.\r
-Returns:\r
-  Typically EFI_SUCCESS\r
-  other possibilities are passed through from AllocatePool\r
-\r
---*/\r
 {\r
   UINT8       *StubCopy;\r
 \r
@@ -73,14 +72,7 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-HookEntry (\r
-  IN EFI_EXCEPTION_TYPE            ExceptionType,\r
-  IN VOID                         (*NewCallback) ()\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   Creates a nes entry stub.  Then saves the current IDT entry and replaces it\r
   with an interrupt gate for the new entry point.  The IdtEntryTable is updated\r
   with the new registered function.\r
@@ -88,15 +80,17 @@ Routine Description:
   This code executes in boot services context.  The stub entry executes in interrupt\r
   context.\r
 \r
-Arguments:\r
-  ExceptionType - specifies which vector to hook.\r
-  NewCallback - a pointer to the new function to be registered.\r
+  @param  ExceptionType      Specifies which vector to hook.\r
+  @param  NewCallback        A pointer to the new function to be registered.\r
 \r
-Returns:\r
-  EFI_SUCCESS\r
-  Other possibilities are passed through by CreateEntryStub\r
+  @retval EFI_SUCCESS        Always.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+HookEntry (\r
+  IN EFI_EXCEPTION_TYPE            ExceptionType,\r
+  IN VOID                         (*NewCallback) ()\r
+  )\r
 {\r
   BOOLEAN     OldIntFlagState;\r
   EFI_STATUS  Status;\r
@@ -104,81 +98,72 @@ Returns:
   Status = CreateEntryStub (ExceptionType, (VOID **) &IdtEntryTable[ExceptionType].StubEntry);\r
   if (Status == EFI_SUCCESS) {\r
     OldIntFlagState = WriteInterruptFlag (0);\r
-    ReadIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
+    READ_IDT (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
 \r
     ((UINT16 *) &IdtEntryTable[ExceptionType].OrigVector)[0]  = ((UINT16 *) &IdtEntryTable[ExceptionType].OrigDesc)[0];\r
     ((UINT16 *) &IdtEntryTable[ExceptionType].OrigVector)[1]  = ((UINT16 *) &IdtEntryTable[ExceptionType].OrigDesc)[3];\r
 \r
     Vect2Desc (&IdtEntryTable[ExceptionType].NewDesc, IdtEntryTable[ExceptionType].StubEntry);\r
     IdtEntryTable[ExceptionType].RegisteredCallback = NewCallback;\r
-    WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].NewDesc));\r
+    WRITE_IDT (ExceptionType, &(IdtEntryTable[ExceptionType].NewDesc));\r
     WriteInterruptFlag (OldIntFlagState);\r
   }\r
 \r
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-UnhookEntry (\r
-  IN EFI_EXCEPTION_TYPE           ExceptionType\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   Undoes HookEntry. This code executes in boot services context.\r
 \r
-Arguments:\r
-  ExceptionType - specifies which entry to unhook\r
+  @param  ExceptionType   Specifies which entry to unhook\r
 \r
-Returns:\r
-  EFI_SUCCESS\r
+  @retval EFI_SUCCESS     Always.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+UnhookEntry (\r
+  IN EFI_EXCEPTION_TYPE           ExceptionType\r
+  )\r
 {\r
   BOOLEAN     OldIntFlagState;\r
 \r
   OldIntFlagState = WriteInterruptFlag (0);\r
-  WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
+  WRITE_IDT (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
   WriteInterruptFlag (OldIntFlagState);\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-ManageIdtEntryTable (\r
-  VOID (*NewCallback)(),\r
-  EFI_EXCEPTION_TYPE ExceptionType\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   This is the main worker function that manages the state of the interrupt\r
   handlers.  It both installs and uninstalls interrupt handlers based on the\r
   value of NewCallback.  If NewCallback is NULL, then uninstall is indicated.\r
   If NewCallback is non-NULL, then install is indicated.\r
 \r
-Arguments:\r
-  NewCallback - If non-NULL, NewCallback specifies the new handler to register.\r
-                If NULL, specifies that the previously registered handler should\r
-                    be uninstalled.\r
-  ExceptionType - Indicates which entry to manage\r
-\r
-Returns:\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
+  @param  NewCallback   If non-NULL, NewCallback specifies the new handler to register.\r
+                        If NULL, specifies that the previously registered handler should\r
+                        be uninstalled.\r
+  @param  ExceptionType Indicates which entry to manage.\r
 \r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
+  @retval EFI_SUCCESS            Process is ok.\r
+  @retval EFI_INVALID_PARAMETER  Requested uninstalling a handler from a vector that has\r
+                                 no handler registered for it\r
+  @retval EFI_ALREADY_STARTED    Requested install to a vector that already has a handler registered.\r
+  @retval others                 Possible return values are passed through from UnHookEntry and HookEntry.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+ManageIdtEntryTable (\r
+  VOID (*NewCallback)(),\r
+  EFI_EXCEPTION_TYPE ExceptionType\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
 \r
   Status = EFI_SUCCESS;\r
 \r
   if (!FeaturePcdGet (PcdNtEmulatorEnable)) {\r
-    if (CompareDescriptor (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc)) {\r
+    if (COMPARE_DESCRIPTOR (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc)) {\r
       //\r
       // we've already installed to this vector\r
       //\r
@@ -208,29 +193,38 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+  This is a DebugSupport protocol member function, hard\r
+  coded to support only 1 processor for now.\r
+\r
+  @param  This                The DebugSupport instance\r
+  @param  MaxProcessorIndex   The maximuim supported processor index\r
+\r
+  @retval EFI_SUCCESS         Always returned with **MaxProcessorIndex set to 0.\r
+\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
   *MaxProcessorIndex = 0;\r
   return (EFI_SUCCESS);\r
 }\r
 \r
+/**\r
+  DebugSupport protocol member function.\r
+\r
+  @param  This               The DebugSupport instance\r
+  @param  ProcessorIndex     Which processor the callback applies to.\r
+  @param  PeriodicCallback   Callback function\r
+\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterPeriodicCallback (\r
@@ -238,29 +232,24 @@ RegisterPeriodicCallback (
   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
+  return ManageIdtEntryTable (PeriodicCallback, SYSTEM_TIMER_VECTOR);\r
+}\r
 \r
-Returns:\r
+/**\r
+  DebugSupport protocol member function.\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
+  This code executes in boot services context.\r
 \r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  NewCallback       Callback function\r
+  @param  ExceptionType     Which exception to hook\r
 \r
---*/\r
-{\r
-  return ManageIdtEntryTable (PeriodicCallback, SYSTEM_TIMER_VECTOR);\r
-}\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterExceptionCallback (\r
@@ -269,33 +258,21 @@ RegisterExceptionCallback (
   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
   return ManageIdtEntryTable (NewCallback, ExceptionType);\r
 }\r
 \r
+/**\r
+  DebugSupport protocol member function.  Calls assembly routine to flush cache.\r
+\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  Start             Physical base of the memory range to be invalidated\r
+  @param  Length            mininum number of bytes in instruction cache to invalidate\r
+\r
+  @retval EFI_SUCCESS       Always returned.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InvalidateInstructionCache (\r
@@ -304,49 +281,27 @@ InvalidateInstructionCache (
   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
   AsmWbinvd ();\r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Initializes driver's handler registration databas. \r
+  \r
+  This code executes in boot services context\r
+  Must be public because it's referenced from DebugSupport.c\r
+\r
+  @retval  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
+  @retval  EFI_OUT_OF_RESOURCES Fails to allocate memory.\r
+  @retval  EFI_SUCCESS          Initializes successfully.\r
+\r
+**/\r
 EFI_STATUS\r
-plInitializeDebugSupportDriver (\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
   EFI_EXCEPTION_TYPE  ExceptionType;\r
 \r
@@ -381,28 +336,21 @@ ErrorCleanup:
   return EFI_OUT_OF_RESOURCES;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-plUnloadDebugSupportDriver (\r
-  IN EFI_HANDLE ImageHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\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
+  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
 \r
-  EFI_SUCCESS - always return success\r
+  @retval EFI_SUCCESS    Always.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PlUnloadDebugSupportDriver (\r
+  IN EFI_HANDLE ImageHandle\r
+  )\r
 {\r
   EFI_EXCEPTION_TYPE  ExceptionType;\r
 \r
@@ -414,26 +362,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Common piece of code that invokes the registered handlers.\r
+\r
+  This code executes in exception context so no efi calls are allowed.\r
+\r
+  @param  ExceptionType     Exception type\r
+  @param  ContextRecord     System context\r
+\r
+**/\r
 VOID\r
 InterruptDistrubutionHub (\r
   EFI_EXCEPTION_TYPE      ExceptionType,\r
   EFI_SYSTEM_CONTEXT_IA32 *ContextRecord\r
   )\r
-/*++\r
-\r
-Routine Description: Common piece of code that invokes the registered handlers.\r
-\r
-  This code executes in exception context so no efi calls are allowed.\r
-\r
-Arguments:\r
-  ExceptionType - exception type\r
-  ContextRecord - system context\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   if (IdtEntryTable[ExceptionType].RegisteredCallback != NULL) {\r
     if (ExceptionType != SYSTEM_TIMER_VECTOR) {\r
index 0fa93de100927ddd0045c640681fb58015f25179..1566f3e8b7601c3a84a0f617ff1af19c7eee37a4 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   IA32 specific debug support macros, typedefs and prototypes.\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 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
@@ -12,8 +12,8 @@ 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
 \r
 #include <Uefi.h>\r
@@ -32,11 +32,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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 COPY_DESCRIPTOR(Dest, Src)       CopyMem ((Dest), (Src), sizeof (DESCRIPTOR))\r
+#define READ_IDT(Vector, Dest)           COPY_DESCRIPTOR ((Dest), &((GetIdtr ())[(Vector)]))\r
+#define WRITE_IDT(Vector, Src)           COPY_DESCRIPTOR (&((GetIdtr ())[(Vector)]), (Src))\r
+#define COMPARE_DESCRIPTOR(Desc1, Desc2) CompareMem ((Desc1), (Desc2), sizeof (DESCRIPTOR))\r
 #define EFI_ISA                         IsaIa32\r
 #define FF_FXSR                         (1 << 24)\r
 \r
@@ -61,214 +60,149 @@ extern UINT8              InterruptEntryStub[];
 extern UINT32             StubSize;\r
 extern VOID (*OrigVector) (VOID);\r
 \r
+/**\r
+  Generic IDT entry.\r
+\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
+  Check whether FXSTOR is supported\r
 \r
+  @retval TRUE   FXSTOR is supported.\r
+  @retval FALSE  FXSTOR is not supported.\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
 \r
-  TRUE  - supported\r
-  FALSE - not supported\r
+/**\r
+  Return the physical address of IDTR.\r
 \r
---*/\r
-;\r
+  @return The physical address of IDTR.\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
 \r
-  The physical address of IDTR\r
+/**\r
+  Encodes an IDT descriptor with the given physical address.\r
 \r
---*/\r
-;\r
+  @param  DestDesc    The IDT descriptor address.\r
+  @param  Vecotr      The interrupt vector entry.\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
 \r
-Returns:\r
+/**\r
+  Programs interrupt flag to the requested state and returns previous\r
+  state.\r
 \r
-  None\r
+  @param  NewState    New interrupt status.\r
 \r
---*/\r
-;\r
+  @retval TRUE     Old interrupt status is TRUE.\r
+  @retval FALSE    Old interrupt status is FALSE\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
 \r
-  Old interrupt status\r
+/**\r
+  Initializes driver's handler registration databas. \r
+  \r
+  This code executes in boot services context\r
+  Must be public because it's referenced from DebugSupport.c\r
 \r
---*/\r
-;\r
+  @retval  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
+  @retval  EFI_OUT_OF_RESOURCES Fails to allocate memory.\r
+  @retval  EFI_SUCCESS          Initializes successfully.\r
 \r
+**/\r
 EFI_STATUS\r
-plInitializeDebugSupportDriver (\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
 \r
-Arguments:\r
-  None\r
+/**\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
-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
+  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS    Always.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
-plUnloadDebugSupportDriver (\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
 \r
-Returns:\r
+/**\r
+  This is a DebugSupport protocol member function, hard\r
+  coded to support only 1 processor for now.\r
 \r
-  EFI_SUCCESS - always return success\r
+  @param  This                The DebugSupport instance\r
+  @param  MaxProcessorIndex   The maximuim supported processor index\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS         Always returned with **MaxProcessorIndex set to 0.\r
 \r
-//\r
-// DebugSupport protocol member functions\r
-//\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
 \r
-Arguments:\r
-  This              - The DebugSupport instance\r
-  MaxProcessorIndex - The maximuim supported processor index\r
+/**\r
+  DebugSupport protocol member function.\r
 \r
-Returns:\r
-  Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
+  @param  This               The DebugSupport instance\r
+  @param  ProcessorIndex     Which processor the callback applies to.\r
+  @param  PeriodicCallback   Callback function\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\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
 \r
-Returns:\r
+/**\r
+  DebugSupport protocol member function.\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
+  This code executes in boot services context.\r
 \r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  NewCallback       Callback function\r
+  @param  ExceptionType     Which exception to hook\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterExceptionCallback (\r
@@ -276,32 +210,19 @@ RegisterExceptionCallback (
   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
 \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
+  DebugSupport protocol member function.  Calls assembly routine to flush cache.\r
 \r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  Start             Physical base of the memory range to be invalidated\r
+  @param  Length            mininum number of bytes in instruction cache to invalidate\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS       Always returned.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InvalidateInstructionCache (\r
@@ -309,24 +230,6 @@ InvalidateInstructionCache (
   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
 \r
 #endif\r
index d47959f00d502901ca62de791c7a80f6c5468466..5402e04041ca873edb7f309992481ec7fba05d45 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   IPF specific debug support functions\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
@@ -35,35 +35,82 @@ typedef struct {
   VOID (*RegisteredCallback) ();\r
 } IVT_ENTRY;\r
 \r
+/**\r
+  This is the worker function that uninstalls and removes all handlers.\r
+\r
+  @param  ExceptionType     Exception Type\r
+  @param  NewBundles        New Boundles\r
+  @param  NewCallback       New Callback\r
+\r
+  @retval EFI_ALEADY_STARTED Ivt already hooked.\r
+  @retval others             Indicates the request was not satisfied.\r
+  @retval EFI_SUCCESS        Successfully uninstalled.\r
+\r
+**/\r
 EFI_STATUS\r
 ManageIvtEntryTable (\r
-  IN  EFI_EXCEPTION_TYPE                ExceptionType,\r
+  IN  EFI_EXCEPTION_TYPE    ExceptionType,\r
   IN  BUNDLE                NewBundles[4],\r
   IN  VOID                  (*NewCallback) ()\r
   );\r
 \r
+/**\r
+  Saves original IVT contents and inserts a few new bundles which are fixed up\r
+  to store the ExceptionType and then call the common handler.\r
+\r
+  @param  ExceptionType      Exception Type\r
+  @param  NewBundles         New Boundles\r
+  @param  NewCallback        New Callback\r
+\r
+**/\r
 VOID\r
 HookEntry (\r
-  IN  EFI_EXCEPTION_TYPE                ExceptionType,\r
+  IN  EFI_EXCEPTION_TYPE    ExceptionType,\r
   IN  BUNDLE                NewBundles[4],\r
   IN  VOID                  (*NewCallback) ()\r
   );\r
 \r
+/**\r
+  Restores original IVT contents when unregistering a callback function.\r
+\r
+  @param  ExceptionType     Exception Type\r
+\r
+**/\r
 VOID\r
 UnhookEntry (\r
   IN  EFI_EXCEPTION_TYPE    ExceptionType\r
   );\r
 \r
+/**\r
+  Sets up cache flush and calls assembly function to chain external interrupt.\r
+\r
+  Records new callback in IvtEntryTable.\r
+\r
+  @param  NewCallback     New Callback.\r
+\r
+**/\r
 VOID\r
 ChainExternalInterrupt (\r
   IN  VOID                  (*NewCallback) ()\r
   );\r
 \r
+/**\r
+  Sets up cache flush and calls assembly function to restore external interrupt.\r
+  Removes registered callback from IvtEntryTable.\r
+\r
+**/\r
 VOID\r
 UnchainExternalInterrupt (\r
   VOID\r
   );\r
 \r
+/**\r
+  Given an integer number, return the physical address of the entry point in the IFT.\r
+\r
+  @param  HandlerIndex       Index of the Handler \r
+  @param  EntryPoint         IFT Entrypoint\r
+\r
+**/\r
 VOID\r
 GetHandlerEntryPoint (\r
   UINTN                     HandlerIndex,\r
@@ -85,48 +132,38 @@ UINT8     IpfContextBuf[sizeof (EFI_SYSTEM_CONTEXT_IPF) + 512];
 UINT8     PatchSaveBuffer[0x400];\r
 UINTN     ExternalInterruptCount;\r
 \r
-EFI_STATUS\r
-plInitializeDebugSupportDriver (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  IPF specific DebugSupport driver initialization.  Must be public because it's\r
-  referenced from DebugSupport.c\r
+/**\r
+  IPF specific DebugSupport driver initialization. \r
 \r
-Arguments:\r
+  Must be public because it's referenced from DebugSupport.c\r
 \r
-Returns:\r
+  @retval  EFI_SUCCESS     Always.\r
 \r
-  EFI_SUCCESS\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+PlInitializeDebugSupportDriver (\r
+  VOID\r
+  )\r
 {\r
   SetMem (IvtEntryTable, sizeof (IvtEntryTable), 0);\r
   ExternalInterruptCount = 0;\r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-plUnloadDebugSupportDriver (\r
-  IN EFI_HANDLE       ImageHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   Unload handler that is called during UnloadImage() - deallocates pool memory\r
   used by the driver.  Must be public because it's referenced from DebugSuport.c\r
 \r
-Arguments:\r
-  ImageHandle - Image handle\r
-\r
-Returns:\r
+  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
 \r
-  EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
+  @retval EFI_SUCCESS    Always.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PlUnloadDebugSupportDriver (\r
+  IN EFI_HANDLE       ImageHandle\r
+  )\r
 {\r
   EFI_EXCEPTION_TYPE  ExceptionType;\r
 \r
@@ -137,26 +174,18 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  C routine that is called for all registered exceptions.  This is the main\r
+  exception dispatcher.  Must be public because it's referenced from AsmFuncs.s.\r
+\r
+  @param  ExceptionType        Exception Type\r
+  @param  Context              System Context\r
+**/\r
 VOID\r
 CommonHandler (\r
   IN EFI_EXCEPTION_TYPE ExceptionType,\r
   IN EFI_SYSTEM_CONTEXT Context\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  C routine that is called for all registered exceptions.  This is the main\r
-  exception dispatcher.  Must be public because it's referenced from AsmFuncs.s.\r
-\r
-Arguments:\r
-  ExceptionType - Exception Type\r
-  Context       - System Context\r
-\r
-Returns:\r
-\r
-  Nothing\r
-  \r
---*/\r
 {\r
   DEBUG_CODE_BEGIN ();\r
     if (mInHandler) {\r
@@ -189,25 +218,18 @@ Returns:
   mInHandler = FALSE;\r
 }\r
 \r
+/**\r
+  Given an integer number, return the physical address of the entry point in the IFT.\r
+\r
+  @param  HandlerIndex       Index of the Handler \r
+  @param  EntryPoint         IFT Entrypoint\r
+\r
+**/\r
 VOID\r
 GetHandlerEntryPoint (\r
   UINTN   HandlerIndex,\r
   VOID    **EntryPoint\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Given an integer number, return the physical address of the entry point in the IFT\r
-  \r
-Arguments:\r
-  HandlerIndex - Index of the Handler \r
-  EntryPoint   - IFT Entrypoint\r
-\r
-Returns:\r
-\r
-  Nothing\r
-  \r
---*/\r
 {\r
   UINT8 *TempPtr;\r
 \r
@@ -231,29 +253,24 @@ Returns:
   *EntryPoint = (VOID *) TempPtr;\r
 }\r
 \r
+/**\r
+  This is the worker function that uninstalls and removes all handlers.\r
+\r
+  @param  ExceptionType     Exception Type\r
+  @param  NewBundles        New Boundles\r
+  @param  NewCallback       New Callback\r
+\r
+  @retval EFI_ALEADY_STARTED Ivt already hooked.\r
+  @retval others             Indicates the request was not satisfied.\r
+  @retval EFI_SUCCESS        Successfully uninstalled.\r
+\r
+**/\r
 EFI_STATUS\r
 ManageIvtEntryTable (\r
-  IN  EFI_EXCEPTION_TYPE                                         ExceptionType,\r
+  IN  EFI_EXCEPTION_TYPE           ExceptionType,\r
   IN  BUNDLE                       NewBundles[NUM_BUNDLES_IN_STUB],\r
   IN  VOID                         (*NewCallback) ()\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  This is the worker function that installs and removes all handlers\r
-  \r
-Arguments:\r
-  ExceptionType  - Exception Type\r
-  NewBundles     - New Boundles\r
-  NewCallback    - New Callback\r
-\r
-Returns:\r
-\r
-  EFI_STATUS - any return other than EFI_SUCCESS indicates the request was not\r
-  satisfied.\r
-  EFI_ALEADY_STARTED - Ivt already hooked.\r
-  \r
---*/\r
 {\r
   BUNDLE  *B0Ptr;\r
   UINT64  InterruptFlags;\r
@@ -313,28 +330,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Saves original IVT contents and inserts a few new bundles which are fixed up\r
+  to store the ExceptionType and then call the common handler.\r
+\r
+  @param  ExceptionType      Exception Type\r
+  @param  NewBundles         New Boundles\r
+  @param  NewCallback        New Callback\r
+\r
+**/\r
 VOID\r
 HookEntry (\r
   IN  EFI_EXCEPTION_TYPE  ExceptionType,\r
   IN  BUNDLE              NewBundles[4],\r
   IN  VOID                (*NewCallback) ()\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Saves original IVT contents and inserts a few new bundles which are fixed up\r
-  to store the ExceptionType and then call the common handler.\r
-  \r
-Arguments:\r
-  ExceptionType  - Exception Type\r
-  NewBundles     - New Boundles\r
-  NewCallback    - New Callback\r
-\r
-Returns:\r
-\r
-  Nothing\r
-    \r
---*/\r
 {\r
   BUNDLE  *FixupBundle;\r
   BUNDLE  *B0Ptr;\r
@@ -367,25 +377,16 @@ Returns:
   IvtEntryTable[ExceptionType].RegisteredCallback = NewCallback;\r
 }\r
 \r
+/**\r
+  Restores original IVT contents when unregistering a callback function.\r
+\r
+  @param  ExceptionType     Exception Type\r
+\r
+**/\r
 VOID\r
 UnhookEntry (\r
   IN  EFI_EXCEPTION_TYPE  ExceptionType\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Restores original IVT contents when unregistering a callback function\r
-  \r
-Arguments:\r
-  ExceptionType  - Exception Type\r
-  NewBundles     - New Boundles\r
-  NewCallback    - New Callback\r
-\r
-Returns:\r
-\r
-  Nothing\r
-    \r
---*/\r
 {\r
   BUNDLE  *B0Ptr;\r
 \r
@@ -404,24 +405,18 @@ Returns:
   InstructionCacheFlush (B0Ptr, 5);\r
 }\r
 \r
-VOID\r
-ChainExternalInterrupt (\r
-  IN  VOID  (*NewCallback) ()\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   Sets up cache flush and calls assembly function to chain external interrupt.\r
+\r
   Records new callback in IvtEntryTable.\r
-  \r
-Arguments:\r
-  NewCallback    - New Callback\r
 \r
-Returns:\r
+  @param  NewCallback     New Callback\r
 \r
-  Nothing\r
-    \r
---*/\r
+**/\r
+VOID\r
+ChainExternalInterrupt (\r
+  IN  VOID  (*NewCallback) ()\r
+  )\r
 {\r
   VOID  *Start;\r
 \r
@@ -431,24 +426,15 @@ Returns:
   InstructionCacheFlush (Start, 0x400);\r
 }\r
 \r
+/**\r
+  Sets up cache flush and calls assembly function to restore external interrupt.\r
+  Removes registered callback from IvtEntryTable.\r
+\r
+**/\r
 VOID\r
 UnchainExternalInterrupt (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Sets up cache flush and calls assembly function to restore external interrupt.\r
-  Removes registered callback from IvtEntryTable.\r
-  \r
-Arguments:\r
-  Nothing\r
-  \r
-Returns:\r
-\r
-  Nothing\r
-    \r
---*/\r
 {\r
   VOID  *Start;\r
 \r
@@ -463,56 +449,61 @@ Returns:
 // DebugSupport protocol\r
 //\r
 \r
+/**\r
+  This is a DebugSupport protocol member function, hard\r
+  coded to support only 1 processor for now.\r
+\r
+  @param  This                The DebugSupport instance\r
+  @param  MaxProcessorIndex   The maximuim supported processor index\r
+\r
+  @retval EFI_SUCCESS         Always returned with **MaxProcessorIndex set to 0.\r
+\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.  Hard\r
-  coded to support only 1 processor for now.\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
   *MaxProcessorIndex = 0;\r
   return (EFI_SUCCESS);\r
 }\r
 \r
+/**\r
+  DebugSupport protocol member function.\r
+\r
+  @param  This               The DebugSupport instance\r
+  @param  ProcessorIndex     Which processor the callback applies to.\r
+  @param  PeriodicCallback   Callback function\r
+\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\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          NewPeriodicCallback\r
+  IN EFI_PERIODIC_CALLBACK          PeriodicCallback\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  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
+  return ManageIvtEntryTable (EXCEPT_IPF_EXTERNAL_INTERRUPT, NULL, PeriodicCallback);\r
+}\r
 \r
-Returns:\r
+/**\r
+  DebugSupport protocol member function.\r
 \r
-  EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  NewCallback       Callback function\r
+  @param  ExceptionType     Which exception to hook\r
 \r
---*/\r
-{\r
-  return ManageIvtEntryTable (EXCEPT_IPF_EXTERNAL_INTERRUPT, NULL, NewPeriodicCallback);\r
-}\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterExceptionCallback (\r
@@ -521,22 +512,6 @@ RegisterExceptionCallback (
   IN EFI_EXCEPTION_CALLBACK        NewCallback,\r
   IN EFI_EXCEPTION_TYPE            ExceptionType\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  DebugSupport protocol member function\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_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
-\r
---*/\r
 {\r
   return ManageIvtEntryTable (\r
           ExceptionType,\r
@@ -545,6 +520,17 @@ Returns:
           );\r
 }\r
 \r
+/**\r
+  DebugSupport protocol member function.  Calls assembly routine to flush cache.\r
+\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  Start             Physical base of the memory range to be invalidated\r
+  @param  Length            mininum number of bytes in instruction cache to invalidate\r
+\r
+  @retval EFI_SUCCESS       Always returned.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InvalidateInstructionCache (\r
@@ -553,22 +539,7 @@ InvalidateInstructionCache (
   IN VOID                          *Start,\r
   IN UINTN                         Length\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  DebugSupport protocol member function.  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
-  EFI_SUCCESS\r
-\r
---*/\r
 {\r
   InstructionCacheFlush (Start, Length);\r
-  return (EFI_SUCCESS);\r
+  return EFI_SUCCESS;\r
 }\r
index 4d993bcaefcc2608188b682e61bdf1e710a915d6..cd5bb8e0387f473f9da82ece044a15a3122d4c36 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   IPF specific debugsupport types, macros, and definitions.\r
   \r
 Copyright (c) 2004 - 2006 Intel Corporation                                                         \r
@@ -12,8 +12,8 @@ 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
 \r
 #include <Uefi.h>\r
@@ -36,252 +36,167 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 #define EFI_ISA IsaIpf\r
 \r
-//\r
-// processor specific functions that must be public\r
-//\r
-EFI_STATUS\r
-plInitializeDebugSupportDriver (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  IPF specific DebugSupport driver initialization.  Must be public because it's\r
-  referenced from DebugSupport.c\r
-\r
-Arguments:\r
+/**\r
+  IPF specific DebugSupport driver initialization. \r
 \r
-Returns:\r
+  Must be public because it's referenced from DebugSupport.c\r
 \r
-  EFI_SUCCESS\r
-\r
---*/\r
-;\r
+  @retval  EFI_SUCCESS     Always.\r
 \r
+**/\r
 EFI_STATUS\r
-EFIAPI\r
-plUnloadDebugSupportDriver (\r
-  IN EFI_HANDLE                   ImageHandle\r
-  )\r
-/*++\r
+PlInitializeDebugSupportDriver (\r
+  VOID\r
+  );\r
 \r
-Routine Description:\r
+/**\r
   Unload handler that is called during UnloadImage() - deallocates pool memory\r
   used by the driver.  Must be public because it's referenced from DebugSuport.c\r
 \r
-Arguments:\r
-  ImageHandle - Image handle\r
+  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS    Always.\r
 \r
-  EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PlUnloadDebugSupportDriver (\r
+  IN EFI_HANDLE                   ImageHandle\r
+  );\r
 \r
---*/\r
-;\r
+/**\r
+  C callable function to obtain the current value of IVA.\r
 \r
-//\r
-// Assembly worker functions and data referenced from PlDebugSupport.c\r
-//\r
+  @return Current value of IVA.\r
+\r
+**/\r
 VOID  *\r
 GetIva (\r
   VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  C callable function to obtain the current value of IVA\r
-\r
-Arguments:\r
+  );\r
 \r
-  None\r
-\r
-Returns:\r
-\r
-  Current value if IVA\r
-\r
---*/\r
-;\r
+/**\r
+  HookStub will be copied from it's loaded location into the IVT when\r
+  an IVT entry is hooked.\r
 \r
+**/\r
 VOID\r
 HookStub (\r
   VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  HookStub will be copied from it's loaded location into the IVT when\r
-  an IVT entry is hooked.\r
-\r
-Arguments:\r
+  );\r
 \r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-;\r
+/**\r
+  Chains an interrupt handler.\r
 \r
+**/\r
 VOID\r
 ChainHandler (\r
   VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Chains an interrupt handler\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  None\r
+  );\r
 \r
---*/\r
-;\r
+/**\r
+  Unchains an interrupt handler.\r
 \r
+**/\r
 VOID\r
 UnchainHandler (\r
   VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Unchains an interrupt handler\r
+  );\r
 \r
-Arguments:\r
+/**\r
+  C callable function to enable/disable interrupts.\r
 \r
-  None\r
+  @param  NewInterruptState   New Interrupt State.\r
 \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-;\r
+  @return Previous state of psr.ic.\r
 \r
+**/\r
 UINT64\r
 ProgramInterruptFlags (\r
   IN UINT64                       NewInterruptState\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  C callable function to enable/disable interrupts\r
-\r
-Arguments:\r
-\r
-  NewInterruptState - New Interrupt State\r
-\r
-Returns:\r
+  );\r
 \r
-  Previous state of psr.ic\r
+/**\r
+  Flushes instruction cache for specified number of bytes.\r
 \r
---*/\r
-;\r
+  @param  StartAddress     Cache Start Address.\r
+  @param  SizeInBytes      Cache Size.\r
 \r
+**/\r
 VOID\r
 InstructionCacheFlush (\r
   IN VOID    *StartAddress,\r
   IN UINTN   SizeInBytes\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Flushes instruction cache for specified number of bytes\r
-\r
-Arguments:\r
-\r
-  StartAddress  - Cache Start Address\r
-  SizeInBytes   - Cache Size\r
+  );\r
 \r
-Returns:\r
+/**\r
+  This is a DebugSupport protocol member function, hard\r
+  coded to support only 1 processor for now.\r
 \r
-  None\r
+  @param  This                The DebugSupport instance\r
+  @param  MaxProcessorIndex   The maximuim supported processor index\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS         Always returned with **MaxProcessorIndex set to 0.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetMaximumProcessorIndex (\r
   IN EFI_DEBUG_SUPPORT_PROTOCOL   *This,\r
   OUT UINTN                       *MaxProcessorIndex\r
-  )\r
-/*++\r
+  );\r
 \r
-Routine Description: This is a DebugSupport protocol member function.  Hard\r
-  coded to support only 1 processor for now.\r
+/**\r
+  DebugSupport protocol member function.\r
 \r
-Arguments:\r
-  This              - The DebugSupport instance\r
-  MaxProcessorIndex - The maximuim supported processor index\r
+  @param  This               The DebugSupport instance\r
+  @param  ProcessorIndex     Which processor the callback applies to.\r
+  @param  PeriodicCallback   Callback function\r
 \r
-Returns:\r
-  Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
-\r
---*/\r
-;\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\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
 \r
-Routine Description:\r
-  DebugSupport protocol member function\r
+/**\r
+  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
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  NewCallback       Callback function\r
+  @param  ExceptionType     Which exception to hook\r
 \r
-Returns:\r
-\r
-  EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
-\r
---*/\r
-;\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\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       NewHandler,\r
+  IN EFI_EXCEPTION_CALLBACK       NewCallback,\r
   IN EFI_EXCEPTION_TYPE           ExceptionType\r
-  )\r
-/*++\r
+  );\r
 \r
-Routine Description:\r
-  DebugSupport protocol member function\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
+  DebugSupport protocol member function.  Calls assembly routine to flush cache.\r
 \r
-  EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  Start             Physical base of the memory range to be invalidated\r
+  @param  Length            mininum number of bytes in instruction cache to invalidate\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS       Always returned.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InvalidateInstructionCache (\r
@@ -289,44 +204,19 @@ InvalidateInstructionCache (
   IN UINTN                        ProcessorIndex,\r
   IN VOID                         *Start,\r
   IN UINTN                        Length\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  DebugSupport protocol member function.  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
-  EFI_SUCCESS\r
+  );\r
 \r
---*/\r
-;\r
+/**\r
+  C routine that is called for all registered exceptions.  This is the main\r
+  exception dispatcher.  Must be public because it's referenced from AsmFuncs.s.\r
 \r
+  @param  ExceptionType        Exception Type\r
+  @param  Context              System Context\r
+**/\r
 VOID\r
 CommonHandler (\r
   IN EFI_EXCEPTION_TYPE ExceptionType,\r
   IN EFI_SYSTEM_CONTEXT Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  C routine that is called for all registered exceptions.  This is the main\r
-  exception dispatcher.  Must be public because it's referenced from AsmFuncs.s.\r
-\r
-Arguments:\r
-  ExceptionType - Exception Type\r
-  Context       - System Context\r
-\r
-Returns:\r
-\r
-  Nothing\r
-  \r
---*/\r
-;\r
+  );\r
 \r
 #endif\r
index f6af90f21be4b1ba656581aa81d6668e1210e955..24e5acc74a756fe64eae428d8a694e5d6f790450 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   X64 specific debug support functions\r
 \r
 Copyright (c) 2006 - 2007, Intel Corporation\r
@@ -23,25 +23,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 IDT_ENTRY   *IdtEntryTable  = NULL;\r
 DESCRIPTOR  NullDesc        = {0, 0};\r
 \r
+/**\r
+  Allocate pool for a new IDT entry stub.\r
+\r
+  Copy the generic stub into the new buffer and fixup the vector number\r
+  and jump target address.\r
+\r
+  @param  ExceptionType   This is the exception type that the new stub will be created\r
+                          for.\r
+  @param  Stub            On successful exit, *Stub contains the newly allocated entry stub.\r
+\r
+  @retval EFI_SUCCESS     Always.\r
+\r
+**/\r
 EFI_STATUS\r
 CreateEntryStub (\r
   IN EFI_EXCEPTION_TYPE     ExceptionType,\r
   OUT VOID                  **Stub\r
   )\r
-/*++\r
-\r
-Routine Description: Allocate pool for a new IDT entry stub.  Copy the generic\r
-    stub into the new buffer and fixup the vector number and jump target address.\r
-\r
-Arguments:\r
-    ExceptionType - This is the exception type that the new stub will be created\r
-                    for.\r
-    Stub - On successful exit, *Stub contains the newly allocated entry stub.\r
-Returns:\r
-  Typically EFI_SUCCESS\r
-  other possibilities are passed through from AllocatePool\r
-\r
---*/\r
 {\r
   UINT8       *StubCopy;\r
 \r
@@ -71,14 +70,7 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-HookEntry (\r
-  IN EFI_EXCEPTION_TYPE            ExceptionType,\r
-  IN VOID                         (*NewCallback) ()\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   Creates a nes entry stub.  Then saves the current IDT entry and replaces it\r
   with an interrupt gate for the new entry point.  The IdtEntryTable is updated\r
   with the new registered function.\r
@@ -86,15 +78,17 @@ Routine Description:
   This code executes in boot services context.  The stub entry executes in interrupt\r
   context.\r
 \r
-Arguments:\r
-  ExceptionType - specifies which vector to hook.\r
-  NewCallback - a pointer to the new function to be registered.\r
+  @param  ExceptionType      Specifies which vector to hook.\r
+  @param  NewCallback        A pointer to the new function to be registered.\r
 \r
-Returns:\r
-  EFI_SUCCESS\r
-  Other possibilities are passed through by CreateEntryStub\r
+  @retval EFI_SUCCESS        Always.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+HookEntry (\r
+  IN EFI_EXCEPTION_TYPE            ExceptionType,\r
+  IN VOID                         (*NewCallback) ()\r
+  )\r
 {\r
   BOOLEAN     OldIntFlagState;\r
   EFI_STATUS  Status;\r
@@ -102,7 +96,7 @@ Returns:
   Status = CreateEntryStub (ExceptionType, (VOID **) &IdtEntryTable[ExceptionType].StubEntry);\r
   if (Status == EFI_SUCCESS) {\r
     OldIntFlagState = WriteInterruptFlag (0);\r
-    ReadIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
+    READ_IDT (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
 \r
     ((UINT16 *) &IdtEntryTable[ExceptionType].OrigVector)[0]  = ((UINT16 *) &IdtEntryTable[ExceptionType].OrigDesc.Low)[0];\r
     ((UINT16 *) &IdtEntryTable[ExceptionType].OrigVector)[1]  = ((UINT16 *) &IdtEntryTable[ExceptionType].OrigDesc.Low)[3];\r
@@ -110,73 +104,64 @@ Returns:
 \r
     Vect2Desc (&IdtEntryTable[ExceptionType].NewDesc, IdtEntryTable[ExceptionType].StubEntry);\r
     IdtEntryTable[ExceptionType].RegisteredCallback = NewCallback;\r
-    WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].NewDesc));\r
+    WRITE_IDT (ExceptionType, &(IdtEntryTable[ExceptionType].NewDesc));\r
     WriteInterruptFlag (OldIntFlagState);\r
   }\r
 \r
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-UnhookEntry (\r
-  IN EFI_EXCEPTION_TYPE           ExceptionType\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   Undoes HookEntry. This code executes in boot services context.\r
 \r
-Arguments:\r
-  ExceptionType - specifies which entry to unhook\r
+  @param  ExceptionType   Specifies which entry to unhook\r
 \r
-Returns:\r
-  EFI_SUCCESS\r
+  @retval EFI_SUCCESS     Always.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+UnhookEntry (\r
+  IN EFI_EXCEPTION_TYPE           ExceptionType\r
+  )\r
 {\r
   BOOLEAN     OldIntFlagState;\r
 \r
   OldIntFlagState = WriteInterruptFlag (0);\r
-  WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
+  WRITE_IDT (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
   WriteInterruptFlag (OldIntFlagState);\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-ManageIdtEntryTable (\r
-  VOID (*NewCallback)(),\r
-  EFI_EXCEPTION_TYPE ExceptionType\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   This is the main worker function that manages the state of the interrupt\r
   handlers.  It both installs and uninstalls interrupt handlers based on the\r
   value of NewCallback.  If NewCallback is NULL, then uninstall is indicated.\r
   If NewCallback is non-NULL, then install is indicated.\r
 \r
-Arguments:\r
-  NewCallback - If non-NULL, NewCallback specifies the new handler to register.\r
-                If NULL, specifies that the previously registered handler should\r
-                    be uninstalled.\r
-  ExceptionType - Indicates which entry to manage\r
-\r
-Returns:\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
+  @param  NewCallback   If non-NULL, NewCallback specifies the new handler to register.\r
+                        If NULL, specifies that the previously registered handler should\r
+                        be uninstalled.\r
+  @param  ExceptionType Indicates which entry to manage.\r
 \r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
+  @retval EFI_SUCCESS            Process is ok.\r
+  @retval EFI_INVALID_PARAMETER  Requested uninstalling a handler from a vector that has\r
+                                 no handler registered for it\r
+  @retval EFI_ALREADY_STARTED    Requested install to a vector that already has a handler registered.\r
+  @retval others                 Possible return values are passed through from UnHookEntry and HookEntry.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+ManageIdtEntryTable (\r
+  VOID (*NewCallback)(),\r
+  EFI_EXCEPTION_TYPE ExceptionType\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
 \r
   Status = EFI_SUCCESS;\r
 \r
-  if (CompareDescriptor (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc)) {\r
+  if (COMPARE_DESCRIPTOR (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc)) {\r
     //\r
     // we've already installed to this vector\r
     //\r
@@ -205,29 +190,38 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+  This is a DebugSupport protocol member function, hard\r
+  coded to support only 1 processor for now.\r
+\r
+  @param  This                The DebugSupport instance\r
+  @param  MaxProcessorIndex   The maximuim supported processor index\r
+\r
+  @retval EFI_SUCCESS         Always returned with **MaxProcessorIndex set to 0.\r
+\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
   *MaxProcessorIndex = 0;\r
   return (EFI_SUCCESS);\r
 }\r
 \r
+/**\r
+  DebugSupport protocol member function.\r
+\r
+  @param  This               The DebugSupport instance\r
+  @param  ProcessorIndex     Which processor the callback applies to.\r
+  @param  PeriodicCallback   Callback function\r
+\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterPeriodicCallback (\r
@@ -235,29 +229,24 @@ RegisterPeriodicCallback (
   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
+  return ManageIdtEntryTable (PeriodicCallback, SYSTEM_TIMER_VECTOR);\r
+}\r
 \r
-Returns:\r
+/**\r
+  DebugSupport protocol member function.\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
+  This code executes in boot services context.\r
 \r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  NewCallback       Callback function\r
+  @param  ExceptionType     Which exception to hook\r
 \r
---*/\r
-{\r
-  return ManageIdtEntryTable (PeriodicCallback, SYSTEM_TIMER_VECTOR);\r
-}\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterExceptionCallback (\r
@@ -266,33 +255,21 @@ RegisterExceptionCallback (
   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
   return ManageIdtEntryTable (NewCallback, ExceptionType);\r
 }\r
 \r
+/**\r
+  DebugSupport protocol member function.  Calls assembly routine to flush cache.\r
+\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  Start             Physical base of the memory range to be invalidated\r
+  @param  Length            mininum number of bytes in instruction cache to invalidate\r
+\r
+  @retval EFI_SUCCESS       Always returned.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InvalidateInstructionCache (\r
@@ -301,49 +278,27 @@ InvalidateInstructionCache (
   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
   AsmWbinvd ();\r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Initializes driver's handler registration databas. \r
+  \r
+  This code executes in boot services context\r
+  Must be public because it's referenced from DebugSupport.c\r
+\r
+  @retval  EFI_UNSUPPORTED      If x64 processor does not support FXSTOR/FXRSTOR instructions,\r
+                                the context save will fail, so these processor's are not supported.\r
+  @retval  EFI_OUT_OF_RESOURCES Fails to allocate memory.\r
+  @retval  EFI_SUCCESS          Initializes successfully.\r
+\r
+**/\r
 EFI_STATUS\r
-plInitializeDebugSupportDriver (\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 X64 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
   EFI_EXCEPTION_TYPE  ExceptionType;\r
 \r
@@ -378,28 +333,21 @@ ErrorCleanup:
   return EFI_OUT_OF_RESOURCES;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-plUnloadDebugSupportDriver (\r
-  IN EFI_HANDLE ImageHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\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
+  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
 \r
-  EFI_SUCCESS - always return success\r
+  @retval EFI_SUCCESS    Always.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PlUnloadDebugSupportDriver (\r
+  IN EFI_HANDLE ImageHandle\r
+  )\r
 {\r
   EFI_EXCEPTION_TYPE  ExceptionType;\r
 \r
@@ -411,26 +359,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Common piece of code that invokes the registered handlers.\r
+\r
+  This code executes in exception context so no efi calls are allowed.\r
+\r
+  @param  ExceptionType     Exception type\r
+  @param  ContextRecord     System context\r
+\r
+**/\r
 VOID\r
 InterruptDistrubutionHub (\r
   EFI_EXCEPTION_TYPE      ExceptionType,\r
   EFI_SYSTEM_CONTEXT_IA32 *ContextRecord\r
   )\r
-/*++\r
-\r
-Routine Description: Common piece of code that invokes the registered handlers.\r
-\r
-  This code executes in exception context so no efi calls are allowed.\r
-\r
-Arguments:\r
-  ExceptionType - exception type\r
-  ContextRecord - system context\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   if (IdtEntryTable[ExceptionType].RegisteredCallback != NULL) {\r
     if (ExceptionType != SYSTEM_TIMER_VECTOR) {\r
index b643ec44e2aa17bed34f21ed316c414ac710801a..eb04f1a88c4ecabc2f131540ab262785c6f8e399 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   X64 specific debug support macros, typedefs and prototypes.\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 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
@@ -12,8 +12,8 @@ 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
 \r
 #include <Uefi.h>\r
@@ -32,11 +32,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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 COPY_DESCRIPTOR(Dest, Src)       CopyMem ((Dest), (Src), sizeof (DESCRIPTOR))\r
+#define READ_IDT(Vector, Dest)           COPY_DESCRIPTOR ((Dest), &((GetIdtr ())[(Vector)]))\r
+#define WRITE_IDT(Vector, Src)           COPY_DESCRIPTOR (&((GetIdtr ())[(Vector)]), (Src))\r
+#define COMPARE_DESCRIPTOR(Desc1, Desc2) CompareMem ((Desc1), (Desc2), sizeof (DESCRIPTOR))\r
 #define EFI_ISA                         IsaX64\r
 #define FF_FXSR                         (1 << 24)\r
 \r
@@ -64,214 +63,149 @@ extern UINT8              InterruptEntryStub[];
 extern UINT32             StubSize;\r
 extern VOID (*OrigVector) (VOID);\r
 \r
+/**\r
+  Generic IDT entry.\r
+\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
+  Check whether FXSTOR is supported\r
 \r
+  @retval TRUE   FXSTOR is supported.\r
+  @retval FALSE  FXSTOR is not supported.\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
 \r
-  TRUE  - supported\r
-  FALSE - not supported\r
+/**\r
+  Return the physical address of IDTR.\r
 \r
---*/\r
-;\r
+  @return The physical address of IDTR.\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
 \r
-  The physical address of IDTR\r
+/**\r
+  Encodes an IDT descriptor with the given physical address.\r
 \r
---*/\r
-;\r
+  @param  DestDesc    The IDT descriptor address.\r
+  @param  Vecotr      The interrupt vector entry.\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
 \r
-Returns:\r
+/**\r
+  Programs interrupt flag to the requested state and returns previous\r
+  state.\r
 \r
-  None\r
+  @param  NewState    New interrupt status.\r
 \r
---*/\r
-;\r
+  @retval TRUE     Old interrupt status is TRUE.\r
+  @retval FALSE    Old interrupt status is FALSE\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
 \r
-  Old interrupt status\r
+/**\r
+  Initializes driver's handler registration databas. \r
+  \r
+  This code executes in boot services context\r
+  Must be public because it's referenced from DebugSupport.c\r
 \r
---*/\r
-;\r
+  @retval  EFI_UNSUPPORTED      If x64 processor does not support FXSTOR/FXRSTOR instructions,\r
+                                the context save will fail, so these processor's are not supported.\r
+  @retval  EFI_OUT_OF_RESOURCES Fails to allocate memory.\r
+  @retval  EFI_SUCCESS          Initializes successfully.\r
 \r
+**/\r
 EFI_STATUS\r
-plInitializeDebugSupportDriver (\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
 \r
-Arguments:\r
-  None\r
+/**\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
-Returns:\r
-  EFI_SUCCESS\r
-  EFI_UNSUPPORTED - if X64 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
+  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS    Always.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
-plUnloadDebugSupportDriver (\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
 \r
-Returns:\r
+/**\r
+  This is a DebugSupport protocol member function, hard\r
+  coded to support only 1 processor for now.\r
 \r
-  EFI_SUCCESS - always return success\r
+  @param  This                The DebugSupport instance\r
+  @param  MaxProcessorIndex   The maximuim supported processor index\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS         Always returned with **MaxProcessorIndex set to 0.\r
 \r
-//\r
-// DebugSupport protocol member functions\r
-//\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
 \r
-Arguments:\r
-  This              - The DebugSupport instance\r
-  MaxProcessorIndex - The maximuim supported processor index\r
+/**\r
+  DebugSupport protocol member function.\r
 \r
-Returns:\r
-  Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
+  @param  This               The DebugSupport instance\r
+  @param  ProcessorIndex     Which processor the callback applies to.\r
+  @param  PeriodicCallback   Callback function\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\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
 \r
-Returns:\r
+/**\r
+  DebugSupport protocol member function.\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
+  This code executes in boot services context.\r
 \r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  NewCallback       Callback function\r
+  @param  ExceptionType     Which exception to hook\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS        Indicates the callback was registered.\r
+  @retval others             Callback was not registered.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RegisterExceptionCallback (\r
@@ -279,32 +213,19 @@ RegisterExceptionCallback (
   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
 \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
+  DebugSupport protocol member function.  Calls assembly routine to flush cache.\r
 \r
-  Other possible return values are passed through from UnHookEntry and HookEntry.\r
+  @param  This              The DebugSupport instance\r
+  @param  ProcessorIndex    Which processor the callback applies to.\r
+  @param  Start             Physical base of the memory range to be invalidated\r
+  @param  Length            mininum number of bytes in instruction cache to invalidate\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS       Always returned.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InvalidateInstructionCache (\r
@@ -312,24 +233,6 @@ InvalidateInstructionCache (
   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
 \r
 #endif\r