]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clean up GenericBdsLib library Instance.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 Jul 2008 06:02:04 +0000 (06:02 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 Jul 2008 06:02:04 +0000 (06:02 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5449 6f19259b-4bc3-4df7-8a09-765794883524

12 files changed:
MdeModulePkg/Library/GenericBdsLib/BdsBoot.c
MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
MdeModulePkg/Library/GenericBdsLib/DevicePath.c
MdeModulePkg/Library/GenericBdsLib/Ebc/BmMachine.h
MdeModulePkg/Library/GenericBdsLib/Ia32/BmMachine.h
MdeModulePkg/Library/GenericBdsLib/InternalBdsLib.h
MdeModulePkg/Library/GenericBdsLib/Ipf/BmMachine.h
MdeModulePkg/Library/GenericBdsLib/Ipf/ShadowRom.c
MdeModulePkg/Library/GenericBdsLib/Performance.c
MdeModulePkg/Library/GenericBdsLib/x64/BmMachine.h

index 6a1c92139f7ee25213eb94c7746ec4bfc3d56d2b..faa371b7b72602101b233c9422df2cdb25a7e39f 100644 (file)
@@ -218,7 +218,7 @@ BdsLibBootViaBootOption (
     //  machinename is ia32, ia64, x64, ...\r
     //\r
     FilePath = FileDevicePath (Handle, DEFAULT_REMOVABLE_FILE_NAME);\r
-    if (FilePath) {\r
+    if (FilePath != NULL) {\r
       Status = gBS->LoadImage (\r
                       TRUE,\r
                       mBdsImageHandle,\r
@@ -582,7 +582,7 @@ MatchPartitionDevicePathNode (
 \r
 \r
 /**\r
-  Delete the boot option associated with the handle passed in\r
+  Delete the boot option associated with the handle passed in.\r
 \r
   @param  Handle                 The handle which present the device path to create\r
                                  boot option\r
@@ -944,7 +944,7 @@ BdsLibEnumerateAllBootOption (
     }\r
   }\r
 \r
-  if (NumberBlockIoHandles) {\r
+  if (NumberBlockIoHandles != 0) {\r
     gBS->FreePool (BlockIoHandles);\r
   }\r
 \r
@@ -1006,7 +1006,7 @@ BdsLibEnumerateAllBootOption (
     }\r
   }\r
 \r
-  if (NumberFileSystemHandles) {\r
+  if (NumberFileSystemHandles != 0) {\r
     gBS->FreePool (FileSystemHandles);\r
   }\r
 \r
@@ -1029,7 +1029,7 @@ BdsLibEnumerateAllBootOption (
     BdsLibBuildOptionFromHandle (SimpleNetworkHandles[Index], BdsBootOptionList, Buffer);\r
   }\r
 \r
-  if (NumberSimpleNetworkHandles) {\r
+  if (NumberSimpleNetworkHandles != 0) {\r
     gBS->FreePool (SimpleNetworkHandles);\r
   }\r
 \r
@@ -1083,7 +1083,7 @@ BdsLibEnumerateAllBootOption (
     BdsLibBuildOptionFromShell (FvHandleBuffer[Index], BdsBootOptionList);\r
   }\r
 \r
-  if (FvHandleCount) {\r
+  if (FvHandleCount != 0) {\r
     gBS->FreePool (FvHandleBuffer);\r
   }\r
   //\r
@@ -1098,14 +1098,13 @@ BdsLibEnumerateAllBootOption (
 \r
 \r
 /**\r
-  Build the boot option with the handle parsed in\r
+  Build the boot option with the handle parsed in.\r
 \r
   @param  Handle                 The handle which present the device path to create\r
                                  boot option\r
   @param  BdsBootOptionList      The header of the link list which indexed all\r
                                  current boot options\r
-\r
-  @return VOID\r
+  @param  String                 Boot option name.\r
 \r
 **/\r
 VOID\r
@@ -1128,15 +1127,13 @@ BdsLibBuildOptionFromHandle (
 \r
 \r
 /**\r
-  Build the on flash shell boot option with the handle parsed in\r
+  Build the on flash shell boot option with the handle parsed in.\r
 \r
   @param  Handle                 The handle which present the device path to create\r
                                  on flash shell boot option\r
   @param  BdsBootOptionList      The header of the link list which indexed all\r
                                  current boot options\r
 \r
-  @return None\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -1459,7 +1456,7 @@ BdsLibNetworkBootWithMediaPresent (
 \r
 \r
 /**\r
-  For a bootable Device path, return its boot type\r
+  For a bootable Device path, return its boot type.\r
 \r
   @param  DevicePath                      The bootable device Path to check\r
 \r
@@ -1547,8 +1544,8 @@ BdsGetBootTypeFromDevicePath (
   Check whether the Device path in a boot option point to a valide bootable device,\r
   And if CheckMedia is true, check the device is ready to boot now.\r
 \r
-  DevPath -- the Device path in a boot option\r
-  CheckMedia -- if true, check the device is ready to boot now.\r
+  @param DevPath -- the Device path in a boot option\r
+  @param CheckMedia -- if true, check the device is ready to boot now.\r
 \r
   @return TRUE      -- the Device path  is valide\r
   @return FALSE   -- the Device path  is invalide .\r
index 50675429c36ecc2fa011863f8cf97dd0621ff434..07d5c3832033771cbb92c61fe107d4bc73be5e13 100644 (file)
@@ -309,7 +309,7 @@ BdsLibConnectAllDriversToAllControllers (
 \r
 /**\r
   Connect the specific Usb device which match the short form device path,\r
-  and whose bus is determined by Host Controller (Uhci or Ehci)\r
+  and whose bus is determined by Host Controller (Uhci or Ehci).\r
 \r
   @param  HostControllerPI      Uhci (0x00) or Ehci (0x20) or Both uhci and ehci\r
                                 (0xFF)\r
index bd551561694cf5a3f00c2ce81307eb4141e301fe..9f77553ec2e2dbb2a67da7bbaa9f11e11eee9524 100644 (file)
@@ -14,6 +14,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "InternalBdsLib.h"\r
 \r
+/**\r
+  Check if we need to save the EFI variable with "ConVarName" as name\r
+  as NV type\r
+\r
+  @param ConVarName The name of the EFI variable.\r
+\r
+  @retval TRUE    Set the EFI variabel as NV type.\r
+  @retval FALSE   EFI variabel as NV type can be set NonNV.\r
+**/\r
 BOOLEAN\r
 IsNvNeed (\r
   IN CHAR16 *ConVarName\r
@@ -27,7 +36,7 @@ IsNvNeed (
   // If the variable includes "Dev" at last, we consider\r
   // it does not support NV attribute.\r
   //\r
-  while (*Ptr) {\r
+  while (*Ptr != L'\0') {\r
     Ptr++;\r
   }\r
 \r
index 084fa0de4ba15771d894781d9a62477af822a101..c96aa23cabde29c6536e1ecdc5c0292098b2a2c4 100644 (file)
@@ -17,8 +17,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define MAX_STRING_LEN        200\r
 \r
-static BOOLEAN   mFeaturerSwitch = TRUE;\r
-static BOOLEAN   mResetRequired = FALSE;\r
+BOOLEAN   mFeaturerSwitch = TRUE;\r
+BOOLEAN   mResetRequired = FALSE;\r
 \r
 extern UINT16 gPlatformBootTimeOutDefault;\r
 \r
@@ -174,8 +174,8 @@ BdsLibLoadDrivers (
 \r
 \r
 /**\r
-  Get the Option Number that does not used\r
-  Try to locate the specific option variable one by one untile find a free number\r
+  Get the Option Number that does not used.\r
+  Try to locate the specific option variable one by one untile find a free number.\r
 \r
   @param  VariableName          Indicate if the boot#### or driver#### option\r
 \r
@@ -432,7 +432,7 @@ BdsLibRegisterNewOption (
 \r
 /**\r
   Build the boot#### or driver#### option from the VariableName, the\r
-  build boot#### or driver#### will also be linked to BdsCommonOptionList\r
+  build boot#### or driver#### will also be linked to BdsCommonOptionList.\r
 \r
   @param  BdsCommonOptionList   The header of the boot#### or driver#### option\r
                                 link list\r
@@ -774,7 +774,7 @@ BdsLibMatchDevicePaths (
   EFI_DEVICE_PATH_PROTOCOL  *DevicePathInst;\r
   UINTN                     Size;\r
 \r
-  if (!Multi || !Single) {\r
+  if (Multi != NULL || Single  != NULL) {\r
     return FALSE;\r
   }\r
 \r
@@ -820,19 +820,19 @@ BdsLibOutputStrings (
   ...\r
   )\r
 {\r
-  VA_LIST     args;\r
+  VA_LIST     Args;\r
   EFI_STATUS  Status;\r
   CHAR16      *String;\r
 \r
   Status = EFI_SUCCESS;\r
-  VA_START (args, ConOut);\r
+  VA_START (Args, ConOut);\r
 \r
   while (!EFI_ERROR (Status)) {\r
     //\r
     // If String is NULL, then it's the end of the list\r
     //\r
-    String = VA_ARG (args, CHAR16 *);\r
-    if (!String) {\r
+    String = VA_ARG (Args, CHAR16 *);\r
+    if (String != NULL) {\r
       break;\r
     }\r
 \r
@@ -992,13 +992,12 @@ SetupResetReminder (
 \r
 \r
 /**\r
-  Get the headers (dos, image, optional header) from an image\r
+  Get the headers (dos, image, optional header) from an image.\r
 \r
   @param  Device                SimpleFileSystem device handle\r
   @param  FileName              File name for the image\r
   @param  DosHeader             Pointer to dos header\r
-  @param  ImageHeader           Pointer to image header\r
-  @param  OptionalHeader        Pointer to optional header\r
+  @param  Hdr                   Pointer to optional header\r
 \r
   @retval EFI_SUCCESS           Successfully get the machine type.\r
   @retval EFI_NOT_FOUND         The file is not found.\r
@@ -1130,30 +1129,25 @@ BdsLibGetImageHeader (
   return Status;\r
 }\r
 \r
-VOID\r
-EFIAPI\r
-BdsSetMemoryTypeInformationVariable (\r
-  EFI_EVENT  Event,\r
-  VOID       *Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   This routine is a notification function for legayc boot or exit boot\r
   service event. It will adjust the memory information for different\r
-  memory type and save them into the variables for next boot\r
+  memory type and save them into the variables for next boot.\r
 \r
-Arguments:\r
 \r
-  Event    - The event that triggered this notification function\r
-  Context  - Pointer to the notification functions context\r
+  @param Event           The event that triggered this notification function.\r
+  @param Context         Pointer to the notification functions context.\r
 \r
-Returns:\r
+           EDES_TODO: Incomplete Descriptions  None.\r
 \r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+EFIAPI\r
+BdsSetMemoryTypeInformationVariable (\r
+  EFI_EVENT  Event,\r
+  VOID       *Context\r
+  )\r
 {\r
   EFI_STATUS                   Status;\r
   EFI_MEMORY_TYPE_INFORMATION  *PreviousMemoryTypeInformation;\r
@@ -1253,7 +1247,7 @@ Returns:
 \r
 /**\r
   This routine register a function to adjust the different type memory page number just before booting\r
-  and save the updated info into the variable for next boot to use\r
+  and save the updated info into the variable for next boot to use.\r
 \r
 **/\r
 VOID\r
index 7801def6b6c47d78ecdb4829fe93a725e32a9fab..fc6d420d5cbd7e38c91698ca5dd7409d3c489b1c 100644 (file)
@@ -21,45 +21,34 @@ EFI_GUID  mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UAR
 EFI_GUID mEfiDevicePathMessagingSASGuid = DEVICE_PATH_MESSAGING_SAS;\r
 \r
 \r
-VOID *\r
-ReallocatePool (\r
-  IN VOID                 *OldPool,\r
-  IN UINTN                OldSize,\r
-  IN UINTN                NewSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Adjusts the size of a previously allocated buffer.\r
 \r
-Arguments:\r
-\r
-  OldPool               - A pointer to the buffer whose size is being adjusted.\r
-\r
-  OldSize               - The size of the current buffer.\r
 \r
-  NewSize               - The size of the new buffer.\r
+  @param OldPool         A pointer to the buffer whose size is being adjusted.\r
+  @param OldSize         The size of the current buffer.\r
+  @param NewSize         The size of the new buffer.\r
 \r
-Returns:\r
+  @return The new buffer allocated. If allocatio failed, NULL will be returned.\r
 \r
-  EFI_SUCEESS           - The requested number of bytes were allocated.\r
-\r
-  EFI_OUT_OF_RESOURCES  - The pool requested could not be allocated.\r
-\r
-  EFI_INVALID_PARAMETER - The buffer was invalid.\r
-\r
---*/\r
+**/\r
+VOID *\r
+ReallocatePool (\r
+  IN VOID                 *OldPool,\r
+  IN UINTN                OldSize,\r
+  IN UINTN                NewSize\r
+  )\r
 {\r
   VOID  *NewPool;\r
 \r
   NewPool = NULL;\r
-  if (NewSize) {\r
+  if (NewSize != 0) {\r
     NewPool = AllocateZeroPool (NewSize);\r
   }\r
 \r
-  if (OldPool) {\r
-    if (NewPool) {\r
+  if (OldPool != NULL) {\r
+    if (NewPool != NULL) {\r
       CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);\r
     }\r
 \r
@@ -78,9 +67,11 @@ Returns:
                    allocated.\r
   @param  fmt      The format string\r
 \r
+  @param  ...      Variable argument list.\r
+\r
   @return Allocated buffer with the formatted string printed in it.\r
-  @return The caller must free the allocated buffer.   The buffer\r
-  @return allocation is not packed.\r
+          The caller must free the allocated buffer.   The buffer\r
+          allocation is not packed.\r
 \r
 **/\r
 CHAR16 *\r
@@ -92,37 +83,37 @@ CatPrint (
   )\r
 {\r
   UINT16  *AppendStr;\r
-  VA_LIST args;\r
-  UINTN   strsize;\r
+  VA_LIST Args;\r
+  UINTN   StringSize;\r
 \r
   AppendStr = AllocateZeroPool (0x1000);\r
   if (AppendStr == NULL) {\r
     return Str->str;\r
   }\r
 \r
-  VA_START (args, fmt);\r
-  UnicodeVSPrint (AppendStr, 0x1000, fmt, args);\r
-  VA_END (args);\r
+  VA_START (Args, fmt);\r
+  UnicodeVSPrint (AppendStr, 0x1000, fmt, Args);\r
+  VA_END (Args);\r
   if (NULL == Str->str) {\r
-    strsize   = StrSize (AppendStr);\r
-    Str->str  = AllocateZeroPool (strsize);\r
+    StringSize   = StrSize (AppendStr);\r
+    Str->str  = AllocateZeroPool (StringSize);\r
     ASSERT (Str->str != NULL);\r
   } else {\r
-    strsize = StrSize (AppendStr);\r
-    strsize += (StrSize (Str->str) - sizeof (UINT16));\r
+    StringSize = StrSize (AppendStr);\r
+    StringSize += (StrSize (Str->str) - sizeof (UINT16));\r
 \r
     Str->str = ReallocatePool (\r
                 Str->str,\r
                 StrSize (Str->str),\r
-                strsize\r
+                StringSize\r
                 );\r
     ASSERT (Str->str != NULL);\r
   }\r
 \r
   Str->maxlen = MAX_CHAR * sizeof (UINT16);\r
-  if (strsize < Str->maxlen) {\r
+  if (StringSize < Str->maxlen) {\r
     StrCat (Str->str, AppendStr);\r
-    Str->len = strsize - sizeof (UINT16);\r
+    Str->len = StringSize - sizeof (UINT16);\r
   }\r
 \r
   gBS->FreePool (AppendStr);\r
@@ -170,7 +161,7 @@ BdsLibUnpackDevicePath (
   // Allocate space for the unpacked path\r
   //\r
   NewPath = AllocateZeroPool (Size);\r
-  if (NewPath) {\r
+  if (NewPath != NULL) {\r
 \r
     ASSERT (((UINTN) NewPath) % MIN_ALIGNMENT_SIZE == 0);\r
 \r
@@ -198,6 +189,16 @@ BdsLibUnpackDevicePath (
   return NewPath;\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathPci (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -210,6 +211,16 @@ DevPathPci (
   CatPrint (Str, L"Pci(%x|%x)", (UINTN) Pci->Device, (UINTN) Pci->Function);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathPccard (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -222,6 +233,16 @@ DevPathPccard (
   CatPrint (Str, L"Pcmcia(Function%x)", (UINTN) Pccard->FunctionNumber);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathMemMap (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -240,6 +261,16 @@ DevPathMemMap (
     );\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathController (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -254,12 +285,13 @@ DevPathController (
 \r
 \r
 /**\r
-  Convert Vendor device path to device name\r
+  Convert Device Path to a Unicode string for printing.\r
 \r
-  @param  Str      The buffer store device name\r
-  @param  DevPath  Pointer to vendor device path\r
-\r
-  @return When it return, the device name have been stored in *Str.\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
 \r
 **/\r
 VOID\r
@@ -350,9 +382,9 @@ DevPathVendor (
         CatPrint (\r
           Str,\r
           L"%s,%s,%s,",\r
-          (Info & (0x1 << 4)) ? L"SATA" : L"SAS",\r
-          (Info & (0x1 << 5)) ? L"External" : L"Internal",\r
-          (Info & (0x1 << 6)) ? L"Expanded" : L"Direct"\r
+          ((Info & (0x1 << 4)) != 0) ? L"SATA" : L"SAS",\r
+          ((Info & (0x1 << 5)) != 0) ? L"External" : L"Internal",\r
+          ((Info & (0x1 << 6)) != 0) ? L"Expanded" : L"Direct"\r
           );\r
         if ((Info & 0x0f) == 1) {\r
           CatPrint (Str, L"0,");\r
@@ -393,6 +425,16 @@ DevPathVendor (
 }\r
 \r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathAcpi (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -409,6 +451,16 @@ DevPathAcpi (
   }\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathExtendedAcpi (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -443,7 +495,7 @@ DevPathExtendedAcpi (
   // find HIDSTR\r
   //\r
   Anchor = 16;\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) {\r
+  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
     ;\r
   }\r
   if (Index > Anchor) {\r
@@ -453,7 +505,7 @@ DevPathExtendedAcpi (
   // find UIDSTR\r
   //\r
   Anchor = (UINT16) (Index + 1);\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) {\r
+  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
     ;\r
   }\r
   if (Index > Anchor) {\r
@@ -463,7 +515,7 @@ DevPathExtendedAcpi (
   // find CIDSTR\r
   //\r
   Anchor = (UINT16) (Index + 1);\r
-  for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) {\r
+  for (Index = Anchor; Index < Length && AsChar8Array[Index] != '\0'; Index++) {\r
     ;\r
   }\r
   if (Index > Anchor) {\r
@@ -520,6 +572,16 @@ DevPathExtendedAcpi (
 \r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathAdrAcpi (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -542,6 +604,16 @@ DevPathAdrAcpi (
   CatPrint (Str, L")");\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathAtapi (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -559,6 +631,16 @@ DevPathAtapi (
     );\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathScsi (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -571,6 +653,16 @@ DevPathScsi (
   CatPrint (Str, L"Scsi(Pun%x,Lun%x)", (UINTN) Scsi->Pun, (UINTN) Scsi->Lun);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathFibre (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -583,18 +675,38 @@ DevPathFibre (
   CatPrint (Str, L"Fibre(Wwn%lx,Lun%x)", Fibre->WWN, Fibre->Lun);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPath1394 (\r
   IN OUT POOL_PRINT       *Str,\r
   IN VOID                 *DevPath\r
   )\r
 {\r
-  F1394_DEVICE_PATH *F1394;\r
+  F1394_DEVICE_PATH *F1394Path;\r
 \r
-  F1394 = DevPath;\r
-  CatPrint (Str, L"1394(%g)", &F1394->Guid);\r
+  F1394Path = DevPath;\r
+  CatPrint (Str, L"1394(%g)", &F1394Path->Guid);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathUsb (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -607,6 +719,16 @@ DevPathUsb (
   CatPrint (Str, L"Usb(%x,%x)", (UINTN) Usb->ParentPortNumber, (UINTN) Usb->InterfaceNumber);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathUsbWWID (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -625,6 +747,16 @@ DevPathUsbWWID (
     );\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathLogicalUnit (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -637,6 +769,16 @@ DevPathLogicalUnit (
   CatPrint (Str, L"Unit(%x)", (UINTN) LogicalUnit->Lun);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathUsbClass (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -657,6 +799,16 @@ DevPathUsbClass (
     );\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathSata (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -675,95 +827,145 @@ DevPathSata (
     );\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathI2O (\r
   IN OUT POOL_PRINT       *Str,\r
   IN VOID                 *DevPath\r
   )\r
 {\r
-  I2O_DEVICE_PATH *I2O;\r
+  I2O_DEVICE_PATH *I2OPath;\r
 \r
-  I2O = DevPath;\r
-  CatPrint (Str, L"I2O(%x)", (UINTN) I2O->Tid);\r
+  I2OPath = DevPath;\r
+  CatPrint (Str, L"I2O(%x)", (UINTN) I2OPath->Tid);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathMacAddr (\r
   IN OUT POOL_PRINT       *Str,\r
   IN VOID                 *DevPath\r
   )\r
 {\r
-  MAC_ADDR_DEVICE_PATH  *MAC;\r
+  MAC_ADDR_DEVICE_PATH  *MACDevPath;\r
   UINTN                 HwAddressSize;\r
   UINTN                 Index;\r
 \r
-  MAC           = DevPath;\r
+  MACDevPath           = DevPath;\r
 \r
   HwAddressSize = sizeof (EFI_MAC_ADDRESS);\r
-  if (MAC->IfType == 0x01 || MAC->IfType == 0x00) {\r
+  if (MACDevPath->IfType == 0x01 || MACDevPath->IfType == 0x00) {\r
     HwAddressSize = 6;\r
   }\r
 \r
   CatPrint (Str, L"Mac(");\r
 \r
   for (Index = 0; Index < HwAddressSize; Index++) {\r
-    CatPrint (Str, L"%02x", (UINTN) MAC->MacAddress.Addr[Index]);\r
+    CatPrint (Str, L"%02x", (UINTN) MACDevPath->MacAddress.Addr[Index]);\r
   }\r
 \r
   CatPrint (Str, L")");\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathIPv4 (\r
   IN OUT POOL_PRINT       *Str,\r
   IN VOID                 *DevPath\r
   )\r
 {\r
-  IPv4_DEVICE_PATH  *IP;\r
+  IPv4_DEVICE_PATH  *IPDevPath;\r
 \r
-  IP = DevPath;\r
+  IPDevPath = DevPath;\r
   CatPrint (\r
     Str,\r
     L"IPv4(%d.%d.%d.%d:%d)",\r
-    (UINTN) IP->RemoteIpAddress.Addr[0],\r
-    (UINTN) IP->RemoteIpAddress.Addr[1],\r
-    (UINTN) IP->RemoteIpAddress.Addr[2],\r
-    (UINTN) IP->RemoteIpAddress.Addr[3],\r
-    (UINTN) IP->RemotePort\r
+    (UINTN) IPDevPath->RemoteIpAddress.Addr[0],\r
+    (UINTN) IPDevPath->RemoteIpAddress.Addr[1],\r
+    (UINTN) IPDevPath->RemoteIpAddress.Addr[2],\r
+    (UINTN) IPDevPath->RemoteIpAddress.Addr[3],\r
+    (UINTN) IPDevPath->RemotePort\r
     );\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathIPv6 (\r
   IN OUT POOL_PRINT       *Str,\r
   IN VOID                 *DevPath\r
   )\r
 {\r
-  IPv6_DEVICE_PATH  *IP;\r
+  IPv6_DEVICE_PATH  *IPv6DevPath;\r
 \r
-  IP = DevPath;\r
+  IPv6DevPath = DevPath;\r
   CatPrint (\r
     Str,\r
     L"IPv6(%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x)",\r
-    (UINTN) IP->RemoteIpAddress.Addr[0],\r
-    (UINTN) IP->RemoteIpAddress.Addr[1],\r
-    (UINTN) IP->RemoteIpAddress.Addr[2],\r
-    (UINTN) IP->RemoteIpAddress.Addr[3],\r
-    (UINTN) IP->RemoteIpAddress.Addr[4],\r
-    (UINTN) IP->RemoteIpAddress.Addr[5],\r
-    (UINTN) IP->RemoteIpAddress.Addr[6],\r
-    (UINTN) IP->RemoteIpAddress.Addr[7],\r
-    (UINTN) IP->RemoteIpAddress.Addr[8],\r
-    (UINTN) IP->RemoteIpAddress.Addr[9],\r
-    (UINTN) IP->RemoteIpAddress.Addr[10],\r
-    (UINTN) IP->RemoteIpAddress.Addr[11],\r
-    (UINTN) IP->RemoteIpAddress.Addr[12],\r
-    (UINTN) IP->RemoteIpAddress.Addr[13],\r
-    (UINTN) IP->RemoteIpAddress.Addr[14],\r
-    (UINTN) IP->RemoteIpAddress.Addr[15]\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[0],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[1],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[2],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[3],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[4],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[5],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[6],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[7],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[8],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[9],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[10],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[11],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[12],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[13],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[14],\r
+    (UINTN) IPv6DevPath->RemoteIpAddress.Addr[15]\r
     );\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathInfiniBand (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -784,6 +986,16 @@ DevPathInfiniBand (
     );\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathUart (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -859,42 +1071,62 @@ DevPathUart (
   }\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathiSCSI (\r
   IN OUT POOL_PRINT       *Str,\r
   IN VOID                 *DevPath\r
   )\r
 {\r
-  ISCSI_DEVICE_PATH_WITH_NAME *iSCSI;\r
+  ISCSI_DEVICE_PATH_WITH_NAME *IScsi;\r
   UINT16                      Options;\r
 \r
   ASSERT (Str != NULL);\r
   ASSERT (DevPath != NULL);\r
 \r
-  iSCSI = DevPath;\r
+  IScsi = DevPath;\r
   CatPrint (\r
     Str,\r
     L"iSCSI(%s,%x,%lx,",\r
-    iSCSI->iSCSITargetName,\r
-    iSCSI->TargetPortalGroupTag,\r
-    iSCSI->Lun\r
+    IScsi->iSCSITargetName,\r
+    IScsi->TargetPortalGroupTag,\r
+    IScsi->Lun\r
     );\r
 \r
-  Options = iSCSI->LoginOption;\r
-  CatPrint (Str, L"%s,", ((Options >> 1) & 0x0001) ? L"CRC32C" : L"None");\r
-  CatPrint (Str, L"%s,", ((Options >> 3) & 0x0001) ? L"CRC32C" : L"None");\r
-  if ((Options >> 11) & 0x0001) {\r
+  Options = IScsi->LoginOption;\r
+  CatPrint (Str, L"%s,", (((Options >> 1) & 0x0001) != 0) ? L"CRC32C" : L"None");\r
+  CatPrint (Str, L"%s,", (((Options >> 3) & 0x0001) != 0) ? L"CRC32C" : L"None");\r
+  if (((Options >> 11) & 0x0001) != 0) {\r
     CatPrint (Str, L"%s,", L"None");\r
-  } else if ((Options >> 12) & 0x0001) {\r
+  } else if (((Options >> 12) & 0x0001) != 0) {\r
     CatPrint (Str, L"%s,", L"CHAP_UNI");\r
   } else {\r
     CatPrint (Str, L"%s,", L"CHAP_BI");\r
 \r
   }\r
 \r
-  CatPrint (Str, L"%s)", (iSCSI->NetworkProtocol == 0) ? L"TCP" : L"reserved");\r
+  CatPrint (Str, L"%s)", (IScsi->NetworkProtocol == 0) ? L"TCP" : L"reserved");\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathHardDrive (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -935,6 +1167,16 @@ DevPathHardDrive (
   }\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathCDROM (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -947,6 +1189,16 @@ DevPathCDROM (
   CatPrint (Str, L"CDROM(Entry%x)", (UINTN) Cd->BootEntry);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathFilePath (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -959,6 +1211,16 @@ DevPathFilePath (
   CatPrint (Str, L"%s", Fp->PathName);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathMediaProtocol (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -971,6 +1233,16 @@ DevPathMediaProtocol (
   CatPrint (Str, L"Media(%g)", &MediaProt->Protocol);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathFvFilePath (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -983,6 +1255,16 @@ DevPathFvFilePath (
   CatPrint (Str, L"%g", &FvFilePath->FvFileName);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathBssBss (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -1029,6 +1311,16 @@ DevPathBssBss (
   CatPrint (Str, L"Legacy-%s", Type);\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathEndInstance (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -1038,6 +1330,16 @@ DevPathEndInstance (
   CatPrint (Str, L",");\r
 }\r
 \r
+/**\r
+  Convert Device Path to a Unicode string for printing.\r
+\r
+  @param Str             The buffer holding the output string.\r
+                         This buffer contains the length of the\r
+                         string and the maixmum length reserved\r
+                         for the string buffer.\r
+  @param DevPath         The device path.\r
+\r
+**/\r
 VOID\r
 DevPathNodeUnknown (\r
   IN OUT POOL_PRINT       *Str,\r
@@ -1289,12 +1591,12 @@ LibDuplicateDevicePathInstance (
   // Make a copy\r
   //\r
   NewDevPath = NULL;\r
-  if (Size) {\r
+  if (Size != 0) {\r
     NewDevPath = AllocateZeroPool (Size);\r
     ASSERT (NewDevPath != NULL);\r
   }\r
 \r
-  if (NewDevPath) {\r
+  if (NewDevPath != NULL) {\r
     CopyMem (NewDevPath, DevicePathInst, Size);\r
   }\r
 \r
index 55245ac6eead47203a5ce42ad1c697e2d37a3f1b..c0469d098b7d6fb0ac4b7db97025a8f2a7ed227a 100644 (file)
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _BM_MACHINE_H\r
-#define _BM_MACHINE_H\r
+#ifndef _BM_MACHINE_H_\r
+#define _BM_MACHINE_H_\r
 \r
 //\r
 // NOTE: This is not defined in UEFI spec.\r
index aee7f761f0e3d587a104ba596ec07dd59d5d5d96..057717e00ef4f9a86e5ee369ff8557ff2fa3c1be 100644 (file)
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _BM_MACHINE_H\r
-#define _BM_MACHINE_H\r
+#ifndef _BM_MACHINE_H_\r
+#define _BM_MACHINE_H_\r
 \r
 #define DEFAULT_REMOVABLE_FILE_NAME L"\\EFI\\BOOT\\BOOTIA32.EFI"\r
 \r
index 9619c31e7a3ac44d83185549a840f2eaeb354ae0..0ee38eee97ad153c503762d83a18eba81cb8a4c3 100644 (file)
@@ -85,6 +85,12 @@ typedef struct {
   UINT32        Signiture;\r
 } PERF_HEADER;\r
 \r
+/**\r
+\r
+  Allocates a block of memory and writes performance data of booting into it.\r
+  OS can processing these record.\r
+  \r
+**/\r
 VOID\r
 WriteBootToOsPerformanceData (\r
   VOID\r
index e9e99ad4c51f61628acb477fbae9e4866cd2c85a..06ae3dc5c001823e1c531693008de77a2c3af462 100644 (file)
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _BM_MACHINE_H\r
-#define _BM_MACHINE_H\r
+#ifndef _BM_MACHINE_H_\r
+#define _BM_MACHINE_H_\r
 \r
 #define DEFAULT_REMOVABLE_FILE_NAME L"\\EFI\\BOOT\\BOOTIA64.EFI"\r
 \r
index e6f46ee6676441eb40c68ba46b7f2b621d3f4a32..10e8f55c55b2a87ac46efccf4a1070bc6dfc4c00 100644 (file)
@@ -12,18 +12,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-//@MT:#include "Tiano.h"\r
-//@MT:#include "EfiDriverLib.h"\r
-\r
-//@MT:#include EFI_PROTOCOL_DEFINITION (LegacyBios)\r
-\r
 #include "InternalBdsLib.h"\r
 \r
 UINT8 mShadowRomFlag = 0;\r
 \r
+/**\r
+  Shadow all opton ROM if the it is not done.\r
+**/\r
 VOID\r
-EFIAPI\r
-ShadowAllOptionRom()\r
+ShadowAllOptionRom(\r
+  VOID\r
+  )\r
 {\r
   EFI_STATUS                Status;\r
   EFI_LEGACY_BIOS_PROTOCOL  *LegacyBios;\r
index 29547a3b4249475a73d03343ee250b16404cd24b..3b58351495278eab050b5aade77d90a3bba9012d 100644 (file)
@@ -19,21 +19,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 STATIC PERF_HEADER               mPerfHeader;\r
 STATIC PERF_DATA                 mPerfData;\r
 \r
-STATIC\r
+/**\r
+  Get the short verion of PDB file name to be\r
+  used in performance data logging.\r
+\r
+  @param PdbFileName     The long PDB file name.\r
+  @param GaugeString     The output string to be logged by performance logger.\r
+\r
+**/\r
 VOID\r
 GetShortPdbFileName (\r
-  CHAR8  *PdbFileName,\r
-  CHAR8  *GaugeString\r
+  IN  CONST CHAR8  *PdbFileName,\r
+  OUT       CHAR8  *GaugeString\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  \r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   UINTN Index;\r
   UINTN Index1;\r
@@ -72,7 +70,15 @@ Returns:
   return ;\r
 }\r
 \r
-STATIC\r
+/**\r
+  Get the name from the Driver handle, which can be a handle with\r
+  EFI_LOADED_IMAGE_PROTOCOL or EFI_DRIVER_BINDING_PROTOCOL installed.\r
+  This name can be used in performance data logging.\r
+\r
+  @param Handle          Driver handle.\r
+  @param GaugeString     The output string to be logged by performance logger.\r
+\r
+**/\r
 VOID\r
 GetNameFromHandle (\r
   IN  EFI_HANDLE     Handle,\r
@@ -126,25 +132,16 @@ GetNameFromHandle (
   return ;\r
 }\r
 \r
+/**\r
+\r
+  Allocates a block of memory and writes performance data of booting into it.\r
+  OS can processing these record.\r
+  \r
+**/\r
 VOID\r
 WriteBootToOsPerformanceData (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  \r
-  Allocates a block of memory and writes performance data of booting to OS into it.\r
-\r
-Arguments:\r
-  \r
-  None\r
-  \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   EFI_STATUS                Status;\r
   EFI_PHYSICAL_ADDRESS      AcpiLowMemoryBase;\r
index 7008cb4b4f52a7210ba99e7427b057a0efd49644..5e218df8aca480d05cd23588c49eadf836745a0e 100644 (file)
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _BM_MACHINE_H\r
-#define _BM_MACHINE_H\r
+#ifndef _BM_MACHINE_H_\r
+#define _BM_MACHINE_H_\r
 \r
 #define DEFAULT_REMOVABLE_FILE_NAME L"\\EFI\\BOOT\\BOOTX64.EFI"\r
 \r