]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.h
Add X64 support for DebugSupport driver.
[mirror_edk2.git] / EdkModulePkg / Universal / DebugSupport / Dxe / Ia32 / plDebugSupport.h
index abb6967deabd2e9f989b15510a2e935947403182..cb1a6c7c82344c6c8f5fc774047cd2d8dcb4a9a6 100644 (file)
@@ -1,4 +1,5 @@
-/*++\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
@@ -9,17 +10,7 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-\r
-    plDebugSupport.h\r
-\r
-Abstract:\r
-\r
-    IA32 specific debug support macros, typedefs and prototypes.\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #ifndef _PLDEBUG_SUPPORT_H\r
 #define _PLDEBUG_SUPPORT_H\r
@@ -58,7 +49,7 @@ CommonIdtEntry (
 \r
 Routine Description:\r
 \r
-  TODO: Add function description\r
+  Generic IDT entry\r
 \r
 Arguments:\r
 \r
@@ -66,11 +57,12 @@ Arguments:
 \r
 Returns:\r
 \r
-  TODO: add return values\r
+  None\r
 \r
 --*/\r
 ;\r
 \r
+\r
 BOOLEAN\r
 FxStorSupport (\r
   VOID\r
@@ -79,7 +71,7 @@ FxStorSupport (
 \r
 Routine Description:\r
 \r
-  TODO: Add function description\r
+  Check whether FXSTOR is supported\r
 \r
 Arguments:\r
 \r
@@ -87,7 +79,8 @@ Arguments:
 \r
 Returns:\r
 \r
-  TODO: add return values\r
+  TRUE  - supported\r
+  FALSE - not supported\r
 \r
 --*/\r
 ;\r
@@ -100,7 +93,7 @@ GetIdtr (
 \r
 Routine Description:\r
 \r
-  TODO: Add function description\r
+  Return the physical address of IDTR\r
 \r
 Arguments:\r
 \r
@@ -108,7 +101,7 @@ Arguments:
 \r
 Returns:\r
 \r
-  TODO: add return values\r
+  The physical address of IDTR\r
 \r
 --*/\r
 ;\r
@@ -122,16 +115,16 @@ Vect2Desc (
 \r
 Routine Description:\r
 \r
-  TODO: Add function description\r
+  Encodes an IDT descriptor with the given physical address\r
 \r
 Arguments:\r
 \r
-  DestDesc  - TODO: add argument description\r
-  )         - TODO: add argument description\r
+  DestDesc  - The IDT descriptor address\r
+  Vector    - The interrupt vector entry\r
 \r
 Returns:\r
 \r
-  TODO: add return values\r
+  None\r
 \r
 --*/\r
 ;\r
@@ -144,15 +137,16 @@ WriteInterruptFlag (
 \r
 Routine Description:\r
 \r
-  TODO: Add function description\r
+  Programs interrupt flag to the requested state and returns previous\r
+  state.\r
 \r
 Arguments:\r
 \r
-  NewState  - TODO: add argument description\r
+  NewState  - New interrupt status\r
 \r
 Returns:\r
 \r
-  TODO: add return values\r
+  Old interrupt status\r
 \r
 --*/\r
 ;\r
@@ -164,16 +158,18 @@ plInitializeDebugSupportDriver (
 /*++\r
 \r
 Routine Description:\r
+  Initializes driver's handler registration database.\r
 \r
-  TODO: Add function description\r
+  This code executes in boot services context.\r
 \r
 Arguments:\r
-\r
   None\r
 \r
 Returns:\r
-\r
-  TODO: add return values\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
@@ -186,16 +182,18 @@ plUnloadDebugSupportDriver (
 /*++\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
-  TODO: Add function description\r
+  This code executes in boot services context.\r
 \r
 Arguments:\r
-\r
-  ImageHandle - TODO: add argument description\r
+  ImageHandle - The image handle of the unload handler\r
 \r
 Returns:\r
 \r
-  TODO: add return values\r
+  EFI_SUCCESS - always return success\r
 \r
 --*/\r
 ;\r
@@ -211,18 +209,14 @@ GetMaximumProcessorIndex (
   )\r
 /*++\r
 \r
-Routine Description:\r
-\r
-  TODO: Add function description\r
+Routine Description: This is a DebugSupport protocol member function.\r
 \r
 Arguments:\r
-\r
-  This              - TODO: add argument description\r
-  MaxProcessorIndex - TODO: add argument description\r
+  This              - The DebugSupport instance\r
+  MaxProcessorIndex - The maximuim supported processor index\r
 \r
 Returns:\r
-\r
-  TODO: add return values\r
+  Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
 \r
 --*/\r
 ;\r
@@ -236,19 +230,21 @@ RegisterPeriodicCallback (
   )\r
 /*++\r
 \r
-Routine Description:\r
-\r
-  TODO: Add function description\r
+Routine Description: This is a DebugSupport protocol member function.\r
 \r
 Arguments:\r
-\r
-  This              - TODO: add argument description\r
-  ProcessorIndex    - TODO: add argument description\r
-  PeriodicCallback  - TODO: add argument description\r
+  This             - The DebugSupport instance\r
+  ProcessorIndex   - Which processor the callback applies to.\r
+  PeriodicCallback - Callback function\r
 \r
 Returns:\r
 \r
-  TODO: add return values\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
@@ -264,19 +260,24 @@ RegisterExceptionCallback (
 /*++\r
 \r
 Routine Description:\r
+  This is a DebugSupport protocol member function.\r
 \r
-  TODO: Add function description\r
+  This code executes in boot services context.\r
 \r
 Arguments:\r
-\r
-  This            - TODO: add argument description\r
-  ProcessorIndex  - TODO: add argument description\r
-  NewCallback     - TODO: add argument description\r
-  ExceptionType   - TODO: add argument description\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
-  TODO: add return values\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
@@ -292,19 +293,18 @@ InvalidateInstructionCache (
 /*++\r
 \r
 Routine Description:\r
-\r
-  TODO: Add function description\r
+  This is a DebugSupport protocol member function.\r
+  Calls assembly routine to flush cache.\r
 \r
 Arguments:\r
-\r
-  This            - TODO: add argument description\r
-  ProcessorIndex  - TODO: add argument description\r
-  Start           - TODO: add argument description\r
-  Length          - TODO: add argument description\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
-  TODO: add return values\r
+  EFI_SUCCESS - always return success\r
 \r
 --*/\r
 ;\r