]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Code Scrub for Pcd, PlatformDriOverride and PlatOverMngr driver.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Dec 2008 09:30:13 +0000 (09:30 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Dec 2008 09:30:13 +0000 (09:30 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6998 6f19259b-4bc3-4df7-8a09-765794883524

13 files changed:
MdeModulePkg/Include/Library/IfrSupportLib.h
MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c
MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOver.h
MdeModulePkg/Universal/PCD/Pei/Pcd.c
MdeModulePkg/Universal/PCD/Pei/Pcd.inf
MdeModulePkg/Universal/PCD/Pei/Service.c
MdeModulePkg/Universal/PCD/Pei/Service.h
MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c
MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c
MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.h
MdeModulePkg/Universal/PlatformDriverOverride/PlatformDriOverrideDxe/PlatformDriOverride.c
MdeModulePkg/Universal/PlatformDriverOverride/PlatformDriOverrideDxe/PlatformDriOverride.h

index 2caa6f0dca355a8c56f9cf14f6f8d5d2fb646b91..1608d14ab122c4d430eeec6dc69c264b49bbf3c2 100644 (file)
@@ -439,8 +439,8 @@ CreateStringOpCode (
 \r
     @param ConfigRequest           The Config request string. If set to NULL, all the\r
                                    configurable elements will be extracted from BlockNameArray.\r
-    @param ConfigAltResp           The returned <ConfigAltResp>.\r
     @param Progress                On return, points to a character in the Request.\r
+    @param ConfigAltResp           The returned <ConfigAltResp>.\r
     @param Guid                    GUID of the buffer storage.\r
     @param Name                    Name of the buffer storage.\r
     @param DriverHandle            The DriverHandle which is used to invoke HiiDatabase\r
@@ -452,7 +452,8 @@ CreateStringOpCode (
                                    The sequential input parameters will be number of\r
                                    AltCfgId and DefaultValueArray pairs. When set to 0,\r
                                    there will be no <AltResp>.\r
-\r
+    @param  ...                    Variable argument list.                   \r
+    \r
     retval EFI_OUT_OF_RESOURCES  Run out of memory resource.\r
     retval EFI_INVALID_PARAMETER ConfigAltResp is NULL.\r
     retval EFI_SUCCESS           Operation successful.\r
index aa0b74e21ac211ae85b89284ae5396f89a7a2f87..6198e7e83a0e78892dfbb58ad50e37c15bfd838c 100644 (file)
@@ -660,7 +660,6 @@ NetLibGetMacString (
   @param  Protocol              The protocol type in the IP header.\r
   @param  UseDefaultAddress     Whether this instance is using default address or not.\r
 \r
-  @retval None\r
 **/\r
 VOID\r
 EFIAPI\r
index afc0ef32f73ab2a79756f8e1832284405096e444..e664428d0e52705e306da840d1c370ad3042e83c 100644 (file)
@@ -163,6 +163,9 @@ Crc32GuidedSectionHandler (
 /**\r
   Register Crc32 section handler.\r
 \r
+  @param  ImageHandle  ImageHandle of the loaded driver.\r
+  @param  SystemTable  Pointer to the EFI System Table.\r
+\r
   @retval  RETURN_SUCCESS            Register successfully.\r
   @retval  RETURN_OUT_OF_RESOURCES   No enough memory to register this handler.\r
 **/\r
index db2d6e5dab1eb00930c4c2fc6c58c131598a31af..50622b8bd361923bb8c7f65cbff838b873848efd 100644 (file)
@@ -70,7 +70,7 @@ typedef struct _DEVICE_PATH_STACK_ITEM{
 } DEVICE_PATH_STACK_ITEM;\r
 \r
 /**\r
-  Push a controller device path into a globle device path list\r
+  Push a controller device path into a globle device path list.\r
 \r
   @param  DevicePath     The controller device path to push into stack\r
 \r
@@ -114,6 +114,8 @@ CheckExistInStack (
   );\r
 \r
 /**\r
+  Update the FV file device path if it is not valid.\r
+\r
   According to a file GUID, check a Fv file device path is valid. If it is invalid,\r
   try to return the valid device path.\r
   FV address maybe changes for memory layout adjust from time to time, use this funciton\r
@@ -143,6 +145,8 @@ UpdateFvFileDevicePath (
   );\r
 \r
 /**\r
+  Gets the data and size of a variable.\r
+\r
   Read the EFI variable (VendorGuid/Name) and return a dynamically allocated\r
   buffer, and the size of the buffer. If failure return NULL.\r
 \r
@@ -165,6 +169,8 @@ GetVariableAndSize (
   );\r
 \r
 /**\r
+  Connect to the handle to a device on the device path.\r
+\r
   This function will create all handles associate with every device\r
   path node. If the handle associate with one device path node can not\r
   be created success, then still give one chance to do the dispatch,\r
index b6fff5409b7153e5e2fcd59d456dfc158bb79740..ddf3a641951543dee83e0790a962cdff4c6d5cfa 100644 (file)
@@ -1,8 +1,7 @@
 /** @file \r
-  PCD PEIM manage PCD database to manage all dynamic PCD in PEI phase. PCD PEIM\r
-  also produce PCD_PPI.\r
+PCD PEIM produces PCD database to manage all dynamic PCD in PEI phase and install Pcd Ppi.\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
index 8f43b11f8298ba03df028b202233035eba257a0e..bb85ab9bdb927446f5382dd8efc2d25c477985dd 100644 (file)
@@ -1,8 +1,7 @@
 #/** @file\r
-# Component description file for Pcd Database PEIM module\r
+# PCD PEIM produces PCD database to manage all dynamic PCD in PEI phase and install Pcd Ppi.\r
 #\r
-# This PEIM driver implement and produce PCD PPI.\r
-# Copyright (c) 2006 - 2007, Intel Corporation\r
+# Copyright (c) 2006 - 2008, Intel Corporation\r
 #\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
index fddab6be580f71768065fac5cb053c261cd79895..65e7e92cfcd0f42985e93d2d8383191bcc8369cf 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private functions used by PCD PEIM.\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
@@ -10,9 +10,6 @@ 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
-\r
-Module Name: Service.c\r
-\r
 **/\r
 \r
 #include "Service.h"\r
index e163a9a1a246d5964e525a7a937003fb3fe66387..06cb24721f4d6fede4dbf128a7f52cb9063d42cb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private functions used by PCD PEIM.\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
@@ -10,9 +10,6 @@ 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
-\r
-Module Name: Service.h\r
-\r
 **/\r
 \r
 #ifndef _PEI_PCD_SERVICE_H_\r
@@ -1007,11 +1004,13 @@ SetPtrTypeSize (
   IN          PEI_PCD_DATABASE  *Database\r
   );\r
 \r
-\r
 extern EFI_GUID gPcdDataBaseHobGuid;\r
 \r
 extern EFI_GUID gPcdPeiCallbackFnTableHobGuid;\r
 \r
+//\r
+// The init Database created by PCD Database generation tool\r
+//\r
 extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;\r
 \r
 #endif\r
index 0d899c9260571988c51e51a183e587ea38249603..6ea2cfb8e8b1fe02064a77559813eb318fd74fb7 100644 (file)
@@ -55,7 +55,7 @@ PciCfg2Read (
   IN        EFI_PEI_PCI_CFG_PPI_WIDTH Width,\r
   IN        UINT64                    Address,\r
   IN OUT    VOID                      *Buffer\r
-);\r
+  );\r
 \r
 /**\r
   Write to a given location in the PCI configuration space.\r
@@ -89,7 +89,7 @@ PciCfg2Write (
   IN        EFI_PEI_PCI_CFG_PPI_WIDTH Width,\r
   IN        UINT64                    Address,\r
   IN OUT    VOID                      *Buffer\r
-);\r
+  );\r
 \r
 \r
 /**\r
@@ -130,7 +130,7 @@ PciCfg2Modify (
   IN        UINT64                    Address,\r
   IN        VOID                      *SetBits,\r
   IN        VOID                      *ClearBits\r
-);\r
+  );\r
 \r
 \r
 \r
@@ -218,7 +218,7 @@ PciCfg2Read (
   IN        EFI_PEI_PCI_CFG_PPI_WIDTH Width,\r
   IN        UINT64                    Address,\r
   IN OUT    VOID                      *Buffer\r
-)\r
+  )\r
 {\r
   UINTN  PciLibAddress;\r
 \r
@@ -269,7 +269,7 @@ PciCfg2Write (
   IN        EFI_PEI_PCI_CFG_PPI_WIDTH Width,\r
   IN        UINT64                    Address,\r
   IN OUT    VOID                      *Buffer\r
-)\r
+  )\r
 {\r
   UINTN  PciLibAddress;\r
 \r
@@ -327,7 +327,7 @@ PciCfg2Modify (
   IN        UINT64                    Address,\r
   IN        VOID                      *SetBits,\r
   IN        VOID                      *ClearBits\r
-)\r
+  )\r
 {\r
   UINTN   PciLibAddress;\r
   UINT16  ClearValue16;\r
@@ -353,7 +353,15 @@ PciCfg2Modify (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Module's entry function. \r
+  This routine will install EFI_PEI_PCI_CFG2_PPI.\r
+  \r
+  @param  FileHandle  Handle of the file being invoked.\r
+  @param  PeiServices Describes the list of possible PEI Services.\r
 \r
+  @return Whether success to install service.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeimInitializePciCfg (\r
index 5d9bfe127a330ec5db4744803102f6d86a7f0a88..5f49a5b9260eae973c74e9627de959057e2f2cab 100644 (file)
@@ -336,7 +336,7 @@ GetComponentName (
 **/\r
 CHAR16 *\r
 GetImageName (\r
-  EFI_LOADED_IMAGE_PROTOCOL *Image\r
+  IN EFI_LOADED_IMAGE_PROTOCOL *Image\r
   )\r
 {\r
   EFI_STATUS                        Status;\r
@@ -347,9 +347,9 @@ GetImageName (
   UINTN                             BufferSize;\r
   UINT32                            AuthenticationStatus;\r
   EFI_GUID                          *NameGuid;\r
-  EFI_FIRMWARE_VOLUME2_PROTOCOL     *FV2;\r
+  EFI_FIRMWARE_VOLUME2_PROTOCOL     *Fv2;\r
 \r
-  FV2         = NULL;\r
+  Fv2         = NULL;\r
   Buffer      = NULL;\r
   BufferSize  = 0;\r
 \r
@@ -378,11 +378,11 @@ GetImageName (
       Status = gBS->HandleProtocol (\r
                     Image->DeviceHandle,\r
                     &gEfiFirmwareVolume2ProtocolGuid,\r
-                    (VOID **) &FV2\r
+                    (VOID **) &Fv2\r
                     );\r
       if (!EFI_ERROR (Status)) {\r
-        Status = FV2->ReadSection (\r
-                        FV2,\r
+        Status = Fv2->ReadSection (\r
+                        Fv2,\r
                         &FvFilePath->FvFileName,\r
                         EFI_SECTION_USER_INTERFACE,\r
                         0,\r
@@ -1158,12 +1158,12 @@ PlatOverMngrExtractConfig (
 /**\r
   This function processes the results of changes in configuration.\r
 \r
-  @param  This         Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
-  @param  Request      A null-terminated Unicode string in <ConfigRequest> format.\r
-  @param  Progress     A pointer to a string filled in with the offset of the most\r
-                       recent '&' before the first failing name/value pair (or the\r
-                       beginning of the string if the failure is in the first\r
-                       name/value pair) or the terminating NULL if all was successful.\r
+  @param  This            Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+  @param  Configuration   A null-terminated Unicode string in <ConfigRequest> format.\r
+  @param  Progress        A pointer to a string filled in with the offset of the most\r
+                          recent '&' before the first failing name/value pair (or the\r
+                          beginning of the string if the failure is in the first\r
+                          name/value pair) or the terminating NULL if all was successful.\r
 \r
   @retval EFI_SUCCESS            The Results is processed successfully.\r
   @retval EFI_INVALID_PARAMETER  Configuration is NULL.\r
index f1f4e1c801f455f2254674f68bd9f69c11ad429c..a7ce6dbbdb4cf99ee91d2ffc3b942e3919c0c596 100644 (file)
@@ -134,15 +134,51 @@ typedef struct {
   EFI_STRING_ID                             DescriptionToken;\r
 } CFG_PROTOCOL_INVOKER_CHOICE;\r
 \r
+/**\r
+  This function allows a caller to extract the current configuration for one\r
+  or more named elements from the target driver.\r
+\r
+  @param  This         Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+  @param  Request      A null-terminated Unicode string in <ConfigRequest> format.\r
+  @param  Progress     On return, points to a character in the Request string.\r
+                       Points to the string's null terminator if request was successful.\r
+                       Points to the most recent '&' before the first failing name/value\r
+                       pair (or the beginning of the string if the failure is in the\r
+                       first name/value pair) if the request was not successful.\r
+  @param  Results      A null-terminated Unicode string in <ConfigAltResp> format which\r
+                       has all values filled in for the names in the Request string.\r
+                       String to be allocated by the called function.\r
+\r
+  @retval EFI_SUCCESS            The Results is filled with the requested values.\r
+  @retval EFI_OUT_OF_RESOURCES   Not enough memory to store the results.\r
+  @retval EFI_INVALID_PARAMETER  Request is NULL, illegal syntax, or unknown name.\r
+  @retval EFI_NOT_FOUND          Routing data doesn't match any storage in this driver.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PlatOverMngrExtractConfig (\r
 IN  CONST EFI_HII_CONFIG_ACCESS_PROTOCOL   *This,\r
+ IN  CONST EFI_HII_CONFIG_ACCESS_PROTOCOL   *This,\r
   IN  CONST EFI_STRING                       Request,\r
   OUT EFI_STRING                             *Progress,\r
   OUT EFI_STRING                             *Results\r
   );\r
 \r
+/**\r
+  This function processes the results of changes in configuration.\r
+\r
+  @param  This            Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+  @param  Configuration   A null-terminated Unicode string in <ConfigRequest> format.\r
+  @param  Progress        A pointer to a string filled in with the offset of the most\r
+                          recent '&' before the first failing name/value pair (or the\r
+                          beginning of the string if the failure is in the first\r
+                          name/value pair) or the terminating NULL if all was successful.\r
+\r
+  @retval EFI_SUCCESS            The Results is processed successfully.\r
+  @retval EFI_INVALID_PARAMETER  Configuration is NULL.\r
+  @retval EFI_NOT_FOUND          Routing data doesn't match any storage in this driver.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PlatOverMngrRouteConfig (\r
@@ -151,6 +187,27 @@ PlatOverMngrRouteConfig (
   OUT EFI_STRING                             *Progress\r
   );\r
 \r
+/**\r
+  This is the function that is called to provide results data to the driver.  This data\r
+  consists of a unique key which is used to identify what data is either being passed back\r
+  or being asked for.\r
+\r
+  @param  This           Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+  @param  Action         A null-terminated Unicode string in <ConfigRequest> format.\r
+  @param  KeyValue       A unique Goto OpCode callback value which record user's selection.\r
+                         0x100 <= KeyValue <0x500 : user select a controller item in the first page;\r
+                         KeyValue == 0x1234       : user select 'Refresh' in first page, or user select 'Go to Previous Menu' in second page\r
+                         KeyValue == 0x1235       : user select 'Pci device filter' in first page\r
+                         KeyValue == 0x1500       : user select 'order ... priority' item in second page\r
+                         KeyValue == 0x1800       : user select 'commint changes' in third page\r
+                         KeyValue == 0x2000       : user select 'Go to Previous Menu' in third page\r
+  @param  Type           The type of value for the question.\r
+  @param  Value          A pointer to the data being sent to the original exporting driver.\r
+  @param  ActionRequest  On return, points to the action requested by the callback function.\r
+\r
+  @retval EFI_SUCCESS    Always returned.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PlatOverMngrCallback (\r
@@ -162,14 +219,32 @@ PlatOverMngrCallback (
   OUT EFI_BROWSER_ACTION_REQUEST             *ActionRequest\r
   );\r
 \r
+/**\r
+  Get the image name\r
+\r
+  @param Image            Image to search.\r
+\r
+  @retval !NULL           Pointer into the image name if the image name is found,\r
+  @retval NULL            Pointer to NULL if the image name is not found.\r
+\r
+**/\r
 CHAR16 *\r
 GetImageName (\r
-  IN  EFI_LOADED_IMAGE_PROTOCOL *Image\r
+  IN EFI_LOADED_IMAGE_PROTOCOL *Image\r
   );\r
 \r
-CHAR16  *\r
+/**\r
+  Get the description string by device path.\r
+\r
+  @param  DevPath     The input device path.\r
+\r
+  @retval !NULL       The description string retured.\r
+  @retval  NULL       The description string cannot be found.\r
+\r
+**/\r
+CHAR16 *\r
 DevicePathToStr (\r
-  EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *DevPath\r
   );\r
 \r
 #endif\r
index 75032720fd0709dedcdd7a8ba2d1044b99600010..fd3aee9ad03819fb38c4f62c5b9f152e9dd89d59 100644 (file)
@@ -31,25 +31,23 @@ LIST_ENTRY      mMappingDataBase = INITIALIZE_LIST_HEAD_VARIABLE (mMappingDataBa
 BOOLEAN         mEnvironmentVariableRead = FALSE;\r
 EFI_HANDLE      mCallerImageHandle;\r
 \r
+/**\r
+  Platform Driver Override driver entry point, install the Platform Driver Override Protocol\r
+\r
+  @param  ImageHandle  ImageHandle of the loaded driver.\r
+  @param  SystemTable  Pointer to the EFI System Table.\r
 \r
+  @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM Driver,\r
+                                     or UEFI Driver exited normally.\r
+  @retval  EFI_INCOMPATIBLE_VERSION  _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r
+  @retval  Other                     Return value from ProcessModuleEntryPointList().\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PlatformDriverOverrideEntry (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-   Platform Driver Override driver entry point, install the Platform Driver Override Protocol\r
-\r
-Arguments:\r
-  (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)\r
-\r
-Returns:\r
-  EFI_STATUS\r
-\r
---*/\r
 {\r
   mEnvironmentVariableRead = FALSE;\r
   mCallerImageHandle = ImageHandle;\r
@@ -145,11 +143,16 @@ GetDriver (
 \r
 \r
 /**\r
-  For the use of the ControllerHandle parameter in the GetDriverPath() and DriverLoaded() APIs\r
-  makes those APIs very difficult to use, so not support.\r
-\r
-\r
+  For the use of the ControllerHandle parameter in the GetDriverPath()\r
+  But this API is very difficult to use, so not support.\r
 \r
+  @param  This                   A pointer to the\r
+                                 EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.\r
+  @param  ControllerHandle       The device handle of the controller to check if a\r
+                                 driver override exists.\r
+  @param  DriverImagePath        The device path for this Image.\r
+  \r
+  @retval EFI_UNSUPPORTED\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -164,11 +167,21 @@ GetDriverPath (
 \r
 \r
 /**\r
-  For the use of the ControllerHandle parameter in the GetDriverPath() and DriverLoaded() APIs\r
-  makes those APIs very difficult to use, so not support.\r
-\r
-\r
+  For the use of the ControllerHandle parameter in the DriverLoaded()\r
+  But this API is very difficult to use, so not support.\r
 \r
+  @param  This                   A pointer to the\r
+                                 EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.\r
+  @param  ControllerHandle       The device handle of the controller to check if a\r
+                                 driver override exists.\r
+  @param  DriverImagePath        The device path for this Image.\r
+  @param  DriverImageHandle      On input, a pointer to the previous driver image\r
+                                 handle returned by GetDriver().  On output, a\r
+                                 pointer to the next driver image handle. Passing\r
+                                 in a NULL,  will return the first driver image\r
+                                 handle for ControllerHandle.\r
+  \r
+  @retval EFI_UNSUPPORTED\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 2fa2ae89299ed84dc8a7b705d1e6ae2c8ef2c6f4..31f2077be9b09272d4eb00a4f3c859b291ae7868 100644 (file)
@@ -18,8 +18,8 @@ Abstract:
 \r
 **/\r
 \r
-#ifndef PLATFORM_DRI_OVERRIDE_H_\r
-#define PLATFORM_DRI_OVERRIDE_H_\r
+#ifndef _PLATFORM_DRI_OVERRIDE_H_\r
+#define _PLATFORM_DRI_OVERRIDE_H_\r
 \r
 #include <Uefi.h>\r
 \r
@@ -28,6 +28,29 @@ Abstract:
 #include <Library/BaseLib.h>\r
 #include <Library/PlatDriOverLib.h>\r
 \r
+/**\r
+  Retrieves the image handle of the platform override driver for a controller in the system.\r
+\r
+  @param  This                   A pointer to the\r
+                                 EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.\r
+  @param  ControllerHandle       The device handle of the controller to check if a\r
+                                 driver override exists.\r
+  @param  DriverImageHandle      On input, a pointer to the previous driver image\r
+                                 handle returned by GetDriver().  On output, a\r
+                                 pointer to the next driver image handle. Passing\r
+                                 in a NULL,  will return the first driver image\r
+                                 handle for ControllerHandle.\r
+\r
+  @retval EFI_SUCCESS            The driver override for ControllerHandle was\r
+                                 returned in DriverImageHandle.\r
+  @retval EFI_NOT_FOUND          A driver override for ControllerHandle was not\r
+                                 found.\r
+  @retval EFI_INVALID_PARAMETER  The handle specified by ControllerHandle is not a\r
+                                 valid handle. DriverImageHandle is not a handle\r
+                                 that was returned on a previous  call to\r
+                                 GetDriver().\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetDriver (\r
@@ -36,6 +59,18 @@ GetDriver (
   IN OUT EFI_HANDLE                                     * DriverImageHandle\r
   );\r
 \r
+/**\r
+  For the use of the ControllerHandle parameter in the GetDriverPath()\r
+  But this API is very difficult to use, so not support.\r
+\r
+  @param  This                   A pointer to the\r
+                                 EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.\r
+  @param  ControllerHandle       The device handle of the controller to check if a\r
+                                 driver override exists.\r
+  @param  DriverImagePath        The device path for this Image.\r
+  \r
+  @retval EFI_UNSUPPORTED\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetDriverPath (\r
@@ -44,6 +79,23 @@ GetDriverPath (
   IN OUT EFI_DEVICE_PATH_PROTOCOL                       **DriverImagePath\r
   );\r
 \r
+/**\r
+  For the use of the ControllerHandle parameter in the DriverLoaded()\r
+  But this API is very difficult to use, so not support.\r
+\r
+  @param  This                   A pointer to the\r
+                                 EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.\r
+  @param  ControllerHandle       The device handle of the controller to check if a\r
+                                 driver override exists.\r
+  @param  DriverImagePath        The device path for this Image.\r
+  @param  DriverImageHandle      On input, a pointer to the previous driver image\r
+                                 handle returned by GetDriver().  On output, a\r
+                                 pointer to the next driver image handle. Passing\r
+                                 in a NULL,  will return the first driver image\r
+                                 handle for ControllerHandle.\r
+  \r
+  @retval EFI_UNSUPPORTED\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DriverLoaded (\r