]> git.proxmox.com Git - mirror_edk2.git/commitdiff
add comments to function declarations and definitions and updated to match coding...
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Apr 2011 20:55:45 +0000 (20:55 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Apr 2011 20:55:45 +0000 (20:55 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11505 6f19259b-4bc3-4df7-8a09-765794883524

47 files changed:
ShellPkg/Application/Shell/ShellParametersProtocol.c
ShellPkg/Include/Library/ShellCEntryLib.h
ShellPkg/Include/ShellBase.h
ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Clipboard.c
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Clipboard.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEditorTypes.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MemImage.c
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MemImage.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.c
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.h
ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.h
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.h
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbios.h
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.h
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/Smbios.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.h
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
ShellPkg/Library/UefiShellDriver1CommandsLib/Devices.c
ShellPkg/Library/UefiShellDriver1CommandsLib/DrvDiag.c
ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h
ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.h
ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h
ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h
ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.h
ShellPkg/Library/UefiShellLib/UefiShellLib.h
ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.h

index 238ccd96811867382f868d07f254d228ab8b5ce9..b90a2c32bbce2d076b713e0375a5db2f35b3a1f6 100644 (file)
@@ -455,6 +455,8 @@ IsUnicodeFile(
   Strips out quotes sections of a string.\r
 \r
   All of the characters between quotes is replaced with spaces.\r
   Strips out quotes sections of a string.\r
 \r
   All of the characters between quotes is replaced with spaces.\r
+\r
+  @param[in,out] TheString  A pointer to the string to update.\r
 **/\r
 VOID\r
 EFIAPI\r
 **/\r
 VOID\r
 EFIAPI\r
index 79136a6894d98a09bdcac3d60c32724c5c05ab09..dfbb16f9c346194d67e0f1e3facc4a29d9cbfa9d 100644 (file)
@@ -12,7 +12,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_SHELL_C_ENTRY_LIB_)\r
+#ifndef _SHELL_C_ENTRY_LIB_\r
 #define _SHELL_C_ENTRY_LIB_\r
 \r
 /**\r
 #define _SHELL_C_ENTRY_LIB_\r
 \r
 /**\r
index 73ef064207814028880c112ea4ad689f614cc1e0..92f5833f140222f636534dab0e0eed42ed4c4886 100644 (file)
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#ifndef __SHELL_BASE__\r
-#define __SHELL_BASE__\r
+#ifndef _SHELL_BASE_\r
+#define _SHELL_BASE_\r
 \r
 #define ABS(a) ((a<0)?(-(a)):(a))\r
 \r
 typedef VOID *SHELL_FILE_HANDLE;\r
 \r
 \r
 #define ABS(a) ((a<0)?(-(a)):(a))\r
 \r
 typedef VOID *SHELL_FILE_HANDLE;\r
 \r
-#ifndef SHELL_FREE_NON_NULL\r
 #define SHELL_FREE_NON_NULL(Pointer)  \\r
   do {                                \\r
     if ((Pointer) != NULL) {          \\r
 #define SHELL_FREE_NON_NULL(Pointer)  \\r
   do {                                \\r
     if ((Pointer) != NULL) {          \\r
@@ -27,7 +26,6 @@ typedef VOID *SHELL_FILE_HANDLE;
       (Pointer) = NULL;               \\r
     }                                 \\r
   } while(FALSE)\r
       (Pointer) = NULL;               \\r
     }                                 \\r
   } while(FALSE)\r
-#endif //SHELL_FREE_NON_NULL\r
 \r
 typedef enum {\r
 ///\r
 \r
 typedef enum {\r
 ///\r
index d519c1d400fc3956a79c2a975e3a7ecc2b0eead4..de61b7cce6956e5bdeb51a6fbb93afc9904e2c78 100644 (file)
@@ -12,7 +12,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_HANDLE_PARSING_LIB_INTERNAL_H_)\r
+#ifndef _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_\r
 #define _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_\r
 \r
 #include <Uefi.h>\r
index 8aa75b419ade36d224bcd47bc58079051cb896c7..469642245d0e704c258e1098f5c495264bf7f000 100644 (file)
@@ -74,23 +74,16 @@ BOOLEAN                           HBufferImageOnlyLineNeedRefresh;
 \r
 BOOLEAN                           HBufferImageMouseNeedRefresh;\r
 \r
 \r
 BOOLEAN                           HBufferImageMouseNeedRefresh;\r
 \r
+/**\r
+  Initialization function for HBufferImage\r
+\r
+  @retval EFI_SUCCESS       The operation was successful.\r
+  @retval EFI_LOAD_ERROR    A load error occured.\r
+**/\r
 EFI_STATUS\r
 HBufferImageInit (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HBufferImageInit (\r
   VOID\r
   )\r
-/**
-  Initialization function for HBufferImage\r
-\r
-  \r
-\r
-  None\r
-\r
\r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-\r
-**/\r
 {\r
   EFI_STATUS  Status;\r
 \r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -144,25 +137,16 @@ HBufferImageInit (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Backup function for HBufferImage. Only a few fields need to be backup. \r
+  This is for making the file buffer refresh as few as possible.\r
+\r
+  @retval EFI_SUCCESS  The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HBufferImageBackup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HBufferImageBackup (\r
   VOID\r
   )\r
-/**
-  Backup function for HBufferImage\r
-  Only a few fields need to be backup. \r
-  This is for making the file buffer refresh \r
-  as few as possible.\r
-\r
-  \r
-\r
-  None\r
-\r
\r
-\r
-  EFI_SUCCESS\r
-\r
-**/\r
 {\r
   HBufferImageBackupVar.MousePosition   = HBufferImage.MousePosition;\r
 \r
 {\r
   HBufferImageBackupVar.MousePosition   = HBufferImage.MousePosition;\r
 \r
@@ -197,27 +181,20 @@ HBufferImageBackup (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-HBufferImageFreeLines (\r
-  VOID\r
-  )\r
-/**
-  Free all the lines in HBufferImage\r
+/**\r
+  Free all the lines in HBufferImage.\r
     Fields affected:\r
     Lines\r
     CurrentLine\r
     NumLines\r
     ListHead \r
 \r
     Fields affected:\r
     Lines\r
     CurrentLine\r
     NumLines\r
     ListHead \r
 \r
-  \r
-\r
-  None\r
-\r
\r
-\r
-  EFI_SUCCESS\r
-\r
+  @retval EFI_SUCCESS  The operation was successful.\r
 **/\r
 **/\r
+EFI_STATUS\r
+HBufferImageFreeLines (\r
+  VOID\r
+  )\r
 {\r
   HFreeLines (HBufferImage.ListHead, HBufferImage.Lines);\r
 \r
 {\r
   HFreeLines (HBufferImage.ListHead, HBufferImage.Lines);\r
 \r
@@ -228,22 +205,15 @@ HBufferImageFreeLines (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Cleanup function for HBufferImage\r
+\r
+  @retval EFI_SUCCESS  The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HBufferImageCleanup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HBufferImageCleanup (\r
   VOID\r
   )\r
-/**
-  Cleanup function for HBufferImage\r
-\r
-  \r
-\r
-  None\r
-\r
\r
-\r
-  EFI_SUCCESS\r
-\r
-**/\r
 {\r
   EFI_STATUS  Status;\r
 \r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -257,12 +227,22 @@ HBufferImageCleanup (
 \r
   HFileImageCleanup ();\r
   HDiskImageCleanup ();\r
 \r
   HFileImageCleanup ();\r
   HDiskImageCleanup ();\r
-  HMemImageCleanup ();\r
 \r
   return Status;\r
 \r
 }\r
 \r
 \r
   return Status;\r
 \r
 }\r
 \r
+/**\r
+  Print Line on Row\r
+\r
+  @param[in] Line     The lline to print.\r
+  @param[in] Row      The row on screen ( begin from 1 ).\r
+  @param[in] FRow     The FRow.\r
+  @param[in] Orig     The original color.\r
+  @param[in] New      The color to print with.\r
+\r
+  @retval EFI_SUCCESS The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HBufferImagePrintLine (\r
   IN HEFI_EDITOR_LINE           *Line,\r
 EFI_STATUS\r
 HBufferImagePrintLine (\r
   IN HEFI_EDITOR_LINE           *Line,\r
@@ -272,22 +252,6 @@ HBufferImagePrintLine (
   IN HEFI_EDITOR_COLOR_UNION    New\r
 \r
   )\r
   IN HEFI_EDITOR_COLOR_UNION    New\r
 \r
   )\r
-/**
-  Print Line on Row\r
-\r
-  \r
-\r
-  Line - Line to print\r
-  Row  - Row on screen ( begin from 1 )\r
-  FRow - FRow\r
-  Orig - Orig\r
-  New  - Light display\r
-\r
\r
-\r
-  EFI_SUCCESS\r
-\r
-**/\r
 {\r
 \r
   UINTN   Index;\r
 {\r
 \r
   UINTN   Index;\r
@@ -330,7 +294,7 @@ HBufferImagePrintLine (
 \r
   }\r
 \r
 \r
   }\r
 \r
-  if (HEditorMouseAction == FALSE) {\r
+  if (!HEditorMouseAction) {\r
     ShellPrintEx (\r
       0,\r
       (INT32)Row - 1,\r
     ShellPrintEx (\r
       0,\r
       (INT32)Row - 1,\r
@@ -417,7 +381,7 @@ HBufferImagePrintLine (
   //\r
   // PRINT the buffer content\r
   //\r
   //\r
   // PRINT the buffer content\r
   //\r
-  if (HEditorMouseAction == FALSE) {\r
+  if (!HEditorMouseAction) {\r
     for (Index = 0; Index < 0x10 && Index < Line->Size; Index++) {\r
       Pos = ASCII_POSITION + Index;\r
 \r
     for (Index = 0; Index < 0x10 && Index < Line->Size; Index++) {\r
       Pos = ASCII_POSITION + Index;\r
 \r
@@ -456,6 +420,15 @@ HBufferImagePrintLine (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Function to decide if a column number is stored in the high bits.\r
+\r
+  @param[in] Column     The column to examine.\r
+  @param[out] FCol      The actual column number.\r
+\r
+  @retval TRUE      The actual column was in high bits and is now in FCol.\r
+  @retval FALSE     There was not a column number in the high bits.\r
+**/\r
 BOOLEAN\r
 HBufferImageIsAtHighBits (\r
   IN  UINTN Column,\r
 BOOLEAN\r
 HBufferImageIsAtHighBits (\r
   IN  UINTN Column,\r
@@ -479,7 +452,7 @@ HBufferImageIsAtHighBits (
 \r
   *FCol = (Column / 3) + 1;\r
 \r
 \r
   *FCol = (Column / 3) + 1;\r
 \r
-  if (!(Column % 3)) {\r
+  if (Column % 3 == 0) {\r
     return TRUE;\r
   }\r
 \r
     return TRUE;\r
   }\r
 \r
@@ -490,6 +463,15 @@ HBufferImageIsAtHighBits (
   return FALSE;\r
 }\r
 \r
   return FALSE;\r
 }\r
 \r
+/**\r
+  Decide if a point is in the already selected area.\r
+\r
+  @param[in] MouseRow     The row of the point to test.\r
+  @param[in] MouseCol     The col of the point to test.\r
+\r
+  @retval TRUE      The point is in the selected area.\r
+  @retval FALSE     The point is not in the selected area.\r
+**/\r
 BOOLEAN\r
 HBufferImageIsInSelectedArea (\r
   IN UINTN MouseRow,\r
 BOOLEAN\r
 HBufferImageIsInSelectedArea (\r
   IN UINTN MouseRow,\r
@@ -552,6 +534,11 @@ HBufferImageIsInSelectedArea (
   return TRUE;\r
 }\r
 \r
   return TRUE;\r
 }\r
 \r
+/**\r
+  Set mouse position according to HBufferImage.MousePosition.\r
+\r
+  @retval EFI_SUCCESS  The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HBufferImageRestoreMousePosition (\r
   VOID\r
 EFI_STATUS\r
 HBufferImageRestoreMousePosition (\r
   VOID\r
@@ -719,22 +706,15 @@ HBufferImageRestoreMousePosition (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Set cursor position according to HBufferImage.DisplayPosition.\r
+\r
+  @retval EFI_SUCCESS  The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HBufferImageRestorePosition (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HBufferImageRestorePosition (\r
   VOID\r
   )\r
-/**
-  Set cursor position according to HBufferImage.DisplayPosition.\r
-\r
-  \r
-\r
-  None\r
-\r
\r
-\r
-  EFI_SUCCESS\r
-\r
-**/\r
 {\r
   //\r
   // set cursor position\r
 {\r
   //\r
   // set cursor position\r
@@ -748,7 +728,7 @@ HBufferImageRestorePosition (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-/**
+/**\r
   Refresh function for HBufferImage.\r
 \r
   @retval EFI_SUCCESS     The operation was successful.\r
   Refresh function for HBufferImage.\r
 \r
   @retval EFI_SUCCESS     The operation was successful.\r
@@ -890,7 +870,7 @@ HBufferImageRefresh (
     } while (Link != HBufferImage.ListHead && Row <= EndRow);\r
 \r
     while (Row <= EndRow) {\r
     } while (Link != HBufferImage.ListHead && Row <= EndRow);\r
 \r
     while (Row <= EndRow) {\r
-      HEditorClearLine (Row);\r
+      EditorClearLine (Row, HMainEditor.ScreenSize.Column, HMainEditor.ScreenSize.Row);\r
       Row++;\r
     }\r
     //\r
       Row++;\r
     }\r
     //\r
@@ -915,8 +895,8 @@ HBufferImageRefresh (
   @param[in] DiskName     Pointer to the disk name.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskOffset   Offset into the disk.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskSize     Size of the disk buffer.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskName     Pointer to the disk name.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskOffset   Offset into the disk.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskSize     Size of the disk buffer.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
-  @param[in] MemoryOffset Offset into the Memory.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
-  @param[in] MemorySize   Size of the Memory buffer.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
+  @param[in] MemOffset    Offset into the Memory.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
+  @param[in] MemSize      Size of the Memory buffer.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
   @param[in] BufferType   The type of buffer to save.  IGNORED.\r
   @param[in] Recover      TRUE for recovermode, FALSE otherwise.\r
 \r
   @param[in] BufferType   The type of buffer to save.  IGNORED.\r
   @param[in] Recover      TRUE for recovermode, FALSE otherwise.\r
 \r
@@ -980,8 +960,8 @@ HBufferImageRead (
   @param[in] DiskName     Pointer to the disk name.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskOffset   Offset into the disk.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskSize     Size of the disk buffer.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskName     Pointer to the disk name.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskOffset   Offset into the disk.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
   @param[in] DiskSize     Size of the disk buffer.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
-  @param[in] MemoryOffset Offset into the Memory.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
-  @param[in] MemorySize   Size of the Memory buffer.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
+  @param[in] MemOffset    Offset into the Memory.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
+  @param[in] MemSize      Size of the Memory buffer.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
   @param[in] BufferType   The type of buffer to save.  IGNORED.\r
 \r
   @return EFI_SUCCESS     The operation was successful.\r
   @param[in] BufferType   The type of buffer to save.  IGNORED.\r
 \r
   @return EFI_SUCCESS     The operation was successful.\r
@@ -1036,7 +1016,7 @@ HBufferImageSave (
   return Status;\r
 }\r
 \r
   return Status;\r
 }\r
 \r
-/**
+/**\r
   Create a new line and append it to the line list.\r
     Fields affected:\r
     NumLines\r
   Create a new line and append it to the line list.\r
     Fields affected:\r
     NumLines\r
@@ -1083,7 +1063,7 @@ HBufferImageCreateLine (
   return Line;\r
 }\r
 \r
   return Line;\r
 }\r
 \r
-/**
+/**\r
   Free the current image.\r
 \r
   @retval EFI_SUCCESS   The operation was successful.\r
   Free the current image.\r
 \r
   @retval EFI_SUCCESS   The operation was successful.\r
@@ -1101,160 +1081,6 @@ HBufferImageFree (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-/**
-  Dispatch input to different handler\r
-\r
-  @param[in] Key    The input key:\r
-                     the keys can be:\r
-                       ASCII KEY\r
-                        Backspace/Delete\r
-                        Direction key: up/down/left/right/pgup/pgdn\r
-                        Home/End\r
-                        INS\r
-\r
-  @retval EFI_SUCCESS           The operation was successful.\r
-  @retval EFI_LOAD_ERROR        A load error occured.\r
-  @retval EFI_OUT_OF_RESOURCES  A Memory allocation failed.\r
-**/\r
-EFI_STATUS\r
-HBufferImageHandleInput (\r
-  IN  EFI_INPUT_KEY *Key\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-\r
-  Status = EFI_SUCCESS;\r
-\r
-  switch (Key->ScanCode) {\r
-  //\r
-  // ordinary key\r
-  //\r
-  case SCAN_NULL:\r
-    Status = HBufferImageDoCharInput (Key->UnicodeChar);\r
-    break;\r
-\r
-  //\r
-  // up arrow\r
-  //\r
-  case SCAN_UP:\r
-    Status = HBufferImageScrollUp ();\r
-    break;\r
-\r
-  //\r
-  // down arrow\r
-  //\r
-  case SCAN_DOWN:\r
-    Status = HBufferImageScrollDown ();\r
-    break;\r
-\r
-  //\r
-  // right arrow\r
-  //\r
-  case SCAN_RIGHT:\r
-    Status = HBufferImageScrollRight ();\r
-    break;\r
-\r
-  //\r
-  // left arrow\r
-  //\r
-  case SCAN_LEFT:\r
-    Status = HBufferImageScrollLeft ();\r
-    break;\r
-\r
-  //\r
-  // page up\r
-  //\r
-  case SCAN_PAGE_UP:\r
-    Status = HBufferImagePageUp ();\r
-    break;\r
-\r
-  //\r
-  // page down\r
-  //\r
-  case SCAN_PAGE_DOWN:\r
-    Status = HBufferImagePageDown ();\r
-    break;\r
-\r
-  //\r
-  // delete\r
-  //\r
-  case SCAN_DELETE:\r
-    Status = HBufferImageDoDelete ();\r
-    break;\r
-\r
-  //\r
-  // home\r
-  //\r
-  case SCAN_HOME:\r
-    Status = HBufferImageHome ();\r
-    break;\r
-\r
-  //\r
-  // end\r
-  //\r
-  case SCAN_END:\r
-    Status = HBufferImageEnd ();\r
-    break;\r
-\r
-  default:\r
-    Status = StatusBarSetStatusString (L"Unknown Command");\r
-    break;\r
-  }\r
-\r
-  return Status;\r
-}\r
-\r
-/**
-  ASCII key + Backspace + return.\r
-\r
-  @param[in] Char               The input char.\r
-\r
-  @retval EFI_SUCCESS           The operation was successful.\r
-  @retval EFI_LOAD_ERROR        A load error occured.\r
-  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HBufferImageDoCharInput (\r
-  IN  CHAR16  Char\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-\r
-  Status = EFI_SUCCESS;\r
-\r
-  switch (Char) {\r
-  case 0:\r
-    break;\r
-\r
-  case 0x08:\r
-    Status = HBufferImageDoBackspace ();\r
-    break;\r
-\r
-  case 0x09:\r
-  case 0x0a:\r
-  case 0x0d:\r
-    //\r
-    // Tabs, Returns are thought as nothing\r
-    //\r
-    break;\r
-\r
-  default:\r
-    //\r
-    // DEAL WITH ASCII CHAR, filter out thing like ctrl+f\r
-    //\r
-    if (Char > 127 || Char < 32) {\r
-      Status = StatusBarSetStatusString (L"Unknown Command");\r
-    } else {\r
-      Status = HBufferImageAddChar (Char);\r
-    }\r
-\r
-    break;\r
-  }\r
-\r
-  return Status;\r
-}\r
-\r
 /**\r
   change char to int value based on Hex.\r
 \r
 /**\r
   change char to int value based on Hex.\r
 \r
@@ -1422,23 +1248,114 @@ HBufferImageAddChar (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
-  Check user specified FileRow and FileCol is in current screen.\r
-\r
-  @param[in] FileRow    Row of file position ( start from 1 ).\r
+  Delete the previous character.\r
 \r
 \r
-  @retval TRUE   It's on the current screen.\r
-  @retval FALSE  It's not on the current screen.\r
+  @retval EFI_SUCCESS   The operationw as successful.\r
 **/\r
 **/\r
-BOOLEAN\r
-HInCurrentScreen (\r
-  IN  UINTN FileRow\r
+EFI_STATUS\r
+EFIAPI\r
+HBufferImageDoBackspace (\r
+  VOID\r
   )\r
 {\r
   )\r
 {\r
-  if (FileRow >= HBufferImage.LowVisibleRow && FileRow <= HBufferImage.LowVisibleRow + (HMainEditor.ScreenSize.Row - 5) - 1) {\r
-    return TRUE;\r
-  }\r
+  HEFI_EDITOR_LINE  *Line;\r
 \r
 \r
-  return FALSE;\r
+  UINTN             FileColumn;\r
+  UINTN             FPos;\r
+  BOOLEAN           LastLine;\r
+\r
+  //\r
+  // variable initialization\r
+  //\r
+  LastLine = FALSE;\r
+\r
+  //\r
+  // already the first character\r
+  //\r
+  if (HBufferImage.BufferPosition.Row == 1 && HBufferImage.BufferPosition.Column == 1) {\r
+    return EFI_SUCCESS;\r
+  }\r
+\r
+  FPos        = (HBufferImage.BufferPosition.Row - 1) * 0x10 + HBufferImage.BufferPosition.Column - 1;\r
+\r
+  FileColumn  = HBufferImage.BufferPosition.Column;\r
+\r
+  Line        = HBufferImage.CurrentLine;\r
+  LastLine    = FALSE;\r
+  if (Line->Link.ForwardLink == HBufferImage.ListHead && FileColumn > 1) {\r
+    LastLine = TRUE;\r
+  }\r
+\r
+  HBufferImageDeleteCharacterFromBuffer (FPos - 1, 1, NULL);\r
+\r
+  //\r
+  // if is the last line\r
+  // then only this line need to be refreshed\r
+  //\r
+  if (LastLine) {\r
+    HBufferImageNeedRefresh         = FALSE;\r
+    HBufferImageOnlyLineNeedRefresh = TRUE;\r
+  } else {\r
+    HBufferImageNeedRefresh         = TRUE;\r
+    HBufferImageOnlyLineNeedRefresh = FALSE;\r
+  }\r
+\r
+  if (!HBufferImage.Modified) {\r
+    HBufferImage.Modified = TRUE;\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+/**\r
+  ASCII key + Backspace + return.\r
+\r
+  @param[in] Char               The input char.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+HBufferImageDoCharInput (\r
+  IN  CHAR16  Char\r
+  )\r
+{\r
+  EFI_STATUS  Status;\r
+\r
+  Status = EFI_SUCCESS;\r
+\r
+  switch (Char) {\r
+  case 0:\r
+    break;\r
+\r
+  case 0x08:\r
+    Status = HBufferImageDoBackspace ();\r
+    break;\r
+\r
+  case 0x09:\r
+  case 0x0a:\r
+  case 0x0d:\r
+    //\r
+    // Tabs, Returns are thought as nothing\r
+    //\r
+    break;\r
+\r
+  default:\r
+    //\r
+    // DEAL WITH ASCII CHAR, filter out thing like ctrl+f\r
+    //\r
+    if (Char > 127 || Char < 32) {\r
+      Status = StatusBarSetStatusString (L"Unknown Command");\r
+    } else {\r
+      Status = HBufferImageAddChar (Char);\r
+    }\r
+\r
+    break;\r
+  }\r
+\r
+  return Status;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -1496,7 +1413,6 @@ HBufferImageMovePosition (
   IN UINTN    NewFilePosCol,\r
   IN BOOLEAN  HighBits\r
   )\r
   IN UINTN    NewFilePosCol,\r
   IN BOOLEAN  HighBits\r
   )\r
-\r
 {\r
   INTN    RowGap;\r
   UINTN   Abs;\r
 {\r
   INTN    RowGap;\r
   UINTN   Abs;\r
@@ -1972,7 +1888,7 @@ HBufferImageGetTotalSize (
   \r
   @param[in] Pos      Position, Pos starting from 0.\r
   @param[in] Count    The Count of characters to delete.\r
   \r
   @param[in] Pos      Position, Pos starting from 0.\r
   @param[in] Count    The Count of characters to delete.\r
-  @param[OUT] DeleteBuffer    The DeleteBuffer.\r
+  @param[out] DeleteBuffer    The DeleteBuffer.\r
 \r
   @retval EFI_SUCCESS Success \r
 **/\r
 \r
   @retval EFI_SUCCESS Success \r
 **/\r
@@ -2209,66 +2125,6 @@ HBufferImageAddCharacterToBuffer (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-/**\r
-  Delete the previous character.\r
-\r
-  @retval EFI_SUCCESS   The operationw as successful.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HBufferImageDoBackspace (\r
-  VOID\r
-  )\r
-{\r
-  HEFI_EDITOR_LINE  *Line;\r
-\r
-  UINTN             FileColumn;\r
-  UINTN             FPos;\r
-  BOOLEAN           LastLine;\r
-\r
-  //\r
-  // variable initialization\r
-  //\r
-  LastLine = FALSE;\r
-\r
-  //\r
-  // already the first character\r
-  //\r
-  if (HBufferImage.BufferPosition.Row == 1 && HBufferImage.BufferPosition.Column == 1) {\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  FPos        = (HBufferImage.BufferPosition.Row - 1) * 0x10 + HBufferImage.BufferPosition.Column - 1;\r
-\r
-  FileColumn  = HBufferImage.BufferPosition.Column;\r
-\r
-  Line        = HBufferImage.CurrentLine;\r
-  LastLine    = FALSE;\r
-  if (Line->Link.ForwardLink == HBufferImage.ListHead && FileColumn > 1) {\r
-    LastLine = TRUE;\r
-  }\r
-\r
-  HBufferImageDeleteCharacterFromBuffer (FPos - 1, 1, NULL);\r
-\r
-  //\r
-  // if is the last line\r
-  // then only this line need to be refreshed\r
-  //\r
-  if (LastLine) {\r
-    HBufferImageNeedRefresh         = FALSE;\r
-    HBufferImageOnlyLineNeedRefresh = TRUE;\r
-  } else {\r
-    HBufferImageNeedRefresh         = TRUE;\r
-    HBufferImageOnlyLineNeedRefresh = FALSE;\r
-  }\r
-\r
-  if (!HBufferImage.Modified) {\r
-    HBufferImage.Modified = TRUE;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
 /**\r
   Delete current character from line.\r
 \r
 /**\r
   Delete current character from line.\r
 \r
@@ -2534,3 +2390,107 @@ HBufferImageAdjustMousePosition (
   }\r
 \r
 }\r
   }\r
 \r
 }\r
+\r
+/**\r
+  Dispatch input to different handler\r
+\r
+  @param[in] Key    The input key:\r
+                     the keys can be:\r
+                       ASCII KEY\r
+                        Backspace/Delete\r
+                        Direction key: up/down/left/right/pgup/pgdn\r
+                        Home/End\r
+                        INS\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_OUT_OF_RESOURCES  A Memory allocation failed.\r
+**/\r
+EFI_STATUS\r
+HBufferImageHandleInput (\r
+  IN  EFI_INPUT_KEY *Key\r
+  )\r
+{\r
+  EFI_STATUS  Status;\r
+\r
+  Status = EFI_SUCCESS;\r
+\r
+  switch (Key->ScanCode) {\r
+  //\r
+  // ordinary key\r
+  //\r
+  case SCAN_NULL:\r
+    Status = HBufferImageDoCharInput (Key->UnicodeChar);\r
+    break;\r
+\r
+  //\r
+  // up arrow\r
+  //\r
+  case SCAN_UP:\r
+    Status = HBufferImageScrollUp ();\r
+    break;\r
+\r
+  //\r
+  // down arrow\r
+  //\r
+  case SCAN_DOWN:\r
+    Status = HBufferImageScrollDown ();\r
+    break;\r
+\r
+  //\r
+  // right arrow\r
+  //\r
+  case SCAN_RIGHT:\r
+    Status = HBufferImageScrollRight ();\r
+    break;\r
+\r
+  //\r
+  // left arrow\r
+  //\r
+  case SCAN_LEFT:\r
+    Status = HBufferImageScrollLeft ();\r
+    break;\r
+\r
+  //\r
+  // page up\r
+  //\r
+  case SCAN_PAGE_UP:\r
+    Status = HBufferImagePageUp ();\r
+    break;\r
+\r
+  //\r
+  // page down\r
+  //\r
+  case SCAN_PAGE_DOWN:\r
+    Status = HBufferImagePageDown ();\r
+    break;\r
+\r
+  //\r
+  // delete\r
+  //\r
+  case SCAN_DELETE:\r
+    Status = HBufferImageDoDelete ();\r
+    break;\r
+\r
+  //\r
+  // home\r
+  //\r
+  case SCAN_HOME:\r
+    Status = HBufferImageHome ();\r
+    break;\r
+\r
+  //\r
+  // end\r
+  //\r
+  case SCAN_END:\r
+    Status = HBufferImageEnd ();\r
+    break;\r
+\r
+  default:\r
+    Status = StatusBarSetStatusString (L"Unknown Command");\r
+    break;\r
+  }\r
+\r
+  return Status;\r
+}\r
+\r
index 5e637ce700f46069a63431f874b858c3e4bd3357..91369b59318d5bcb841735154a7327b968ac7c83 100644 (file)
 \r
 #include "HexEditor.h"\r
 \r
 \r
 #include "HexEditor.h"\r
 \r
+/**\r
+  Initialization function for HBufferImage\r
+\r
+  @retval EFI_SUCCESS       The operation was successful.\r
+  @retval EFI_LOAD_ERROR    A load error occured.\r
+**/\r
 EFI_STATUS\r
 HBufferImageInit (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HBufferImageInit (\r
   VOID\r
   );\r
+\r
+/**\r
+  Cleanup function for HBufferImage\r
+\r
+  @retval EFI_SUCCESS  The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HBufferImageCleanup (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HBufferImageCleanup (\r
   VOID\r
   );\r
+\r
+/**\r
+  Refresh function for HBufferImage.\r
+\r
+  @retval EFI_SUCCESS     The operation was successful.\r
+  @retval EFI_LOAD_ERROR  A Load error occured.\r
+\r
+**/\r
 EFI_STATUS\r
 HBufferImageRefresh (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HBufferImageRefresh (\r
   VOID\r
   );\r
-EFI_STATUS\r
-HBufferImageHide (\r
-  VOID\r
-  );\r
+\r
+/**\r
+  Dispatch input to different handler\r
+\r
+  @param[in] Key    The input key:\r
+                     the keys can be:\r
+                       ASCII KEY\r
+                        Backspace/Delete\r
+                        Direction key: up/down/left/right/pgup/pgdn\r
+                        Home/End\r
+                        INS\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_OUT_OF_RESOURCES  A Memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HBufferImageHandleInput (\r
 EFI_STATUS\r
 HBufferImageHandleInput (\r
-  EFI_INPUT_KEY *\r
+  IN  EFI_INPUT_KEY *Key\r
   );\r
   );\r
+\r
+/**\r
+  Backup function for HBufferImage. Only a few fields need to be backup. \r
+  This is for making the file buffer refresh as few as possible.\r
+\r
+  @retval EFI_SUCCESS  The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HBufferImageBackup (\r
   VOID\r
   );\r
 \r
 EFI_STATUS\r
 HBufferImageBackup (\r
   VOID\r
   );\r
 \r
+/**\r
+  Read an image into a buffer friom a source.\r
+\r
+  @param[in] FileName     Pointer to the file name.  OPTIONAL and ignored if not FileTypeFileBuffer.\r
+  @param[in] DiskName     Pointer to the disk name.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
+  @param[in] DiskOffset   Offset into the disk.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
+  @param[in] DiskSize     Size of the disk buffer.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
+  @param[in] MemOffset    Offset into the Memory.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
+  @param[in] MemSize      Size of the Memory buffer.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
+  @param[in] BufferType   The type of buffer to save.  IGNORED.\r
+  @param[in] Recover      TRUE for recovermode, FALSE otherwise.\r
+\r
+  @return EFI_SUCCESS     The operation was successful.\r
+**/\r
 EFI_STATUS\r
 EFI_STATUS\r
+EFIAPI\r
 HBufferImageRead (\r
 HBufferImageRead (\r
-  IN CONST CHAR16   *,\r
-  IN CONST CHAR16   *,\r
-  IN          UINTN,\r
-  IN          UINTN,\r
-  IN          UINTN,\r
-  IN          UINTN,\r
-  IN          EDIT_FILE_TYPE,\r
-  IN          BOOLEAN\r
+  IN CONST CHAR16                   *FileName,\r
+  IN CONST CHAR16                   *DiskName,\r
+  IN UINTN                          DiskOffset,\r
+  IN UINTN                          DiskSize,\r
+  IN UINTN                          MemOffset,\r
+  IN UINTN                          MemSize,\r
+  IN EDIT_FILE_TYPE                 BufferType,\r
+  IN BOOLEAN                        Recover\r
   );\r
 \r
   );\r
 \r
-EFI_STATUS\r
-HBufferImageSave (\r
-  IN CHAR16   *,\r
-  IN CHAR16   *,\r
-  IN          UINTN,\r
-  IN          UINTN,\r
-  IN          UINTN,\r
-  IN          UINTN,\r
-  IN          EDIT_FILE_TYPE\r
-  );\r
+/**\r
+  Save the current image.\r
 \r
 \r
-INTN\r
-HBufferImageCharToHex (\r
-  IN CHAR16\r
-  );\r
+  @param[in] FileName     Pointer to the file name.  OPTIONAL and ignored if not FileTypeFileBuffer.\r
+  @param[in] DiskName     Pointer to the disk name.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
+  @param[in] DiskOffset   Offset into the disk.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
+  @param[in] DiskSize     Size of the disk buffer.  OPTIONAL and ignored if not FileTypeDiskBuffer.\r
+  @param[in] MemOffset    Offset into the Memory.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
+  @param[in] MemSize      Size of the Memory buffer.  OPTIONAL and ignored if not FileTypeMemBuffer.\r
+  @param[in] BufferType   The type of buffer to save.  IGNORED.\r
 \r
 \r
+  @return EFI_SUCCESS     The operation was successful.\r
+**/\r
 EFI_STATUS\r
 EFI_STATUS\r
-HBufferImageRestoreMousePosition (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImageRestorePosition (\r
-  VOID\r
+HBufferImageSave (\r
+  IN CHAR16                         *FileName,\r
+  IN CHAR16                         *DiskName,\r
+  IN UINTN                          DiskOffset,\r
+  IN UINTN                          DiskSize,\r
+  IN UINTN                          MemOffset,\r
+  IN UINTN                          MemSize,\r
+  IN EDIT_FILE_TYPE                 BufferType\r
   );\r
 \r
   );\r
 \r
+/**\r
+  According to cursor's file position, adjust screen display.\r
+\r
+  @param[in] NewFilePosRow    Row of file position ( start from 1 ).\r
+  @param[in] NewFilePosCol    Column of file position ( start from 1 ).\r
+  @param[in] HighBits         Cursor will on high4 bits or low4 bits.\r
+**/\r
 VOID\r
 HBufferImageMovePosition (\r
 VOID\r
 HBufferImageMovePosition (\r
-  IN UINTN,\r
-  IN UINTN,\r
-  IN BOOLEAN\r
+  IN UINTN    NewFilePosRow,\r
+  IN UINTN    NewFilePosCol,\r
+  IN BOOLEAN  HighBits\r
   );\r
 \r
   );\r
 \r
-EFI_STATUS\r
-HBufferImageHandleInput (\r
-  EFI_INPUT_KEY *\r
-  );\r
 \r
 \r
-HEFI_EDITOR_LINE  *\r
-HBufferImageCreateLine (\r
-  VOID\r
-  );\r
+/**\r
+  Create a new line and append it to the line list.\r
+    Fields affected:\r
+    NumLines\r
+    Lines \r
 \r
 \r
-EFI_STATUS\r
-HBufferImageDoCharInput (\r
-  CHAR16\r
-  );\r
-EFI_STATUS\r
-HBufferImageAddChar (\r
-  CHAR16\r
-  );\r
+  @retval NULL    create line failed.\r
+  @return         the line created.\r
 \r
 \r
-BOOLEAN\r
-HInCurrentScreen (\r
-  UINTN\r
-  );\r
-BOOLEAN\r
-HAboveCurrentScreen (\r
-  UINTN\r
-  );\r
-BOOLEAN\r
-HUnderCurrentScreen (\r
-  UINTN\r
-  );\r
-\r
-EFI_STATUS\r
-HBufferImageScrollRight (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImageScrollLeft (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImageScrollDown (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImageScrollUp (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImagePageUp (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImagePageDown (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImageHome (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImageEnd (\r
-  VOID\r
-  );\r
-\r
-EFI_STATUS\r
-HBufferImageDoBackspace (\r
-  VOID\r
-  );\r
-EFI_STATUS\r
-HBufferImageDoDelete (\r
-  VOID\r
-  );\r
-\r
-EFI_STATUS\r
-HBufferImageCutLine (\r
-  HEFI_EDITOR_LINE **\r
-  );\r
-EFI_STATUS\r
-HBufferImagePasteLine (\r
+**/\r
+HEFI_EDITOR_LINE  *\r
+HBufferImageCreateLine (\r
   VOID\r
   );\r
 \r
   VOID\r
   );\r
 \r
-EFI_STATUS\r
-HBufferImageGetFileInfo (\r
-  EFI_FILE_HANDLE,\r
-  CHAR16          *,\r
-  EFI_FILE_INFO   **\r
-  );\r
-\r
-EFI_STATUS\r
-HBufferImageSearch (\r
-  CHAR16  *,\r
-  UINTN\r
-  );\r
-EFI_STATUS\r
-HBufferImageReplace (\r
-  CHAR16  *,\r
-  UINTN\r
-  );\r
-\r
-/**
+/**\r
   Free the current image.\r
 \r
   @retval EFI_SUCCESS   The operation was successful.\r
   Free the current image.\r
 \r
   @retval EFI_SUCCESS   The operation was successful.\r
@@ -198,58 +173,105 @@ HBufferImageFree (
   VOID\r
   );\r
 \r
   VOID\r
   );\r
 \r
+/**\r
+  Delete character from buffer.\r
+  \r
+  @param[in] Pos      Position, Pos starting from 0.\r
+  @param[in] Count    The Count of characters to delete.\r
+  @param[out] DeleteBuffer    The DeleteBuffer.\r
+\r
+  @retval EFI_SUCCESS Success \r
+**/\r
 EFI_STATUS\r
 HBufferImageDeleteCharacterFromBuffer (\r
 EFI_STATUS\r
 HBufferImageDeleteCharacterFromBuffer (\r
-  IN      UINTN,\r
-  IN      UINTN,\r
-  UINT8   *\r
+  IN  UINTN         Pos,\r
+  IN  UINTN         Count,\r
+  OUT UINT8         *DeleteBuffer\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Add character to buffer, add before pos.\r
+\r
+  @param[in] Pos        Position, Pos starting from 0.\r
+  @param[in] Count      Count of characters to add.\r
+  @param[in] AddBuffer  Add buffer.\r
+\r
+  @retval EFI_SUCCESS   Success.  \r
+**/\r
 EFI_STATUS\r
 HBufferImageAddCharacterToBuffer (\r
 EFI_STATUS\r
 HBufferImageAddCharacterToBuffer (\r
-  IN      UINTN,\r
-  IN      UINTN,\r
-  UINT8   *\r
+  IN  UINTN          Pos,\r
+  IN  UINTN          Count,\r
+  IN  UINT8          *AddBuffer\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Change the raw buffer to a list of lines for the UI.\r
+  \r
+  @param[in] Buffer   The pointer to the buffer to fill.\r
+  @param[in] Bytes    The size of the buffer in bytes.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 EFI_STATUS\r
+EFIAPI\r
 HBufferImageBufferToList (\r
 HBufferImageBufferToList (\r
-  IN VOID   *,\r
-  IN        UINTN\r
+  IN VOID   *Buffer,\r
+  IN UINTN  Bytes\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Change the list of lines from the UI to a raw buffer.\r
+  \r
+  @param[in] Buffer   The pointer to the buffer to fill.\r
+  @param[in] Bytes    The size of the buffer in bytes.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 EFI_STATUS\r
+EFIAPI\r
 HBufferImageListToBuffer (\r
 HBufferImageListToBuffer (\r
-  IN VOID   *,\r
-  IN        UINTN\r
+  IN VOID   *Buffer,\r
+  IN UINTN  Bytes\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Move the mouse in the image buffer.\r
+\r
+  @param[in] TextX    The x-coordinate.\r
+  @param[in] TextY    The y-coordinate.\r
+**/\r
 VOID\r
 VOID\r
+EFIAPI\r
 HBufferImageAdjustMousePosition (\r
 HBufferImageAdjustMousePosition (\r
-  INT32,\r
-  INT32\r
+  IN INT32 TextX,\r
+  IN INT32 TextY\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Function to decide if a column number is stored in the high bits.\r
+\r
+  @param[in] Column     The column to examine.\r
+  @param[out] FCol      The actual column number.\r
+\r
+  @retval TRUE      The actual column was in high bits and is now in FCol.\r
+  @retval FALSE     There was not a column number in the high bits.\r
+**/\r
 BOOLEAN\r
 HBufferImageIsAtHighBits (\r
 BOOLEAN\r
 HBufferImageIsAtHighBits (\r
-  UINTN,\r
-  UINTN *\r
-  ) ;\r
-\r
-EFI_STATUS\r
-HBufferImageCutLine (\r
-  HEFI_EDITOR_LINE **\r
+  IN  UINTN Column,\r
+  OUT UINTN *FCol\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Get the size of the open buffer.\r
+\r
+  @retval The size in bytes.\r
+**/\r
 UINTN\r
 HBufferImageGetTotalSize (\r
   VOID\r
   );\r
 \r
 UINTN\r
 HBufferImageGetTotalSize (\r
   VOID\r
   );\r
 \r
-BOOLEAN\r
-HBufferImageIsInSelectedArea (\r
-  UINTN,\r
-  UINTN\r
-  );\r
-\r
 #endif\r
 #endif\r
index 2408027abb17f0c6c0a9b2f2da85b76718e9d3cf..4d5bfb391ff5366df74c8dc307a639f8a64625f5 100644 (file)
 \r
 #include "HexEditor.h"\r
 \r
 \r
 #include "HexEditor.h"\r
 \r
+typedef struct {\r
+  UINT8 *Buffer;\r
+  UINTN Size;\r
+} HEFI_EDITOR_CLIPBOARD;\r
+\r
 HEFI_EDITOR_CLIPBOARD HClipBoard;\r
 \r
 //\r
 HEFI_EDITOR_CLIPBOARD HClipBoard;\r
 \r
 //\r
@@ -24,26 +29,16 @@ HEFI_EDITOR_CLIPBOARD HClipBoardConst = {
   0\r
 };\r
 \r
   0\r
 };\r
 \r
+/**\r
+  Initialization function for HDiskImage.\r
+\r
+  @param[in] EFI_SUCCESS      The operation was successful.\r
+  @param[in] EFI_LOAD_ERROR   A load error occured.\r
+**/\r
 EFI_STATUS\r
 HClipBoardInit (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HClipBoardInit (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Initialization function for HDiskImage\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   //\r
   // basiclly initialize the HDiskImage\r
 {\r
   //\r
   // basiclly initialize the HDiskImage\r
@@ -53,26 +48,16 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Initialization function for HDiskImage.\r
+\r
+  @param[in] EFI_SUCCESS      The operation was successful.\r
+  @param[in] EFI_LOAD_ERROR   A load error occured.\r
+**/\r
 EFI_STATUS\r
 HClipBoardCleanup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HClipBoardCleanup (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Initialization function for HDiskImage\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
 \r
   SHELL_FREE_NON_NULL (HClipBoard.Buffer);\r
 {\r
 \r
   SHELL_FREE_NON_NULL (HClipBoard.Buffer);\r
@@ -80,6 +65,14 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Set a buffer into the clipboard.\r
+\r
+  @param[in] Buffer   The buffer to add to the clipboard.\r
+  @param[in] Size     The size of Buffer in bytes.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HClipBoardSet (\r
   IN UINT8 *Buffer,\r
 EFI_STATUS\r
 HClipBoardSet (\r
   IN UINT8 *Buffer,\r
@@ -98,6 +91,13 @@ HClipBoardSet (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Get a buffer from the clipboard.\r
+\r
+  @param[out] Buffer   The pointer to the buffer to add to the clipboard.\r
+\r
+  @return the size of the buffer.\r
+**/\r
 UINTN\r
 HClipBoardGet (\r
   OUT UINT8  **Buffer\r
 UINTN\r
 HClipBoardGet (\r
   OUT UINT8  **Buffer\r
index 9165d98f3060efa8a8962baa0ba3fcee0829033c..8066c292479cc79098811e690791d9dc4aec2384 100644 (file)
 \r
 #include "HexEditor.h"\r
 \r
 \r
 #include "HexEditor.h"\r
 \r
+/**\r
+  Initialization function for HDiskImage\r
+\r
+  @param[in] EFI_SUCCESS      The operation was successful.\r
+  @param[in] EFI_LOAD_ERROR   A load error occured.\r
+**/\r
 EFI_STATUS\r
 HClipBoardInit (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HClipBoardInit (\r
   VOID\r
   );\r
+\r
+/**\r
+  Initialization function for HDiskImage.\r
+\r
+  @param[in] EFI_SUCCESS      The operation was successful.\r
+  @param[in] EFI_LOAD_ERROR   A load error occured.\r
+**/\r
 EFI_STATUS\r
 HClipBoardCleanup (\r
   VOID\r
   );\r
 \r
 EFI_STATUS\r
 HClipBoardCleanup (\r
   VOID\r
   );\r
 \r
+/**\r
+  Set a buffer into the clipboard.\r
+\r
+  @param[in] Buffer   The buffer to add to the clipboard.\r
+  @param[in] Size     The size of Buffer in bytes.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HClipBoardSet (\r
 EFI_STATUS\r
 HClipBoardSet (\r
-  UINT8   *,\r
-  UINTN\r
+  IN UINT8 *Buffer,\r
+  IN UINTN Size\r
   );\r
   );\r
+\r
+/**\r
+  Get a buffer from the clipboard.\r
+\r
+  @param[out] Buffer   The pointer to the buffer to add to the clipboard.\r
+\r
+  @return the size of the buffer.\r
+**/\r
 UINTN\r
 HClipBoardGet (\r
 UINTN\r
 HClipBoardGet (\r
-  UINT8 **\r
+  OUT UINT8  **Buffer\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index 86db6aadf25edebcac67209b85ac3be749b16d15..c956f77b28cf8e646bad3318a583ee422ff728d3 100644 (file)
@@ -37,26 +37,16 @@ HEFI_EDITOR_DISK_IMAGE            HDiskImageConst = {
   0\r
 };\r
 \r
   0\r
 };\r
 \r
+/**\r
+  Initialization function for HDiskImage.\r
\r
+  @retval EFI_SUCCESS     The operation was successful.\r
+  @retval EFI_LOAD_ERROR  A load error occured.\r
+**/\r
 EFI_STATUS\r
 HDiskImageInit (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HDiskImageInit (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Initialization function for HDiskImage\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   //\r
   // basically initialize the HDiskImage\r
 {\r
   //\r
   // basically initialize the HDiskImage\r
@@ -68,29 +58,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Backup function for HDiskImage. Only a few fields need to be backup.   \r
+  This is for making the Disk buffer refresh as few as possible.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  gST->ConOut of resources.\r
+**/\r
 EFI_STATUS\r
 HDiskImageBackup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HDiskImageBackup (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Backup function for HDiskImage\r
-  Only a few fields need to be backup. \r
-  This is for making the Disk buffer refresh \r
-  as few as possible.\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS          - Success\r
-  EFI_OUT_OF_RESOURCES - gST->ConOut of resources\r
-\r
---*/\r
 {\r
   //\r
   // backup the disk name, offset and size\r
 {\r
   //\r
   // backup the disk name, offset and size\r
@@ -109,25 +87,15 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Cleanup function for HDiskImage.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HDiskImageCleanup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HDiskImageCleanup (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Cleanup function for HDiskImage\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
 {\r
   SHELL_FREE_NON_NULL (HDiskImage.Name);\r
   SHELL_FREE_NON_NULL (HDiskImageBackupVar.Name);\r
 {\r
   SHELL_FREE_NON_NULL (HDiskImage.Name);\r
   SHELL_FREE_NON_NULL (HDiskImageBackupVar.Name);\r
@@ -135,6 +103,16 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Set FileName field in HFileImage.\r
+\r
+  @param[in] Str      File name to set.\r
+  @param[in] Offset   The offset.\r
+  @param[in] Size     The size.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HDiskImageSetDiskNameOffsetSize (\r
 EFI_STATUS\r
 EFIAPI\r
 HDiskImageSetDiskNameOffsetSize (\r
@@ -142,24 +120,6 @@ HDiskImageSetDiskNameOffsetSize (
   IN UINTN    Offset,\r
   IN UINTN    Size\r
   )\r
   IN UINTN    Offset,\r
   IN UINTN    Size\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Set FileName field in HFileImage\r
-\r
-Arguments:  \r
-\r
-  Str    - File name to set\r
-  Offset - The offset\r
-  Size   - The size\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   UINTN Len;\r
   UINTN Index;\r
 {\r
   UINTN Len;\r
   UINTN Index;\r
@@ -188,6 +148,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Read a disk from disk into HBufferImage.\r
+\r
+  @param[in] DeviceName   filename to read.\r
+  @param[in] Offset       The offset.\r
+  @param[in] Size         The size.\r
+  @param[in] Recover      if is for recover, no information print.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_INVALID_PARAMETER A parameter was invalid.  \r
+**/\r
 EFI_STATUS\r
 HDiskImageRead (\r
   IN CONST CHAR16   *DeviceName,\r
 EFI_STATUS\r
 HDiskImageRead (\r
   IN CONST CHAR16   *DeviceName,\r
@@ -195,27 +168,6 @@ HDiskImageRead (
   IN UINTN    Size,\r
   IN BOOLEAN  Recover\r
   )\r
   IN UINTN    Size,\r
   IN BOOLEAN  Recover\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Read a disk from disk into HBufferImage\r
-\r
-Arguments:  \r
-\r
-  DeviceName - filename to read\r
-  Offset     - The offset\r
-  Size       - The size\r
-  Recover    - if is for recover, no information print\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-  EFI_OUT_OF_RESOURCES\r
-  EFI_INVALID_PARAMETER \r
-  \r
---*/\r
 {\r
   CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
   EFI_DEVICE_PATH_PROTOCOL        *DupDevicePath;\r
 {\r
   CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
   EFI_DEVICE_PATH_PROTOCOL        *DupDevicePath;\r
@@ -374,33 +326,25 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Save lines in HBufferImage to disk.\r
+  NOT ALLOW TO WRITE TO ANOTHER DISK!!!!!!!!!\r
+\r
+  @param[in] DeviceName   The device name.\r
+  @param[in] Offset       The offset.\r
+  @param[in] Size         The size.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_INVALID_PARAMETER A parameter was invalid.  \r
+**/\r
 EFI_STATUS\r
 HDiskImageSave (\r
   IN CHAR16 *DeviceName,\r
   IN UINTN  Offset,\r
   IN UINTN  Size\r
   )\r
 EFI_STATUS\r
 HDiskImageSave (\r
   IN CHAR16 *DeviceName,\r
   IN UINTN  Offset,\r
   IN UINTN  Size\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Save lines in HBufferImage to disk\r
-  NOT ALLOW TO WRITE TO ANOTHER DISK!!!!!!!!!\r
-\r
-Arguments:  \r
-\r
-  DeviceName - The device name\r
-  Offset     - The offset\r
-  Size       - The size\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-  EFI_OUT_OF_RESOURCES\r
-  EFI_INVALID_PARAMETER\r
-\r
---*/\r
 {\r
 \r
   CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
 {\r
 \r
   CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
index eaa8e2615d4ce8b0d8dc70ecc5ea8809dd3ec0ba..06fb53020abc1755faf78be34c256738f6ebda2b 100644 (file)
 \r
 #include "HexEditor.h"\r
 \r
 \r
 #include "HexEditor.h"\r
 \r
+/**\r
+  Initialization function for HDiskImage.\r
\r
+  @retval EFI_SUCCESS     The operation was successful.\r
+  @retval EFI_LOAD_ERROR  A load error occured.\r
+**/\r
 EFI_STATUS\r
 HDiskImageInit (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HDiskImageInit (\r
   VOID\r
   );\r
+\r
+/**\r
+  Cleanup function for HDiskImage.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HDiskImageCleanup (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HDiskImageCleanup (\r
   VOID\r
   );\r
+\r
+/**\r
+  Backup function for HDiskImage. Only a few fields need to be backup.   \r
+  This is for making the Disk buffer refresh as few as possible.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  gST->ConOut of resources.\r
+**/\r
 EFI_STATUS\r
 HDiskImageBackup (\r
   VOID\r
   );\r
 \r
 EFI_STATUS\r
 HDiskImageBackup (\r
   VOID\r
   );\r
 \r
+/**\r
+  Read a disk from disk into HBufferImage.\r
+\r
+  @param[in] DeviceName   filename to read.\r
+  @param[in] Offset       The offset.\r
+  @param[in] Size         The size.\r
+  @param[in] Recover      if is for recover, no information print.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_INVALID_PARAMETER A parameter was invalid.  \r
+**/\r
 EFI_STATUS\r
 HDiskImageRead (\r
 EFI_STATUS\r
 HDiskImageRead (\r
-  IN CONST CHAR16   *,\r
-  IN          UINTN,\r
-  IN          UINTN,\r
-  IN          BOOLEAN\r
+  IN CONST CHAR16   *DeviceName,\r
+  IN UINTN    Offset,\r
+  IN UINTN    Size,\r
+  IN BOOLEAN  Recover\r
   );\r
   );\r
+\r
+/**\r
+  Save lines in HBufferImage to disk.\r
+  NOT ALLOW TO WRITE TO ANOTHER DISK!!!!!!!!!\r
+\r
+  @param[in] DeviceName   The device name.\r
+  @param[in] Offset       The offset.\r
+  @param[in] Size         The size.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_INVALID_PARAMETER A parameter was invalid.  \r
+**/\r
 EFI_STATUS\r
 HDiskImageSave (\r
 EFI_STATUS\r
 HDiskImageSave (\r
-  IN CHAR16   *,\r
-  IN          UINTN,\r
-  IN          UINTN\r
+  IN CHAR16 *DeviceName,\r
+  IN UINTN  Offset,\r
+  IN UINTN  Size\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index 5397071b3b197b5defa279ed72efc56e0bd9e95d..85626626386511a59eb2ea55e22a980aba5ad015 100644 (file)
@@ -35,26 +35,15 @@ HEFI_EDITOR_BUFFER_IMAGE          HFileImageConst = {
   FALSE\r
 };\r
 \r
   FALSE\r
 };\r
 \r
+/**\r
+  Initialization function for HFileImage\r
\r
+  @retval EFI_SUCCESS     The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HFileImageInit (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HFileImageInit (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Initialization function for HFileImage\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   //\r
   // basically initialize the HFileImage\r
 {\r
   //\r
   // basically initialize the HFileImage\r
@@ -70,29 +59,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Backup function for HFileImage. Only a few fields need to be backup. \r
+  This is for making the file buffer refresh as few as possible.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HFileImageBackup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HFileImageBackup (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Backup function for HFileImage\r
-  Only a few fields need to be backup. \r
-  This is for making the file buffer refresh \r
-  as few as possible.\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   SHELL_FREE_NON_NULL (HFileImageBackupVar.FileName);\r
   HFileImageBackupVar.FileName = CatSPrint(NULL, L"%s", HFileImage.FileName);\r
 {\r
   SHELL_FREE_NON_NULL (HFileImageBackupVar.FileName);\r
   HFileImageBackupVar.FileName = CatSPrint(NULL, L"%s", HFileImage.FileName);\r
@@ -103,25 +80,15 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Cleanup function for HFileImage.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HFileImageCleanup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HFileImageCleanup (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Cleanup function for HFileImage\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
 {\r
 \r
   SHELL_FREE_NON_NULL (HFileImage.FileName);\r
 {\r
 \r
   SHELL_FREE_NON_NULL (HFileImage.FileName);\r
@@ -130,26 +97,18 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Set FileName field in HFileImage\r
+\r
+  @param[in] Str  File name to set.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HFileImageSetFileName (\r
   IN CONST CHAR16 *Str\r
   )\r
 EFI_STATUS\r
 HFileImageSetFileName (\r
   IN CONST CHAR16 *Str\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Set FileName field in HFileImage\r
-\r
-Arguments:  \r
-\r
-  Str -- File name to set\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   UINTN Size;\r
   UINTN Index;\r
 {\r
   UINTN Size;\r
   UINTN Index;\r
@@ -175,79 +134,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-HFileImageGetFileInfo (\r
-  IN  EFI_FILE_HANDLE Handle,\r
-  IN  CHAR16          *FileName,\r
-  OUT EFI_FILE_INFO   **InfoOut\r
-  )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Get this file's information\r
-\r
-Arguments:  \r
-\r
-  Handle   - in NT32 mode Directory handle, in other mode File Handle\r
-  FileName - The file name\r
-  InfoOut  - parameter to pass file information out\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
-{\r
-\r
-  VOID        *Info;\r
-  UINTN       Size;\r
-  EFI_STATUS  Status;\r
-\r
-  Size  = SIZE_OF_EFI_FILE_INFO + 1024;\r
-  Info  = AllocateZeroPool (Size);\r
-  if (!Info) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-  //\r
-  // get file information\r
-  //\r
-  Status = Handle->GetInfo (Handle, &gEfiFileInfoGuid, &Size, Info);\r
-  if (EFI_ERROR (Status)) {\r
-    return EFI_LOAD_ERROR;\r
-  }\r
-\r
-  *InfoOut = (EFI_FILE_INFO *) Info;\r
+/**\r
+  Read a file from disk into HBufferImage.\r
 \r
 \r
-  return EFI_SUCCESS;\r
-\r
-}\r
+  @param[in] FileName     filename to read.\r
+  @param[in] Recover      if is for recover, no information print.\r
 \r
 \r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+**/\r
 EFI_STATUS\r
 HFileImageRead (\r
   IN CONST CHAR16  *FileName,\r
   IN BOOLEAN Recover\r
   )\r
 EFI_STATUS\r
 HFileImageRead (\r
   IN CONST CHAR16  *FileName,\r
   IN BOOLEAN Recover\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Read a file from disk into HBufferImage\r
-\r
-Arguments:  \r
-\r
-  FileName -- filename to read\r
-  Recover -- if is for recover, no information print\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-  EFI_OUT_OF_RESOURCES\r
-  \r
---*/\r
 {\r
   HEFI_EDITOR_LINE                *Line;\r
   UINT8                           *Buffer;\r
 {\r
   HEFI_EDITOR_LINE                *Line;\r
   UINT8                           *Buffer;\r
@@ -343,27 +244,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Save lines in HBufferImage to disk.\r
+\r
+  @param[in] FileName     The file name.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+**/\r
 EFI_STATUS\r
 HFileImageSave (\r
   IN CHAR16 *FileName\r
   )\r
 EFI_STATUS\r
 HFileImageSave (\r
   IN CHAR16 *FileName\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Save lines in HBufferImage to disk\r
-\r
-Arguments:  \r
-\r
-  FileName - The file name\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-  EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
 \r
   LIST_ENTRY                      *Link;\r
 {\r
 \r
   LIST_ENTRY                      *Link;\r
index ae386d2fc94414723fd694741366d596ae5734b8..ed27ad03ae257a3cc6c972680f6cde7045858243 100644 (file)
 \r
 #include "HexEditor.h"\r
 \r
 \r
 #include "HexEditor.h"\r
 \r
+/**\r
+  Initialization function for HFileImage\r
\r
+  @retval EFI_SUCCESS     The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HFileImageInit (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HFileImageInit (\r
   VOID\r
   );\r
+\r
+/**\r
+  Cleanup function for HFileImage.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HFileImageCleanup (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HFileImageCleanup (\r
   VOID\r
   );\r
+\r
+/**\r
+  Backup function for HFileImage. Only a few fields need to be backup. \r
+  This is for making the file buffer refresh as few as possible.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HFileImageBackup (\r
   VOID\r
   );\r
 \r
 EFI_STATUS\r
 HFileImageBackup (\r
   VOID\r
   );\r
 \r
-EFI_STATUS\r
-HFileImageSetFileName (\r
-  IN CONST CHAR16 *\r
-  );\r
+/**\r
+  Read a file from disk into HBufferImage.\r
 \r
 \r
-EFI_STATUS\r
-HFileImageGetFileInfo (\r
-  EFI_FILE_HANDLE,\r
-  CHAR16          *,\r
-  EFI_FILE_INFO   **\r
-  );\r
+  @param[in] FileName     filename to read.\r
+  @param[in] Recover      if is for recover, no information print.\r
 \r
 \r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+**/\r
 EFI_STATUS\r
 HFileImageRead (\r
 EFI_STATUS\r
 HFileImageRead (\r
-  IN CONST CHAR16   *,\r
-  IN          BOOLEAN\r
+  IN CONST CHAR16  *FileName,\r
+  IN BOOLEAN Recover\r
   );\r
   );\r
+\r
+/**\r
+  Save lines in HBufferImage to disk.\r
+\r
+  @param[in] FileName     The file name.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+**/\r
 EFI_STATUS\r
 HFileImageSave (\r
 EFI_STATUS\r
 HFileImageSave (\r
-  IN CHAR16 *\r
+  IN CHAR16 *FileName\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index 51c9f44cd52d589fc85b86cfd5b34027c33bc2b8..2849f2b413a00d3db47ae730dbdd6d1e7f5c58c7 100644 (file)
@@ -109,14 +109,8 @@ typedef struct {
 \r
 } HEFI_EDITOR_BUFFER_IMAGE;\r
 \r
 \r
 } HEFI_EDITOR_BUFFER_IMAGE;\r
 \r
-typedef struct {\r
-  UINT8 *Buffer;\r
-  UINTN Size;\r
-} HEFI_EDITOR_CLIPBOARD;\r
-\r
 typedef struct {\r
   HEFI_EDITOR_BUFFER_IMAGE    *BufferImage;\r
 typedef struct {\r
   HEFI_EDITOR_BUFFER_IMAGE    *BufferImage;\r
-  HEFI_EDITOR_CLIPBOARD       *Clipboard;\r
 \r
   HEFI_EDITOR_COLOR_UNION     ColorAttributes;\r
   HEFI_EDITOR_POSITION        ScreenSize;           // row number and column number\r
 \r
   HEFI_EDITOR_COLOR_UNION     ColorAttributes;\r
   HEFI_EDITOR_POSITION        ScreenSize;           // row number and column number\r
index 58c25f81d4d9ef08a0f451df8959578e4e1bbcab..73fa4c238d6c6d7c13abc55983e51ccaee9a6c8b 100644 (file)
@@ -37,8 +37,6 @@ BOOLEAN                         HEditorMouseAction;
 extern HEFI_EDITOR_BUFFER_IMAGE HBufferImage;\r
 extern HEFI_EDITOR_BUFFER_IMAGE HBufferImageBackupVar;\r
 \r
 extern HEFI_EDITOR_BUFFER_IMAGE HBufferImage;\r
 extern HEFI_EDITOR_BUFFER_IMAGE HBufferImageBackupVar;\r
 \r
-extern HEFI_EDITOR_CLIPBOARD    HClipBoard;\r
-\r
 extern BOOLEAN                  HBufferImageMouseNeedRefresh;\r
 extern BOOLEAN                  HBufferImageNeedRefresh;\r
 extern BOOLEAN                  HBufferImageOnlyLineNeedRefresh;\r
 extern BOOLEAN                  HBufferImageMouseNeedRefresh;\r
 extern BOOLEAN                  HBufferImageNeedRefresh;\r
 extern BOOLEAN                  HBufferImageOnlyLineNeedRefresh;\r
@@ -51,7 +49,6 @@ HEFI_EDITOR_GLOBAL_EDITOR       HMainEditorBackupVar;
 //\r
 HEFI_EDITOR_GLOBAL_EDITOR       HMainEditorConst = {\r
   &HBufferImage,\r
 //\r
 HEFI_EDITOR_GLOBAL_EDITOR       HMainEditorConst = {\r
   &HBufferImage,\r
-  &HClipBoard,\r
   {\r
     0,\r
     0\r
   {\r
     0,\r
     0\r
@@ -68,25 +65,15 @@ HEFI_EDITOR_GLOBAL_EDITOR       HMainEditorConst = {
   1\r
 };\r
 \r
   1\r
 };\r
 \r
+/**\r
+  Move cursor to specified lines.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HMainCommandGoToOffset (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandGoToOffset (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  move cursor to specified lines\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
 {\r
   UINTN       Size;\r
   UINT64      Offset;\r
 {\r
   UINTN       Size;\r
   UINT64      Offset;\r
@@ -157,29 +144,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Save current opened buffer.\r
+  If is file buffer, you can save to current file name or \r
+  save to another file name.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainCommandSaveBuffer (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandSaveBuffer (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  save current opened buffer . \r
-  if is file buffer, you can save to current file name or \r
-  save to another file name\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   EFI_STATUS          Status;\r
   BOOLEAN             Done;\r
 {\r
   EFI_STATUS          Status;\r
   BOOLEAN             Done;\r
@@ -190,7 +167,7 @@ Returns:
   SHELL_FILE_HANDLE   ShellFileHandle;\r
 \r
   if (HMainEditor.BufferImage->BufferType != FileTypeFileBuffer) {\r
   SHELL_FILE_HANDLE   ShellFileHandle;\r
 \r
   if (HMainEditor.BufferImage->BufferType != FileTypeFileBuffer) {\r
-    if (HMainEditor.BufferImage->Modified == FALSE) {\r
+    if (!HMainEditor.BufferImage->Modified) {\r
       return EFI_SUCCESS;\r
     }\r
 \r
       return EFI_SUCCESS;\r
     }\r
 \r
@@ -381,7 +358,7 @@ Returns:
     //\r
     // if the file is read only, so can not write back to it.\r
     //\r
     //\r
     // if the file is read only, so can not write back to it.\r
     //\r
-    if (HMainEditor.BufferImage->FileImage->ReadOnly == TRUE) {\r
+    if (HMainEditor.BufferImage->FileImage->ReadOnly) {\r
       StatusBarSetStatusString (L"Access Denied");\r
       SHELL_FREE_NON_NULL (FileName);\r
       return EFI_SUCCESS;\r
       StatusBarSetStatusString (L"Access Denied");\r
       SHELL_FREE_NON_NULL (FileName);\r
       return EFI_SUCCESS;\r
@@ -467,27 +444,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Load a disk buffer editor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainCommandSelectStart (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandSelectStart (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Load a disk buffer editor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-   EFI_SUCCESS\r
-   EFI_LOAD_ERROR\r
-   EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   UINTN Start;\r
 \r
 {\r
   UINTN Start;\r
 \r
@@ -515,27 +482,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Load a disk buffer editor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainCommandSelectEnd (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandSelectEnd (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Load a disk buffer editor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-   EFI_SUCCESS\r
-   EFI_LOAD_ERROR\r
-   EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   UINTN End;\r
 \r
 {\r
   UINTN End;\r
 \r
@@ -563,27 +520,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Cut current line to clipboard.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainCommandCut (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandCut (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  cut current line to clipboard\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   UINTN             Index;\r
   HEFI_EDITOR_LINE  *Line;\r
 {\r
   UINTN             Index;\r
   HEFI_EDITOR_LINE  *Line;\r
@@ -648,28 +595,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Paste line to file buffer.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainCommandPaste (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandPaste (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  paste line to file buffer\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-  EFI_LOAD_ERROR\r
-\r
-\r
---*/\r
 {\r
 \r
   BOOLEAN           OnlyLineRefresh;\r
 {\r
 \r
   BOOLEAN           OnlyLineRefresh;\r
@@ -719,27 +655,17 @@ Returns:
 \r
 }\r
 \r
 \r
 }\r
 \r
+/**\r
+  Exit editor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainCommandExit (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandExit (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  exit editor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
 \r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -822,27 +748,17 @@ Returns:
 \r
 }\r
 \r
 \r
 }\r
 \r
+/**\r
+  Load a file from disk to editor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainCommandOpenFile (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandOpenFile (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Load a file from disk to editor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-   EFI_SUCCESS\r
-   EFI_LOAD_ERROR\r
-   EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   BOOLEAN                         Done;\r
   EFI_STATUS                      Status;\r
 {\r
   BOOLEAN                         Done;\r
   EFI_STATUS                      Status;\r
@@ -1065,28 +981,18 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Load a disk buffer editor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+  @retval EFI_NOT_FOUND           The disk was not found.\r
+**/\r
 EFI_STATUS\r
 HMainCommandOpenDisk (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandOpenDisk (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Load a disk buffer editor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-   EFI_SUCCESS\r
-   EFI_LOAD_ERROR\r
-   EFI_OUT_OF_RESOURCES\r
-   EFI_NOT_FOUND\r
-\r
---*/\r
 {\r
   UINT64                          Size;\r
   UINT64                          Offset;\r
 {\r
   UINT64                          Size;\r
   UINT64                          Offset;\r
@@ -1320,28 +1226,18 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Load memory content to editor\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+  @retval EFI_NOT_FOUND           The disk was not found.\r
+**/\r
 EFI_STATUS\r
 HMainCommandOpenMemory (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainCommandOpenMemory (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Load memory content to editor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-   EFI_SUCCESS\r
-   EFI_LOAD_ERROR\r
-   EFI_OUT_OF_RESOURCES\r
-   EFI_NOT_FOUND\r
-\r
---*/\r
 {\r
   UINT64                          Size;\r
   UINT64                          Offset;\r
 {\r
   UINT64                          Size;\r
   UINT64                          Offset;\r
@@ -1604,27 +1500,16 @@ CONST EDITOR_MENU_ITEM HexEditorMenuItems[] = {
   }\r
 };\r
 \r
   }\r
 };\r
 \r
+/**\r
+  Init function for MainEditor\r
 \r
 \r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainEditorInit (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainEditorInit (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Init function for MainEditor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   EFI_HANDLE  *HandleBuffer;\r
 {\r
   EFI_STATUS  Status;\r
   EFI_HANDLE  *HandleBuffer;\r
@@ -1754,26 +1639,16 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Cleanup function for MainEditor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainEditorCleanup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainEditorCleanup (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  cleanup function for MainEditor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
 \r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -1813,25 +1688,15 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Refresh function for MainEditor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HMainEditorRefresh (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainEditorRefresh (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Refresh function for MainEditor\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
 {\r
   BOOLEAN NameChange;\r
   BOOLEAN ReadChange;\r
 {\r
   BOOLEAN NameChange;\r
   BOOLEAN ReadChange;\r
@@ -1874,8 +1739,8 @@ Returns:
       HMainEditor.BufferImage->Modified,\r
       HMainEditor.ScreenSize.Column,\r
       HMainEditor.ScreenSize.Row,\r
       HMainEditor.BufferImage->Modified,\r
       HMainEditor.ScreenSize.Column,\r
       HMainEditor.ScreenSize.Row,\r
-      HMainEditor.BufferImage->BufferType == FileTypeDiskBuffer?HMainEditor.BufferImage->DiskImage->Offset:HMainEditor.BufferImage->BufferType == FileTypeMemBuffer?HMainEditor.BufferImage->MemImage->Offset:0,\r
-      HMainEditor.BufferImage->BufferType == FileTypeDiskBuffer?HMainEditor.BufferImage->DiskImage->Size  :HMainEditor.BufferImage->BufferType == FileTypeMemBuffer?HMainEditor.BufferImage->MemImage->Size  :0\r
+      HMainEditor.BufferImage->BufferType == FileTypeDiskBuffer&&HMainEditor.BufferImage->DiskImage!=NULL?HMainEditor.BufferImage->DiskImage->Offset:HMainEditor.BufferImage->BufferType == FileTypeMemBuffer&&HMainEditor.BufferImage->MemImage!=NULL?HMainEditor.BufferImage->MemImage->Offset:0,\r
+      HMainEditor.BufferImage->BufferType == FileTypeDiskBuffer&&HMainEditor.BufferImage->DiskImage!=NULL?HMainEditor.BufferImage->DiskImage->Size  :HMainEditor.BufferImage->BufferType == FileTypeMemBuffer&&HMainEditor.BufferImage->MemImage!=NULL?HMainEditor.BufferImage->MemImage->Size  :0\r
       );\r
     HBufferImageRefresh ();\r
   }\r
       );\r
     HBufferImageRefresh ();\r
   }\r
@@ -1910,7 +1775,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
+/**\r
+  Handle the mouse input.\r
+\r
+  @param[in] MouseState             The current mouse state.\r
+  @param[out] BeforeLeftButtonDown  helps with selections.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+  @retval EFI_NOT_FOUND           The disk was not found.\r
+**/\r
 EFI_STATUS\r
 HMainEditorHandleMouseInput (\r
   IN  EFI_SIMPLE_POINTER_STATE       MouseState,\r
 EFI_STATUS\r
 HMainEditorHandleMouseInput (\r
   IN  EFI_SIMPLE_POINTER_STATE       MouseState,\r
@@ -2046,7 +1921,7 @@ HMainEditorHandleMouseInput (
     //\r
     // release LButton\r
     //\r
     //\r
     // release LButton\r
     //\r
-    if (*BeforeLeftButtonDown == TRUE) {\r
+    if (*BeforeLeftButtonDown) {\r
       Action = TRUE;\r
     }\r
     //\r
       Action = TRUE;\r
     }\r
     //\r
@@ -2062,27 +1937,17 @@ HMainEditorHandleMouseInput (
   return EFI_NOT_FOUND;\r
 }\r
 \r
   return EFI_NOT_FOUND;\r
 }\r
 \r
+/**\r
+  Handle user key input. will route it to other components handle function.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainEditorKeyInput (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMainEditorKeyInput (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Handle user key input. will route it to other components handle function\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-  EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
   EFI_INPUT_KEY             Key;\r
   EFI_STATUS                Status;\r
 {\r
   EFI_INPUT_KEY             Key;\r
   EFI_STATUS                Status;\r
@@ -2142,11 +2007,11 @@ Returns:
         Status            = HMainEditorHandleMouseInput (MouseState, &MouseIsDown);\r
 \r
         if (!EFI_ERROR (Status)) {\r
         Status            = HMainEditorHandleMouseInput (MouseState, &MouseIsDown);\r
 \r
         if (!EFI_ERROR (Status)) {\r
-          if (BeforeMouseIsDown == FALSE) {\r
+          if (!BeforeMouseIsDown) {\r
             //\r
             // mouse down\r
             //\r
             //\r
             // mouse down\r
             //\r
-            if (MouseIsDown == TRUE) {\r
+            if (MouseIsDown) {\r
               FRow              = HBufferImage.BufferPosition.Row;\r
               FCol              = HBufferImage.BufferPosition.Column;\r
               SelectStartBackup = HMainEditor.SelectStart;\r
               FRow              = HBufferImage.BufferPosition.Row;\r
               FCol              = HBufferImage.BufferPosition.Column;\r
               SelectStartBackup = HMainEditor.SelectStart;\r
@@ -2162,8 +2027,8 @@ Returns:
             //\r
             // begin to drag\r
             //\r
             //\r
             // begin to drag\r
             //\r
-            if (MouseIsDown == TRUE) {\r
-              if (FirstDown == TRUE) {\r
+            if (MouseIsDown) {\r
+              if (FirstDown) {\r
                 if (MouseState.RelativeMovementX || MouseState.RelativeMovementY) {\r
                   HMainEditor.SelectStart = 0;\r
                   HMainEditor.SelectEnd   = 0;\r
                 if (MouseState.RelativeMovementX || MouseState.RelativeMovementY) {\r
                   HMainEditor.SelectStart = 0;\r
                   HMainEditor.SelectEnd   = 0;\r
@@ -2301,7 +2166,7 @@ Returns:
           break;\r
         }\r
 \r
           break;\r
         }\r
 \r
-        if (LengthChange == FALSE) {\r
+        if (!LengthChange) {\r
           if (OldSize != Size) {\r
             StatusBarSetStatusString (L"Disk/Mem Buffer Length should not be changed");\r
           }\r
           if (OldSize != Size) {\r
             StatusBarSetStatusString (L"Disk/Mem Buffer Length should not be changed");\r
           }\r
index c4f2ea6382602754cf1a3043657847d8f0ec0034..ad9a7b4be8f8cd4be1092ff1f25b3cab006ec5db 100644 (file)
 \r
 #include "HexEditor.h"\r
 \r
 \r
 #include "HexEditor.h"\r
 \r
+/**\r
+  Init function for MainEditor\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainEditorInit (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HMainEditorInit (\r
   VOID\r
   );\r
+\r
+/**\r
+  Cleanup function for MainEditor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainEditorCleanup (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HMainEditorCleanup (\r
   VOID\r
   );\r
+\r
+/**\r
+  Refresh function for MainEditor.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HMainEditorRefresh (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HMainEditorRefresh (\r
   VOID\r
   );\r
+\r
+/**\r
+  Handle user key input. will route it to other components handle function.\r
+\r
+  @retval EFI_SUCCESS             The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES    A memory allocation occured.\r
+  @retval EFI_LOAD_ERROR          A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMainEditorKeyInput (\r
   VOID\r
 EFI_STATUS\r
 HMainEditorKeyInput (\r
   VOID\r
@@ -45,4 +72,5 @@ EFIAPI
 HMainEditorBackup (\r
   VOID\r
   );\r
 HMainEditorBackup (\r
   VOID\r
   );\r
+\r
 #endif\r
 #endif\r
index 73464906b421daf2d009dda3e3bd835b0a0cc7e8..a593d0afecda19f6feacc590da5792f0b82192d0 100644 (file)
@@ -38,6 +38,17 @@ HEFI_EDITOR_MEM_IMAGE             HMemImageConst = {
   0\r
 };\r
 \r
   0\r
 };\r
 \r
+/**\r
+  Empty function.  always returns the same.\r
+\r
+  @param[in] This       Ignored.\r
+  @param[in] Width      Ignored.\r
+  @param[in] Address    Ignored.\r
+  @param[in] Count      Ignored.\r
+  @param[in,out] Buffer Ignored.\r
+\r
+  @retval EFI_UNSUPPORTED.\r
+**/\r
 EFI_STATUS\r
 DummyMemRead (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL              * This,\r
 EFI_STATUS\r
 DummyMemRead (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL              * This,\r
@@ -45,8 +56,22 @@ DummyMemRead (
   IN     UINT64                                   Address,\r
   IN     UINTN                                    Count,\r
   IN OUT VOID                                     *Buffer\r
   IN     UINT64                                   Address,\r
   IN     UINTN                                    Count,\r
   IN OUT VOID                                     *Buffer\r
-  );\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+/**\r
+  Empty function.  always returns the same.\r
+\r
+  @param[in] This       Ignored.\r
+  @param[in] Width      Ignored.\r
+  @param[in] Address    Ignored.\r
+  @param[in] Count      Ignored.\r
+  @param[in,out] Buffer Ignored.\r
 \r
 \r
+  @retval EFI_UNSUPPORTED.\r
+**/\r
 EFI_STATUS\r
 DummyMemWrite (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL              * This,\r
 EFI_STATUS\r
 DummyMemWrite (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL              * This,\r
@@ -54,28 +79,21 @@ DummyMemWrite (
   IN     UINT64                                   Address,\r
   IN     UINTN                                    Count,\r
   IN OUT VOID                                     *Buffer\r
   IN     UINT64                                   Address,\r
   IN     UINTN                                    Count,\r
   IN OUT VOID                                     *Buffer\r
-  );\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+/**\r
+  Initialization function for HDiskImage.\r
 \r
 \r
+  @retval EFI_SUCCESS       The operation was successful.\r
+  @retval EFI_LOAD_ERROR    A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMemImageInit (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMemImageInit (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Initialization function for HDiskImage\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
 \r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -107,28 +125,16 @@ Returns:
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Backup function for HDiskImage. Only a few fields need to be backup. \r
+  This is for making the Disk buffer refresh as few as possible.\r
+\r
+  @retval EFI_SUCCESS       The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HMemImageBackup (\r
   VOID\r
   )\r
 EFI_STATUS\r
 HMemImageBackup (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Backup function for HDiskImage\r
-  Only a few fields need to be backup. \r
-  This is for making the Disk buffer refresh \r
-  as few as possible.\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
 {\r
   HMemImageBackupVar.Offset = HMemImage.Offset;\r
   HMemImageBackupVar.Size   = HMemImage.Size;\r
 {\r
   HMemImageBackupVar.Offset = HMemImage.Offset;\r
   HMemImageBackupVar.Size   = HMemImage.Size;\r
@@ -136,51 +142,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-HMemImageCleanup (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description: \r
+/**\r
+  Set FileName field in HFileImage.\r
 \r
 \r
-  Cleanup function for HDiskImage\r
-\r
-Arguments:  \r
-\r
-  None\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
-{\r
-  return EFI_SUCCESS;\r
-}\r
+  @param[in] Offset   The offset.\r
+  @param[in] Size     The size.\r
 \r
 \r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HMemImageSetMemOffsetSize (\r
   IN UINTN Offset,\r
   IN UINTN Size\r
   )\r
 EFI_STATUS\r
 HMemImageSetMemOffsetSize (\r
   IN UINTN Offset,\r
   IN UINTN Size\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Set FileName field in HFileImage\r
-\r
-Arguments:  \r
-\r
-  Offset - The offset\r
-  Size   - The size\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
 \r
   HMemImage.Offset  = Offset;\r
 {\r
 \r
   HMemImage.Offset  = Offset;\r
@@ -189,31 +164,23 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Read a disk from disk into HBufferImage.\r
+\r
+  @param[in] Offset   The offset.\r
+  @param[in] Size     The size.\r
+  @param[in] Recover  if is for recover, no information print.\r
+\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HMemImageRead (\r
 EFI_STATUS\r
 HMemImageRead (\r
-  IN UINTN  Offset,\r
-  IN UINTN  Size,\r
-  BOOLEAN   Recover\r
+  IN UINTN     Offset,\r
+  IN UINTN     Size,\r
+  IN BOOLEAN   Recover\r
   )\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Read a disk from disk into HBufferImage\r
-\r
-Arguments:  \r
-\r
-  Offset  - The offset\r
-  Size    - The size\r
-  Recover - if is for recover, no information print\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-  EFI_OUT_OF_RESOURCES\r
-  \r
---*/\r
 {\r
 \r
   EFI_STATUS                      Status;\r
 {\r
 \r
   EFI_STATUS                      Status;\r
@@ -312,29 +279,21 @@ Returns:
 \r
 }\r
 \r
 \r
 }\r
 \r
+/**\r
+  Save lines in HBufferImage to disk.\r
+\r
+  @param[in] Offset   The offset.\r
+  @param[in] Size     The size.\r
+\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HMemImageSave (\r
   IN UINTN Offset,\r
   IN UINTN Size\r
   )\r
 EFI_STATUS\r
 HMemImageSave (\r
   IN UINTN Offset,\r
   IN UINTN Size\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Save lines in HBufferImage to disk\r
-\r
-Arguments:  \r
-\r
-  Offset - The offset\r
-  Size   - The size\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-  EFI_LOAD_ERROR\r
-  EFI_OUT_OF_RESOURCES\r
-\r
---*/\r
 {\r
 \r
   EFI_STATUS                      Status;\r
 {\r
 \r
   EFI_STATUS                      Status;\r
@@ -387,26 +346,4 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-DummyMemRead (\r
-  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL              * This,\r
-  IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH    Width,\r
-  IN     UINT64                                   Address,\r
-  IN     UINTN                                    Count,\r
-  IN OUT VOID                                     *Buffer\r
-  )\r
-{\r
-  return EFI_UNSUPPORTED;\r
-}\r
 \r
 \r
-EFI_STATUS\r
-DummyMemWrite (\r
-  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL              * This,\r
-  IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH    Width,\r
-  IN     UINT64                                   Address,\r
-  IN     UINTN                                    Count,\r
-  IN OUT VOID                                     *Buffer\r
-  )\r
-{\r
-  return EFI_UNSUPPORTED;\r
-}\r
index 8805c0d75d3d0c27255dc98bd124fcc16c14191a..54fe517858d96710d0ab657f014666e5d79f4c23 100644 (file)
 \r
 #include "HexEditor.h"\r
 \r
 \r
 #include "HexEditor.h"\r
 \r
+/**\r
+  Initialization function for HDiskImage.\r
+\r
+  @retval EFI_SUCCESS       The operation was successful.\r
+  @retval EFI_LOAD_ERROR    A load error occured.\r
+**/\r
 EFI_STATUS\r
 HMemImageInit (\r
   VOID\r
   );\r
 EFI_STATUS\r
 HMemImageInit (\r
   VOID\r
   );\r
-EFI_STATUS\r
-HMemImageCleanup (\r
-  VOID\r
-  );\r
+\r
+/**\r
+  Backup function for HDiskImage. Only a few fields need to be backup. \r
+  This is for making the Disk buffer refresh as few as possible.\r
+\r
+  @retval EFI_SUCCESS       The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HMemImageBackup (\r
   VOID\r
   );\r
 \r
 EFI_STATUS\r
 HMemImageBackup (\r
   VOID\r
   );\r
 \r
+/**\r
+  Set FileName field in HFileImage.\r
+\r
+  @param[in] Offset   The offset.\r
+  @param[in] Size     The size.\r
+\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HMemImageSetMemOffsetSize (\r
 EFI_STATUS\r
 HMemImageSetMemOffsetSize (\r
-  IN UINTN,\r
-  IN UINTN\r
+  IN UINTN Offset,\r
+  IN UINTN Size\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Read a disk from disk into HBufferImage.\r
+\r
+  @param[in] Offset   The offset.\r
+  @param[in] Size     The size.\r
+  @param[in] Recover  if is for recover, no information print.\r
+\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HMemImageRead (\r
 EFI_STATUS\r
 HMemImageRead (\r
-  IN UINTN,\r
-  IN UINTN,\r
-  IN BOOLEAN\r
+  IN UINTN     Offset,\r
+  IN UINTN     Size,\r
+  IN BOOLEAN   Recover\r
   );\r
   );\r
+\r
+/**\r
+  Save lines in HBufferImage to disk.\r
+\r
+  @param[in] Offset   The offset.\r
+  @param[in] Size     The size.\r
+\r
+  @retval EFI_LOAD_ERROR        A load error occured.\r
+  @retval EFI_SUCCESS           The operation was successful.\r
+  @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
+**/\r
 EFI_STATUS\r
 HMemImageSave (\r
 EFI_STATUS\r
 HMemImageSave (\r
-  IN UINTN,\r
-  IN UINTN\r
+  IN UINTN Offset,\r
+  IN UINTN Size\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index da11789625635ff730d806e0eb17d25480dd7564..d6961c5bb71949e43fb170dfdbb29f6165b8f398 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of various string and line routines\r
   \r
 /** @file\r
   Implementation of various string and line routines\r
   \r
-  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (TempVarC) 2005 - 2011, Intel Corporation. All rights reserved. <BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   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
 \r
 extern BOOLEAN  HEditorMouseAction;\r
 \r
 \r
 extern BOOLEAN  HEditorMouseAction;\r
 \r
-VOID\r
-HEditorClearLine (\r
-  IN UINTN Row\r
-  )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Clear line at Row\r
-\r
-Arguments:  \r
-\r
-  Row -- row number to be cleared ( start from 1 )\r
-\r
-Returns:  \r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
-{\r
-  CHAR16  Line[200];\r
-  UINTN   Index;\r
-  UINTN   Limit;\r
-  UINTN   StartCol;\r
-\r
-  if (HEditorMouseAction) {\r
-    Limit     = 3 * 0x10;\r
-    StartCol  = 10;\r
-  } else {\r
-    Limit     = HMainEditor.ScreenSize.Column;\r
-    StartCol  = 1;\r
-  }\r
-  //\r
-  // prepare a blank line\r
-  //\r
-  for (Index = 0; Index < Limit; Index++) {\r
-    Line[Index] = ' ';\r
-  }\r
-\r
-  if (Row == HMainEditor.ScreenSize.Row && Limit == HMainEditor.ScreenSize.Column) {\r
-    //\r
-    // if '\0' is still at position 80, it will cause first line error\r
-    //\r
-    Line[Limit - 1] = '\0';\r
-  } else {\r
-    Line[Limit] = '\0';\r
-  }\r
-  //\r
-  // print out the blank line\r
-  //\r
-  ShellPrintEx ((INT32)StartCol - 1, (INT32)Row - 1, Line);\r
-}\r
-\r
-HEFI_EDITOR_LINE *\r
-HLineDup (\r
-  IN  HEFI_EDITOR_LINE *Src\r
-  )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Duplicate a line\r
-\r
-Arguments:  \r
-\r
-  Src -- line to be duplicated\r
-\r
-Returns:  \r
-\r
-  NULL -- wrong\r
-  Not NULL -- line created\r
-\r
---*/\r
-{\r
-  HEFI_EDITOR_LINE  *Dest;\r
-\r
-  //\r
-  // allocate for the line structure\r
-  //\r
-  Dest = AllocateZeroPool (sizeof (HEFI_EDITOR_LINE));\r
-  if (Dest == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  Dest->Signature = EFI_EDITOR_LINE_LIST;\r
-  Dest->Size      = Src->Size;\r
-\r
-  CopyMem (Dest->Buffer, Src->Buffer, 0x10);\r
-\r
-  Dest->Link = Src->Link;\r
-\r
-  return Dest;\r
-}\r
-\r
+/**\r
+  Free a line and it's internal buffer.\r
+  \r
+  @param[in] Src    The line to be freed.\r
+**/\r
 VOID\r
 HLineFree (\r
   IN  HEFI_EDITOR_LINE *Src\r
   )\r
 VOID\r
 HLineFree (\r
   IN  HEFI_EDITOR_LINE *Src\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Free a line and it's internal buffer\r
-\r
-Arguments:  \r
-\r
-  Src -- line to be freed\r
-\r
-Returns:  \r
-\r
-  None\r
-\r
---*/\r
 {\r
   if (Src == NULL) {\r
     return ;\r
 {\r
   if (Src == NULL) {\r
     return ;\r
@@ -138,26 +34,18 @@ Returns:
 \r
 }\r
 \r
 \r
 }\r
 \r
+/**\r
+  Advance to the next Count lines.\r
+\r
+  @param[in] Count      The line number to advance.\r
+\r
+  @retval NULL An error occured.\r
+  @return A pointer to the line after advance.\r
+**/\r
 HEFI_EDITOR_LINE *\r
 HEFI_EDITOR_LINE *\r
-_HLineAdvance (\r
+HLineAdvance (\r
   IN  UINTN Count\r
   )\r
   IN  UINTN Count\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Advance to the next Count lines\r
-\r
-Arguments:  \r
-\r
-  Count -- line number to advance\r
-\r
-Returns:  \r
-\r
-  NULL -- wrong\r
-  Not NULL -- line after advance\r
-\r
---*/\r
 {\r
   UINTN             Index;\r
   HEFI_EDITOR_LINE  *Line;\r
 {\r
   UINTN             Index;\r
   HEFI_EDITOR_LINE  *Line;\r
@@ -181,26 +69,18 @@ Returns:
   return Line;\r
 }\r
 \r
   return Line;\r
 }\r
 \r
+/**\r
+  Retreat to the previous Count lines.\r
+\r
+  @param[in] Count    The line number to retreat.\r
+\r
+  @retval NULL An error occured.\r
+  @return A pointer to the line after retreat.\r
+**/\r
 HEFI_EDITOR_LINE *\r
 HEFI_EDITOR_LINE *\r
-_HLineRetreat (\r
+HLineRetreat (\r
   IN  UINTN Count\r
   )\r
   IN  UINTN Count\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Retreat to the previous Count lines\r
-\r
-Arguments:  \r
-\r
-  Count -- line number to retreat\r
-\r
-Returns:  \r
-\r
-  NULL -- wrong\r
-  Not NULL -- line after retreat\r
-\r
---*/\r
 {\r
   UINTN             Index;\r
   HEFI_EDITOR_LINE  *Line;\r
 {\r
   UINTN             Index;\r
   HEFI_EDITOR_LINE  *Line;\r
@@ -224,28 +104,20 @@ Returns:
   return Line;\r
 }\r
 \r
   return Line;\r
 }\r
 \r
+/**\r
+  Advance/Retreat lines.\r
+\r
+  @param[in] Count      The line number to advance/retreat.\r
+                            >0 : advance\r
+                            <0: retreat  \r
+\r
+  @retval NULL An error occured.\r
+  @return A pointer to the line after move.\r
+**/\r
 HEFI_EDITOR_LINE *\r
 HMoveLine (\r
   IN  INTN Count\r
   )\r
 HEFI_EDITOR_LINE *\r
 HMoveLine (\r
   IN  INTN Count\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Advance/Retreat lines\r
-\r
-Arguments:  \r
-\r
-  Count -- line number to advance/retreat\r
-    >0 : advance\r
-    <0: retreat  \r
-\r
-Returns:  \r
-\r
-  NULL -- wrong\r
-  Not NULL -- line after advance\r
-\r
---*/\r
 {\r
   HEFI_EDITOR_LINE  *Line;\r
   UINTN             AbsCount;\r
 {\r
   HEFI_EDITOR_LINE  *Line;\r
   UINTN             AbsCount;\r
@@ -257,37 +129,28 @@ Returns:
   //\r
   if (Count <= 0) {\r
     AbsCount  = (UINTN)ABS(Count);\r
   //\r
   if (Count <= 0) {\r
     AbsCount  = (UINTN)ABS(Count);\r
-    Line      = _HLineRetreat (AbsCount);\r
+    Line      = HLineRetreat (AbsCount);\r
   } else {\r
   } else {\r
-    Line = _HLineAdvance ((UINTN)Count);\r
+    Line = HLineAdvance ((UINTN)Count);\r
   }\r
 \r
   return Line;\r
 }\r
 \r
   }\r
 \r
   return Line;\r
 }\r
 \r
+/**\r
+  Advance/Retreat lines and set CurrentLine in BufferImage to it.\r
+\r
+  @param[in] Count    The line number to advance/retreat.\r
+                          >0 : advance\r
+                          <0: retreat\r
+\r
+  @retval NULL An error occured.\r
+  @return A pointer to the line after move.\r
+**/\r
 HEFI_EDITOR_LINE *\r
 HMoveCurrentLine (\r
   IN  INTN Count\r
   )\r
 HEFI_EDITOR_LINE *\r
 HMoveCurrentLine (\r
   IN  INTN Count\r
   )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Advance/Retreat lines and set CurrentLine in BufferImage to it\r
-\r
-Arguments:  \r
-\r
-  Count -- line number to advance/retreat\r
-    >0 : advance\r
-    <0: retreat\r
-\r
-Returns:  \r
-\r
-  NULL -- wrong\r
-  Not NULL -- line after advance\r
-\r
-\r
---*/\r
 {\r
   HEFI_EDITOR_LINE  *Line;\r
   UINTN             AbsCount;\r
 {\r
   HEFI_EDITOR_LINE  *Line;\r
   UINTN             AbsCount;\r
@@ -298,9 +161,9 @@ Returns:
   //\r
   if (Count <= 0) {\r
     AbsCount  = (UINTN)ABS(Count);\r
   //\r
   if (Count <= 0) {\r
     AbsCount  = (UINTN)ABS(Count);\r
-    Line      = _HLineRetreat (AbsCount);\r
+    Line      = HLineRetreat (AbsCount);\r
   } else {\r
   } else {\r
-    Line = _HLineAdvance ((UINTN)Count);\r
+    Line = HLineAdvance ((UINTN)Count);\r
   }\r
 \r
   if (Line == NULL) {\r
   }\r
 \r
   if (Line == NULL) {\r
@@ -313,34 +176,26 @@ Returns:
 }\r
 \r
 \r
 }\r
 \r
 \r
-EFI_STATUS\r
-HFreeLines (\r
-  IN LIST_ENTRY   *ListHead,\r
-  IN HEFI_EDITOR_LINE *Lines\r
-  )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Free all the lines in HBufferImage\r
+/**\r
+  Free all the lines in HBufferImage.\r
     Fields affected:\r
     Lines\r
     CurrentLine\r
     NumLines\r
     ListHead \r
 \r
     Fields affected:\r
     Lines\r
     CurrentLine\r
     NumLines\r
     ListHead \r
 \r
-Arguments:  \r
-\r
-  ListHead - The list head\r
-  Lines - The lines\r
-\r
-Returns:  \r
+  @param[in] ListHead     The list head.\r
+  @param[in] Lines        The lines.\r
 \r
 \r
-  EFI_SUCCESS\r
-\r
---*/\r
+  @retval EFI_SUCCESS     The operation was successful.\r
+**/\r
+EFI_STATUS\r
+HFreeLines (\r
+  IN LIST_ENTRY   *ListHead,\r
+  IN HEFI_EDITOR_LINE *Lines\r
+  )\r
 {\r
 {\r
-  LIST_ENTRY    *Link;\r
+  LIST_ENTRY        *Link;\r
   HEFI_EDITOR_LINE  *Line;\r
 \r
   //\r
   HEFI_EDITOR_LINE  *Line;\r
 \r
   //\r
@@ -363,83 +218,13 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-UINTN\r
-HStrStr (\r
-  IN  CHAR16  *Str,\r
-  IN  CHAR16  *Pat\r
-  )\r
-/*++\r
-\r
-Routine Description: \r
-\r
-  Search Pat in Str\r
-\r
-Arguments:  \r
-\r
-  Str -- mother string\r
-  Pat -- search pattern\r
-\r
-\r
-Returns:  \r
-\r
-  0 : not found\r
-  >= 1 : found position + 1\r
-\r
---*/\r
-{\r
-  INTN  *Failure;\r
-  INTN  i;\r
-  INTN  j;\r
-  INTN  Lenp;\r
-  INTN  Lens;\r
-\r
-  //\r
-  // this function copies from some lib\r
-  //\r
-  Lenp        = StrLen (Pat);\r
-  Lens        = StrLen (Str);\r
+/**\r
+  Get the X information for the mouse.\r
 \r
 \r
-  Failure     = AllocateZeroPool ((UINTN)(Lenp * sizeof (INTN)));\r
-  if (Failure == NULL) {\r
-    return 0;\r
-  }\r
-  Failure[0]  = -1;\r
-  for (j = 1; j < Lenp; j++) {\r
-    i = Failure[j - 1];\r
-    while ((Pat[j] != Pat[i + 1]) && (i >= 0)) {\r
-      i = Failure[i];\r
-    }\r
-\r
-    if (Pat[j] == Pat[i + 1]) {\r
-      Failure[j] = i + 1;\r
-    } else {\r
-      Failure[j] = -1;\r
-    }\r
-  }\r
-\r
-  i = 0;\r
-  j = 0;\r
-  while (i < Lens && j < Lenp) {\r
-    if (Str[i] == Pat[j]) {\r
-      i++;\r
-      j++;\r
-    } else if (j == 0) {\r
-      i++;\r
-    } else {\r
-      j = Failure[j - 1] + 1;\r
-    }\r
-  }\r
-\r
-  FreePool (Failure);\r
-\r
-  //\r
-  // 0: not found\r
-  // >=1 : found position + 1\r
-  //\r
-  return ((j == Lenp) ? (i - Lenp) : -1) + 1;\r
-\r
-}\r
+  @param[in] GuidX      The change.\r
 \r
 \r
+  @return the new information.\r
+**/\r
 INT32\r
 HGetTextX (\r
   IN INT32 GuidX\r
 INT32\r
 HGetTextX (\r
   IN INT32 GuidX\r
@@ -454,6 +239,13 @@ HGetTextX (
   return Gap;\r
 }\r
 \r
   return Gap;\r
 }\r
 \r
+/**\r
+  Get the Y information for the mouse.\r
+\r
+  @param[in] GuidY      The change.\r
+\r
+  @return the new information.\r
+**/\r
 INT32\r
 HGetTextY (\r
   IN INT32 GuidY\r
 INT32\r
 HGetTextY (\r
   IN INT32 GuidY\r
@@ -468,77 +260,3 @@ HGetTextY (
 \r
   return Gap;\r
 }\r
 \r
   return Gap;\r
 }\r
-\r
-EFI_STATUS\r
-HXtoi (\r
-  IN  CHAR16  *Str,\r
-  OUT UINTN   *Value\r
-  )\r
-/*++\r
-Routine Description:\r
-\r
-  convert hex string to uint\r
-  \r
-Arguments:\r
-\r
-  Str   - The string\r
-  Value - The value\r
-\r
-Returns:\r
-\r
-\r
---*/\r
-{\r
-  UINT64  u;\r
-  CHAR16  c;\r
-  UINTN   Size;\r
-\r
-  Size = sizeof (UINTN);\r
-\r
-  //\r
-  // skip leading white space\r
-  //\r
-  while (*Str && *Str == ' ') {\r
-    Str += 1;\r
-  }\r
-\r
-  if (StrLen (Str) > Size * 2) {\r
-    return EFI_LOAD_ERROR;\r
-  }\r
-  //\r
-  // convert hex digits\r
-  //\r
-  u = 0;\r
-  c = *Str;\r
-  while (c) {\r
-    c = *Str;\r
-    Str++;\r
-\r
-    if (c == 0) {\r
-      break;\r
-    }\r
-    //\r
-    // not valid char\r
-    //\r
-    if (!((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') || (c >= '0' && c <= '9') || (c == '\0'))) {\r
-      return EFI_LOAD_ERROR;\r
-    }\r
-\r
-    if (c >= 'a' && c <= 'f') {\r
-      c -= 'a' - 'A';\r
-    }\r
-\r
-    if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')) {\r
-      u = LShiftU64 (u, 4) + (c - (c >= 'A' ? 'A' - 10 : '0'));\r
-    } else {\r
-      //\r
-      // '\0'\r
-      //\r
-      break;\r
-    }\r
-  }\r
-\r
-  *Value = (UINTN) u;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
index a9b59ff514eab01e475596f48aed1329d9787f75..df947935b001f39569481600bdedad5dfd900243 100644 (file)
 \r
 #include "HexEditor.h"\r
 \r
 \r
 #include "HexEditor.h"\r
 \r
-VOID\r
-HEditorClearLine (\r
-  UINTN\r
-  );\r
-HEFI_EDITOR_LINE  *\r
-HLineDup (\r
-  HEFI_EDITOR_LINE *\r
-  );\r
-VOID\r
-HLineFree (\r
-  HEFI_EDITOR_LINE *\r
-  );\r
+/**\r
+  Advance/Retreat lines.\r
 \r
 \r
-HEFI_EDITOR_LINE  *\r
+  @param[in] Count      The line number to advance/retreat.\r
+                            >0 : advance\r
+                            <0: retreat  \r
+\r
+  @retval NULL An error occured.\r
+  @return A pointer to the line after move.\r
+**/\r
+HEFI_EDITOR_LINE *\r
 HMoveLine (\r
 HMoveLine (\r
-  INTN\r
-  );\r
-HEFI_EDITOR_LINE  *\r
-HMoveCurrentLine (\r
-  INTN\r
+  IN  INTN Count\r
   );\r
 \r
   );\r
 \r
-UINTN\r
-HLineStrInsert (\r
-  HEFI_EDITOR_LINE  *,\r
-  CHAR16,\r
-  UINTN,\r
-  UINTN\r
-  );\r
+/**\r
+  Advance/Retreat lines and set CurrentLine in BufferImage to it.\r
 \r
 \r
-VOID\r
-HLineCat (\r
-  HEFI_EDITOR_LINE *,\r
-  HEFI_EDITOR_LINE *\r
-  );\r
+  @param[in] Count    The line number to advance/retreat.\r
+                          >0 : advance\r
+                          <0: retreat\r
 \r
 \r
-VOID\r
-HLineDeleteAt (\r
-  HEFI_EDITOR_LINE  *,\r
-  UINTN\r
+  @retval NULL An error occured.\r
+  @return A pointer to the line after move.\r
+**/\r
+HEFI_EDITOR_LINE *\r
+HMoveCurrentLine (\r
+  IN  INTN Count\r
   );\r
 \r
   );\r
 \r
-UINTN\r
-HUnicodeToAscii (\r
-  CHAR16    *,\r
-  UINTN,\r
-  CHAR8     *\r
-  );\r
+/**\r
+  Free all the lines in HBufferImage.\r
+    Fields affected:\r
+    Lines\r
+    CurrentLine\r
+    NumLines\r
+    ListHead \r
 \r
 \r
-UINTN\r
-HStrStr (\r
-  CHAR16    *,\r
-  CHAR16    *\r
-  );\r
+  @param[in] ListHead     The list head.\r
+  @param[in] Lines        The lines.\r
 \r
 \r
+  @retval EFI_SUCCESS     The operation was successful.\r
+**/\r
 EFI_STATUS\r
 HFreeLines (\r
 EFI_STATUS\r
 HFreeLines (\r
-  LIST_ENTRY   *,\r
-  HEFI_EDITOR_LINE *\r
+  IN LIST_ENTRY   *ListHead,\r
+  IN HEFI_EDITOR_LINE *Lines\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Get the X information for the mouse.\r
+\r
+  @param[in] GuidX      The change.\r
+\r
+  @return the new information.\r
+**/\r
 INT32\r
 HGetTextX (\r
 INT32\r
 HGetTextX (\r
-  INT32\r
-  ) ;\r
+  IN INT32 GuidX\r
+  );\r
+\r
+/**\r
+  Get the Y information for the mouse.\r
+\r
+  @param[in] GuidY      The change.\r
+\r
+  @return the new information.\r
+**/\r
 INT32\r
 HGetTextY (\r
 INT32\r
 HGetTextY (\r
-  INT32\r
-  ) ;\r
-\r
-EFI_STATUS\r
-HXtoi (\r
-  CHAR16    *,\r
-  UINTN     *\r
+  IN INT32 GuidY\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index d3a33e207ccdec16c3b0dd7c37cfadf84ab8e2da..c6e4a32f6f3ba903a2665ac56795fcef12b4bb0a 100644 (file)
@@ -1258,90 +1258,26 @@ PCI_CLASS_ENTRY PCIPIFClass_0e00[] = {
   }\r
 };\r
 \r
   }\r
 };\r
 \r
-#define EFI_HEX_DISP_SIZE   32\r
-BOOLEAN\r
-PrivateDumpHex (\r
-  IN UINTN        Indent,\r
-  IN UINTN        Offset,\r
-  IN UINTN        DataSize,\r
-  IN VOID         *UserData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add page break feature to the DumpHex\r
-\r
-Arguments:\r
-  Indent           - The indent space\r
-\r
-  Offset           - The offset\r
-\r
-  DataSize         - The data size\r
-\r
-  UserData         - The data\r
-\r
-Returns:\r
-\r
-  TRUE             - The dump is broke\r
-  FALSE            - The dump is completed\r
-\r
-**/\r
-{\r
-  UINTN DispSize;\r
-  UINT8 *DispData;\r
-\r
-  DispSize  = EFI_HEX_DISP_SIZE;\r
-  DispData  = (UINT8 *) UserData;\r
-\r
-  while (DataSize!=0) {\r
-    if (ShellGetExecutionBreakFlag ()) {\r
-      return TRUE;\r
-    }\r
-\r
-    if (DataSize > EFI_HEX_DISP_SIZE) {\r
-      DataSize -= EFI_HEX_DISP_SIZE;\r
-    } else {\r
-      DispSize  = DataSize;\r
-      DataSize  = 0;\r
-    }\r
-\r
-    DumpHex (Indent, Offset + DispData - (UINT8 *) UserData, DispSize, DispData);\r
-    DispData += DispSize;\r
-  }\r
-\r
-  return FALSE;\r
-}\r
-\r
-//\r
-// Implemetations\r
-//\r
-VOID\r
-PciGetClassStrings (\r
-  IN      UINT32               ClassCode,\r
-  IN OUT  PCI_CLASS_STRINGS    *ClassStrings\r
-  )\r
-/*++\r
-Routine Description:\r
 \r
 \r
+/**\r
   Generates printable Unicode strings that represent PCI device class,\r
   subclass and programmed I/F based on a value passed to the function.\r
 \r
   Generates printable Unicode strings that represent PCI device class,\r
   subclass and programmed I/F based on a value passed to the function.\r
 \r
-Arguments:\r
-\r
-  ClassCode      Value representing the PCI "Class Code" register read from a\r
+  @param[in] ClassCode      Value representing the PCI "Class Code" register read from a\r
                  PCI device. The encodings are:\r
                      bits 23:16 - Base Class Code\r
                      bits 15:8  - Sub-Class Code\r
                      bits  7:0  - Programming Interface\r
                  PCI device. The encodings are:\r
                      bits 23:16 - Base Class Code\r
                      bits 15:8  - Sub-Class Code\r
                      bits  7:0  - Programming Interface\r
-  ClassStrings   Pointer of PCI_CLASS_STRINGS structure, which contains\r
+  @param[in,out] ClassStrings   Pointer of PCI_CLASS_STRINGS structure, which contains\r
                  printable class strings corresponding to ClassCode. The\r
                  caller must not modify the strings that are pointed by\r
                  the fields in ClassStrings.\r
                  printable class strings corresponding to ClassCode. The\r
                  caller must not modify the strings that are pointed by\r
                  the fields in ClassStrings.\r
-Returns:\r
-\r
-  None\r
 **/\r
 **/\r
+VOID\r
+PciGetClassStrings (\r
+  IN      UINT32               ClassCode,\r
+  IN OUT  PCI_CLASS_STRINGS    *ClassStrings\r
+  )\r
 {\r
   INTN            Index;\r
   UINT8           Code;\r
 {\r
   INTN            Index;\r
   UINT8           Code;\r
@@ -1437,25 +1373,18 @@ Returns:
   return ;\r
 }\r
 \r
   return ;\r
 }\r
 \r
+/**\r
+  Print strings that represent PCI device class, subclass and programmed I/F.\r
+\r
+  @param[in] ClassCodePtr   Points to the memory which stores register Class Code in PCI\r
+                 configuation space.\r
+  @param[in] IncludePIF     If the printed string should include the programming I/F part\r
+**/\r
 VOID\r
 PciPrintClassCode (\r
   IN      UINT8               *ClassCodePtr,\r
   IN      BOOLEAN             IncludePIF\r
   )\r
 VOID\r
 PciPrintClassCode (\r
   IN      UINT8               *ClassCodePtr,\r
   IN      BOOLEAN             IncludePIF\r
   )\r
-/*++\r
-Routine Description:\r
-\r
-  Print strings that represent PCI device class, subclass and programmed I/F\r
-\r
-Arguments:\r
-\r
-  ClassCodePtr   Points to the memory which stores register Class Code in PCI\r
-                 configuation space.\r
-  IncludePIF     If the printed string should include the programming I/F part\r
-Returns:\r
-\r
-  None\r
-**/\r
 {\r
   UINT32            ClassCode;\r
   PCI_CLASS_STRINGS ClassStrings;\r
 {\r
   UINT32            ClassCode;\r
   PCI_CLASS_STRINGS ClassStrings;\r
@@ -1498,12 +1427,22 @@ Returns:
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-EFI_STATUS\r
-PciDump (\r
-  IN EFI_HANDLE                             ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                       *SystemTable\r
-  );\r
+/**\r
+  This function finds out the protocol which is in charge of the given\r
+  segment, and its bus range covers the current bus number. It lookes\r
+  each instances of RootBridgeIoProtocol handle, until the one meets the\r
+  criteria is found.\r
+\r
+  @param[in] HandleBuf       Buffer which holds all PCI_ROOT_BRIDIGE_IO_PROTOCOL handles.\r
+  @param[in] HandleCount     Count of all PCI_ROOT_BRIDIGE_IO_PROTOCOL handles.\r
+  @param[in] Segment         Segment number of device we are dealing with.\r
+  @param[in] Bus             Bus number of device we are dealing with.\r
+  @param[out] IoDev          Handle used to access configuration space of PCI device.\r
+\r
+  @retval EFI_SUCCESS             The command completed successfully.\r
+  @retval EFI_INVALID_PARAMETER   Invalid parameter.\r
 \r
 \r
+**/\r
 EFI_STATUS\r
 PciFindProtocolInterface (\r
   IN  EFI_HANDLE                            *HandleBuf,\r
 EFI_STATUS\r
 PciFindProtocolInterface (\r
   IN  EFI_HANDLE                            *HandleBuf,\r
@@ -1513,6 +1452,16 @@ PciFindProtocolInterface (
   OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       **IoDev\r
   );\r
 \r
   OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       **IoDev\r
   );\r
 \r
+/**\r
+  This function gets the protocol interface from the given handle, and\r
+  obtains its address space descriptors.\r
+\r
+  @param[in] Handle          The PCI_ROOT_BRIDIGE_IO_PROTOCOL handle.\r
+  @param[out] IoDev          Handle used to access configuration space of PCI device.\r
+  @param[out] Descriptors    Points to the address space descriptors.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully\r
+**/\r
 EFI_STATUS\r
 PciGetProtocolAndResource (\r
   IN  EFI_HANDLE                            Handle,\r
 EFI_STATUS\r
 PciGetProtocolAndResource (\r
   IN  EFI_HANDLE                            Handle,\r
@@ -1520,6 +1469,19 @@ PciGetProtocolAndResource (
   OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR     **Descriptors\r
   );\r
 \r
   OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR     **Descriptors\r
   );\r
 \r
+/**\r
+  This function get the next bus range of given address space descriptors.\r
+  It also moves the pointer backward a node, to get prepared to be called\r
+  again.\r
+\r
+  @param[in,out] Descriptors Points to current position of a serial of address space\r
+                             descriptors.\r
+  @param[out] MinBus         The lower range of bus number.\r
+  @param[out] ManBus         The upper range of bus number.\r
+  @param[out] IsEnd          Meet end of the serial of descriptors.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciGetNextBusRange (\r
   IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR  **Descriptors,\r
 EFI_STATUS\r
 PciGetNextBusRange (\r
   IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR  **Descriptors,\r
@@ -1528,6 +1490,17 @@ PciGetNextBusRange (
   OUT    BOOLEAN                            *IsEnd\r
   );\r
 \r
   OUT    BOOLEAN                            *IsEnd\r
   );\r
 \r
+/**\r
+  Explain the data in PCI configuration space. The part which is common for\r
+  PCI device and bridge is interpreted in this function. It calls other\r
+  functions to interpret data unique for device or bridge.\r
+\r
+  @param[in] ConfigSpace     Data in PCI configuration space.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainData (\r
   IN PCI_CONFIG_SPACE                       *ConfigSpace,\r
 EFI_STATUS\r
 PciExplainData (\r
   IN PCI_CONFIG_SPACE                       *ConfigSpace,\r
@@ -1535,6 +1508,15 @@ PciExplainData (
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   );\r
 \r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   );\r
 \r
+/**\r
+  Explain the device specific part of data in PCI configuration space.\r
+\r
+  @param[in] Device          Data in PCI configuration space.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainDeviceData (\r
   IN PCI_DEVICE_HEADER                      *Device,\r
 EFI_STATUS\r
 PciExplainDeviceData (\r
   IN PCI_DEVICE_HEADER                      *Device,\r
@@ -1542,13 +1524,33 @@ PciExplainDeviceData (
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   );\r
 \r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   );\r
 \r
+/**\r
+  Explain the bridge specific part of data in PCI configuration space.\r
+\r
+  @param[in] Bridge          Bridge specific data region in PCI configuration space.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainBridgeData (\r
 EFI_STATUS\r
 PciExplainBridgeData (\r
-  IN PCI_BRIDGE_HEADER                      *Bridge,\r
-  IN UINT64                                 Address,\r
-  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
+  IN  PCI_BRIDGE_HEADER                     *Bridge,\r
+  IN  UINT64                                Address,\r
+  IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       *IoDev\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Explain the Base Address Register(Bar) in PCI configuration space.\r
+\r
+  @param[in] Bar             Points to the Base Address Register intended to interpret.\r
+  @param[in] Command         Points to the register Command.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+  @param[in,out] Index       The Index.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainBar (\r
   IN UINT32                                 *Bar,\r
 EFI_STATUS\r
 PciExplainBar (\r
   IN UINT32                                 *Bar,\r
@@ -1558,6 +1560,15 @@ PciExplainBar (
   IN OUT UINTN                              *Index\r
   );\r
 \r
   IN OUT UINTN                              *Index\r
   );\r
 \r
+/**\r
+  Explain the cardbus specific part of data in PCI configuration space.\r
+\r
+  @param[in] CardBus         CardBus specific region of PCI configuration space.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainCardBusData (\r
   IN PCI_CARDBUS_HEADER                     *CardBus,\r
 EFI_STATUS\r
 PciExplainCardBusData (\r
   IN PCI_CARDBUS_HEADER                     *CardBus,\r
@@ -1565,6 +1576,17 @@ PciExplainCardBusData (
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   );\r
 \r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   );\r
 \r
+/**\r
+  Explain each meaningful bit of register Status. The definition of Status is\r
+  slightly different depending on the PCI header type.\r
+\r
+  @param[in] Status          Points to the content of register Status.\r
+  @param[in] MainStatus      Indicates if this register is main status(not secondary\r
+                             status).\r
+  @param[in] HeaderType      Header type of this PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainStatus (\r
   IN UINT16                                 *Status,\r
 EFI_STATUS\r
 PciExplainStatus (\r
   IN UINT16                                 *Status,\r
@@ -1572,17 +1594,41 @@ PciExplainStatus (
   IN PCI_HEADER_TYPE                        HeaderType\r
   );\r
 \r
   IN PCI_HEADER_TYPE                        HeaderType\r
   );\r
 \r
+/**\r
+  Explain each meaningful bit of register Command.\r
+\r
+  @param[in] Command         Points to the content of register Command.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainCommand (\r
   IN UINT16                                 *Command\r
   );\r
 \r
 EFI_STATUS\r
 PciExplainCommand (\r
   IN UINT16                                 *Command\r
   );\r
 \r
+/**\r
+  Explain each meaningful bit of register Bridge Control.\r
+\r
+  @param[in] BridgeControl   Points to the content of register Bridge Control.\r
+  @param[in] HeaderType      The headertype.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainBridgeControl (\r
   IN UINT16                                 *BridgeControl,\r
   IN PCI_HEADER_TYPE                        HeaderType\r
   );\r
 \r
 EFI_STATUS\r
 PciExplainBridgeControl (\r
   IN UINT16                                 *BridgeControl,\r
   IN PCI_HEADER_TYPE                        HeaderType\r
   );\r
 \r
+/**\r
+  Print each capability structure.\r
+\r
+  @param[in] IoDev      The pointer to the deivce.\r
+  @param[in] Address    The address to start at.\r
+  @param[in] CapPtr     The offset from the address.\r
+\r
+  @retval EFI_SUCCESS     The operation was successful.\r
+**/\r
 EFI_STATUS\r
 PciExplainCapabilityStruct (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL         *IoDev,\r
 EFI_STATUS\r
 PciExplainCapabilityStruct (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL         *IoDev,\r
@@ -1590,6 +1636,13 @@ PciExplainCapabilityStruct (
   IN  UINT8                                   CapPtr\r
   );\r
 \r
   IN  UINT8                                   CapPtr\r
   );\r
 \r
+/**\r
+  Display Pcie device structure.\r
+\r
+  @param[in] IoDev          The pointer to the root pci protocol.\r
+  @param[in] Address        The Address to start at.\r
+  @param[in] CapabilityPtr  The offset from the address to start.\r
+**/\r
 EFI_STATUS\r
 PciExplainPciExpress (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL         *IoDev,\r
 EFI_STATUS\r
 PciExplainPciExpress (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL         *IoDev,\r
@@ -1597,70 +1650,161 @@ PciExplainPciExpress (
   IN  UINT8                                   CapabilityPtr\r
   );\r
 \r
   IN  UINT8                                   CapabilityPtr\r
   );\r
 \r
+/**\r
+  Print out information of the capability information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieCapReg (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieCapReg (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
+\r
+/**\r
+  Print out information of the device capability information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
 \r
 \r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieDeviceCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieDeviceCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
+\r
+/**\r
+  Print out information of the device control information.\r
 \r
 \r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieDeviceControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieDeviceControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
 \r
 \r
+/**\r
+  Print out information of the device status information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieDeviceStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieDeviceStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
+\r
+/**\r
+  Print out information of the device link information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
 \r
 \r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieLinkCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieLinkCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
+\r
+/**\r
+  Print out information of the device link control information.\r
 \r
 \r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieLinkControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieLinkControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
 \r
 \r
+/**\r
+  Print out information of the device link status information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieLinkStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieLinkStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
+\r
+/**\r
+  Print out information of the device slot information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
 \r
 \r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieSlotCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieSlotCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
+\r
+/**\r
+  Print out information of the device slot control information.\r
 \r
 \r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieSlotControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieSlotControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
 \r
 \r
+/**\r
+  Print out information of the device slot status information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieSlotStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieSlotStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
+\r
+/**\r
+  Print out information of the device root information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
 \r
 \r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieRootControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieRootControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
+\r
+/**\r
+  Print out information of the device root capability information.\r
 \r
 \r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieRootCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieRootCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
 \r
 \r
+/**\r
+  Print out information of the device root status information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieRootStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieRootStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-);\r
+  );\r
 \r
 typedef EFI_STATUS (*PCIE_EXPLAIN_FUNCTION) (IN PCIE_CAP_STURCTURE *PciExpressCap);\r
 \r
 \r
 typedef EFI_STATUS (*PCIE_EXPLAIN_FUNCTION) (IN PCIE_CAP_STURCTURE *PciExpressCap);\r
 \r
@@ -1871,6 +2015,12 @@ CHAR16 *IndicatorTable[] = {
 };\r
 \r
 \r
 };\r
 \r
 \r
+/**\r
+  Function for 'pci' command.\r
+\r
+  @param[in] ImageHandle  Handle to the Image (NULL if Internal).\r
+  @param[in] SystemTable  Pointer to the System Table (NULL if Internal).\r
+**/\r
 SHELL_STATUS\r
 EFIAPI\r
 ShellCommandRunPci (\r
 SHELL_STATUS\r
 EFIAPI\r
 ShellCommandRunPci (\r
@@ -2256,13 +2406,13 @@ ShellCommandRunPci (
     //\r
     SizeOfHeader = sizeof (ConfigSpace.Common) + sizeof (ConfigSpace.NonCommon);\r
 \r
     //\r
     SizeOfHeader = sizeof (ConfigSpace.Common) + sizeof (ConfigSpace.NonCommon);\r
 \r
-    PrivateDumpHex (2, 0, SizeOfHeader, &ConfigSpace);\r
+    DumpHex (2, 0, SizeOfHeader, &ConfigSpace);\r
     ShellPrintEx(-1,-1, L"\r\n");\r
 \r
     //\r
     // Dump device dependent Part of configuration space\r
     //\r
     ShellPrintEx(-1,-1, L"\r\n");\r
 \r
     //\r
     // Dump device dependent Part of configuration space\r
     //\r
-    PrivateDumpHex (\r
+    DumpHex (\r
       2,\r
       SizeOfHeader,\r
       sizeof (ConfigSpace) - SizeOfHeader,\r
       2,\r
       SizeOfHeader,\r
       sizeof (ConfigSpace) - SizeOfHeader,\r
@@ -2287,37 +2437,30 @@ Done:
   return ShellStatus;\r
 }\r
 \r
   return ShellStatus;\r
 }\r
 \r
-EFI_STATUS\r
-PciFindProtocolInterface (\r
-  IN  EFI_HANDLE                            *HandleBuf,\r
-  IN  UINTN                                 HandleCount,\r
-  IN  UINT16                                Segment,\r
-  IN  UINT16                                Bus,\r
-  OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       **IoDev\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   This function finds out the protocol which is in charge of the given\r
   segment, and its bus range covers the current bus number. It lookes\r
   each instances of RootBridgeIoProtocol handle, until the one meets the\r
   criteria is found.\r
 \r
   This function finds out the protocol which is in charge of the given\r
   segment, and its bus range covers the current bus number. It lookes\r
   each instances of RootBridgeIoProtocol handle, until the one meets the\r
   criteria is found.\r
 \r
-Arguments:\r
-\r
-  HandleBuf       Buffer which holds all PCI_ROOT_BRIDIGE_IO_PROTOCOL handles\r
-  HandleCount     Count of all PCI_ROOT_BRIDIGE_IO_PROTOCOL handles\r
-  Segment         Segment number of device we are dealing with\r
-  Bus             Bus number of device we are dealing with\r
-  IoDev           Handle used to access configuration space of PCI device\r
-\r
-Returns:\r
+  @param[in] HandleBuf       Buffer which holds all PCI_ROOT_BRIDIGE_IO_PROTOCOL handles.\r
+  @param[in] HandleCount     Count of all PCI_ROOT_BRIDIGE_IO_PROTOCOL handles.\r
+  @param[in] Segment         Segment number of device we are dealing with.\r
+  @param[in] Bus             Bus number of device we are dealing with.\r
+  @param[out] IoDev          Handle used to access configuration space of PCI device.\r
 \r
 \r
-  EFI_SUCCESS           - The command completed successfully\r
-  EFI_INVALID_PARAMETER - Invalid parameter\r
+  @retval EFI_SUCCESS             The command completed successfully.\r
+  @retval EFI_INVALID_PARAMETER   Invalid parameter.\r
 \r
 **/\r
 \r
 **/\r
+EFI_STATUS\r
+PciFindProtocolInterface (\r
+  IN  EFI_HANDLE                            *HandleBuf,\r
+  IN  UINTN                                 HandleCount,\r
+  IN  UINT16                                Segment,\r
+  IN  UINT16                                Bus,\r
+  OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       **IoDev\r
+  )\r
 {\r
   UINTN                             Index;\r
   EFI_STATUS                        Status;\r
 {\r
   UINTN                             Index;\r
   EFI_STATUS                        Status;\r
@@ -2372,30 +2515,22 @@ Returns:
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  This function gets the protocol interface from the given handle, and\r
+  obtains its address space descriptors.\r
+\r
+  @param[in] Handle          The PCI_ROOT_BRIDIGE_IO_PROTOCOL handle.\r
+  @param[out] IoDev          Handle used to access configuration space of PCI device.\r
+  @param[out] Descriptors    Points to the address space descriptors.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully\r
+**/\r
 EFI_STATUS\r
 PciGetProtocolAndResource (\r
   IN  EFI_HANDLE                            Handle,\r
   OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       **IoDev,\r
   OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR     **Descriptors\r
   )\r
 EFI_STATUS\r
 PciGetProtocolAndResource (\r
   IN  EFI_HANDLE                            Handle,\r
   OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       **IoDev,\r
   OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR     **Descriptors\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function gets the protocol interface from the given handle, and\r
-  obtains its address space descriptors.\r
-\r
-Arguments:\r
-\r
-  Handle          The PCI_ROOT_BRIDIGE_IO_PROTOCOL handle\r
-  IoDev           Handle used to access configuration space of PCI device\r
-  Descriptors     Points to the address space descriptors\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
-\r
-**/\r
 {\r
   EFI_STATUS  Status;\r
 \r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -2424,6 +2559,19 @@ Returns:
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  This function get the next bus range of given address space descriptors.\r
+  It also moves the pointer backward a node, to get prepared to be called\r
+  again.\r
+\r
+  @param[in,out] Descriptors Points to current position of a serial of address space\r
+                             descriptors.\r
+  @param[out] MinBus         The lower range of bus number.\r
+  @param[out] ManBus         The upper range of bus number.\r
+  @param[out] IsEnd          Meet end of the serial of descriptors.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciGetNextBusRange (\r
   IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR  **Descriptors,\r
 EFI_STATUS\r
 PciGetNextBusRange (\r
   IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR  **Descriptors,\r
@@ -2431,27 +2579,6 @@ PciGetNextBusRange (
   OUT    UINT16                             *MaxBus,\r
   OUT    BOOLEAN                            *IsEnd\r
   )\r
   OUT    UINT16                             *MaxBus,\r
   OUT    BOOLEAN                            *IsEnd\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function get the next bus range of given address space descriptors.\r
-  It also moves the pointer backward a node, to get prepared to be called\r
-  again.\r
-\r
-Arguments:\r
-\r
-  Descriptors     points to current position of a serial of address space\r
-                  descriptors\r
-  MinBus          The lower range of bus number\r
-  ManBus          The upper range of bus number\r
-  IsEnd           Meet end of the serial of descriptors\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
-\r
-**/\r
 {\r
   *IsEnd = FALSE;\r
 \r
 {\r
   *IsEnd = FALSE;\r
 \r
@@ -2489,31 +2616,23 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-PciExplainData (\r
-  IN PCI_CONFIG_SPACE                       *ConfigSpace,\r
-  IN UINT64                                 Address,\r
-  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   Explain the data in PCI configuration space. The part which is common for\r
   PCI device and bridge is interpreted in this function. It calls other\r
   functions to interpret data unique for device or bridge.\r
 \r
   Explain the data in PCI configuration space. The part which is common for\r
   PCI device and bridge is interpreted in this function. It calls other\r
   functions to interpret data unique for device or bridge.\r
 \r
-Arguments:\r
-\r
-  ConfigSpace     Data in PCI configuration space\r
-  Address         Address used to access configuration space of this PCI device\r
-  IoDev           Handle used to access configuration space of PCI device\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
+  @param[in] ConfigSpace     Data in PCI configuration space.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
 \r
 \r
+  @retval EFI_SUCCESS     The command completed successfully.\r
 **/\r
 **/\r
+EFI_STATUS\r
+PciExplainData (\r
+  IN PCI_CONFIG_SPACE                       *ConfigSpace,\r
+  IN UINT64                                 Address,\r
+  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
+  )\r
 {\r
   PCI_COMMON_HEADER *Common;\r
   PCI_HEADER_TYPE   HeaderType;\r
 {\r
   PCI_COMMON_HEADER *Common;\r
   PCI_HEADER_TYPE   HeaderType;\r
@@ -2556,9 +2675,9 @@ Returns:
   //\r
   // Print register BIST\r
   //\r
   //\r
   // Print register BIST\r
   //\r
-  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_LINE_BIST), gShellDebug1HiiHandle, INDEX_OF (&(Common->BIST)));\r
-  if ((Common->BIST & PCI_BIT_7) != 0) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_LINE_CAP), gShellDebug1HiiHandle, 0x0f & Common->BIST);\r
+  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_LINE_BIST), gShellDebug1HiiHandle, INDEX_OF (&(Common->Bist)));\r
+  if ((Common->Bist & PCI_BIT_7) != 0) {\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_LINE_CAP), gShellDebug1HiiHandle, 0x0f & Common->Bist);\r
   } else {\r
     ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_LINE_CAP_NO), gShellDebug1HiiHandle);\r
   }\r
   } else {\r
     ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_LINE_CAP_NO), gShellDebug1HiiHandle);\r
   }\r
@@ -2673,29 +2792,21 @@ Returns:
   return Status;\r
 }\r
 \r
   return Status;\r
 }\r
 \r
+/**\r
+  Explain the device specific part of data in PCI configuration space.\r
+\r
+  @param[in] Device          Data in PCI configuration space.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainDeviceData (\r
   IN PCI_DEVICE_HEADER                      *Device,\r
   IN UINT64                                 Address,\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   )\r
 EFI_STATUS\r
 PciExplainDeviceData (\r
   IN PCI_DEVICE_HEADER                      *Device,\r
   IN UINT64                                 Address,\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Explain the device specific part of data in PCI configuration space.\r
-\r
-Arguments:\r
-\r
-  Device          Data in PCI configuration space\r
-  Address         Address used to access configuration space of this PCI device\r
-  IoDev           Handle used to access configuration space of PCI device\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
-\r
-**/\r
 {\r
   UINTN       Index;\r
   BOOLEAN     BarExist;\r
 {\r
   UINTN       Index;\r
   BOOLEAN     BarExist;\r
@@ -2830,29 +2941,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Explain the bridge specific part of data in PCI configuration space.\r
+\r
+  @param[in] Bridge          Bridge specific data region in PCI configuration space.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainBridgeData (\r
   IN  PCI_BRIDGE_HEADER                     *Bridge,\r
   IN  UINT64                                Address,\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       *IoDev\r
   )\r
 EFI_STATUS\r
 PciExplainBridgeData (\r
   IN  PCI_BRIDGE_HEADER                     *Bridge,\r
   IN  UINT64                                Address,\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL       *IoDev\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Explain the bridge specific part of data in PCI configuration space.\r
-\r
-Arguments:\r
-\r
-  Bridge          Bridge specific data region in PCI configuration space\r
-  Address         Address used to access configuration space of this PCI device\r
-  IoDev           Handle used to access configuration space of PCI device\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
-\r
-**/\r
 {\r
   UINTN       Index;\r
   BOOLEAN     BarExist;\r
 {\r
   UINTN       Index;\r
   BOOLEAN     BarExist;\r
@@ -3039,6 +3142,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Explain the Base Address Register(Bar) in PCI configuration space.\r
+\r
+  @param[in] Bar             Points to the Base Address Register intended to interpret.\r
+  @param[in] Command         Points to the register Command.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+  @param[in,out] Index       The Index.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainBar (\r
   IN UINT32                                 *Bar,\r
 EFI_STATUS\r
 PciExplainBar (\r
   IN UINT32                                 *Bar,\r
@@ -3047,25 +3161,6 @@ PciExplainBar (
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev,\r
   IN OUT UINTN                              *Index\r
   )\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev,\r
   IN OUT UINTN                              *Index\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Explain the Base Address Register(Bar) in PCI configuration space.\r
-\r
-Arguments:\r
-\r
-  Bar             Points to the Base Address Register intended to interpret\r
-  Command         Points to the register Command\r
-  Address         Address used to access configuration space of this PCI device\r
-  IoDev           Handle used to access configuration space of PCI device\r
-  Index           The Index\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
-\r
-**/\r
 {\r
   UINT16  OldCommand;\r
   UINT16  NewCommand;\r
 {\r
   UINT16  OldCommand;\r
   UINT16  NewCommand;\r
@@ -3220,29 +3315,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Explain the cardbus specific part of data in PCI configuration space.\r
+\r
+  @param[in] CardBus         CardBus specific region of PCI configuration space.\r
+  @param[in] Address         Address used to access configuration space of this PCI device.\r
+  @param[in] IoDev           Handle used to access configuration space of PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainCardBusData (\r
   IN PCI_CARDBUS_HEADER                     *CardBus,\r
   IN UINT64                                 Address,\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   )\r
 EFI_STATUS\r
 PciExplainCardBusData (\r
   IN PCI_CARDBUS_HEADER                     *CardBus,\r
   IN UINT64                                 Address,\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *IoDev\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Explain the cardbus specific part of data in PCI configuration space.\r
-\r
-Arguments:\r
-\r
-  CardBus         CardBus specific region of PCI configuration space\r
-  Address         Address used to access configuration space of this PCI device\r
-  IoDev           Handle used to access configuration space of PCI device\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
-\r
-**/\r
 {\r
   BOOLEAN           Io32Bit;\r
   PCI_CARDBUS_DATA  *CardBusData;\r
 {\r
   BOOLEAN           Io32Bit;\r
   PCI_CARDBUS_DATA  *CardBusData;\r
@@ -3374,31 +3461,23 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Explain each meaningful bit of register Status. The definition of Status is\r
+  slightly different depending on the PCI header type.\r
+\r
+  @param[in] Status          Points to the content of register Status.\r
+  @param[in] MainStatus      Indicates if this register is main status(not secondary\r
+                             status).\r
+  @param[in] HeaderType      Header type of this PCI device.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainStatus (\r
   IN UINT16                                 *Status,\r
   IN BOOLEAN                                MainStatus,\r
   IN PCI_HEADER_TYPE                        HeaderType\r
   )\r
 EFI_STATUS\r
 PciExplainStatus (\r
   IN UINT16                                 *Status,\r
   IN BOOLEAN                                MainStatus,\r
   IN PCI_HEADER_TYPE                        HeaderType\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Explain each meaningful bit of register Status. The definition of Status is\r
-  slightly different depending on the PCI header type.\r
-\r
-Arguments:\r
-\r
-  Status          Points to the content of register Status\r
-  MainStatus      Indicates if this register is main status(not secondary\r
-                  status)\r
-  HeaderType      Header type of this PCI device\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
-\r
-**/\r
 {\r
   if (MainStatus) {\r
     ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_STATUS), gShellDebug1HiiHandle, INDEX_OF (Status), *Status);\r
 {\r
   if (MainStatus) {\r
     ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_STATUS), gShellDebug1HiiHandle, INDEX_OF (Status), *Status);\r
@@ -3481,25 +3560,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-PciExplainCommand (\r
-  IN UINT16                                 *Command\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   Explain each meaningful bit of register Command.\r
 \r
   Explain each meaningful bit of register Command.\r
 \r
-Arguments:\r
-\r
-  Command         Points to the content of register Command\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
+  @param[in] Command         Points to the content of register Command.\r
 \r
 \r
+  @retval EFI_SUCCESS     The command completed successfully.\r
 **/\r
 **/\r
+EFI_STATUS\r
+PciExplainCommand (\r
+  IN UINT16                                 *Command\r
+  )\r
 {\r
   //\r
   // Print the binary value of register Command\r
 {\r
   //\r
   // Print the binary value of register Command\r
@@ -3572,27 +3643,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Explain each meaningful bit of register Bridge Control.\r
+\r
+  @param[in] BridgeControl   Points to the content of register Bridge Control.\r
+  @param[in] HeaderType      The headertype.\r
+\r
+  @retval EFI_SUCCESS     The command completed successfully.\r
+**/\r
 EFI_STATUS\r
 PciExplainBridgeControl (\r
   IN UINT16                                 *BridgeControl,\r
   IN PCI_HEADER_TYPE                        HeaderType\r
   )\r
 EFI_STATUS\r
 PciExplainBridgeControl (\r
   IN UINT16                                 *BridgeControl,\r
   IN PCI_HEADER_TYPE                        HeaderType\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Explain each meaningful bit of register Bridge Control.\r
-\r
-Arguments:\r
-\r
-  BridgeControl   Points to the content of register Bridge Control\r
-  HeaderType      The headertype\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS     The command completed successfully\r
-\r
-**/\r
 {\r
   ShellPrintHiiEx(-1, -1, NULL,\r
     STRING_TOKEN (STR_PCI2_BRIDGE_CONTROL),\r
 {\r
   ShellPrintHiiEx(-1, -1, NULL,\r
     STRING_TOKEN (STR_PCI2_BRIDGE_CONTROL),\r
@@ -3684,6 +3747,15 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print each capability structure.\r
+\r
+  @param[in] IoDev      The pointer to the deivce.\r
+  @param[in] Address    The address to start at.\r
+  @param[in] CapPtr     The offset from the address.\r
+\r
+  @retval EFI_SUCCESS     The operation was successful.\r
+**/\r
 EFI_STATUS\r
 PciExplainCapabilityStruct (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL         *IoDev,\r
 EFI_STATUS\r
 PciExplainCapabilityStruct (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL         *IoDev,\r
@@ -3723,10 +3795,17 @@ PciExplainCapabilityStruct (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the capability information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieCapReg (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieCapReg (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieCapReg;\r
   CHAR16 *DevicePortType;\r
 {\r
   UINT16 PcieCapReg;\r
   CHAR16 *DevicePortType;\r
@@ -3764,10 +3843,17 @@ ExplainPcieCapReg (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device capability information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieDeviceCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieDeviceCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieCapReg;\r
   UINT32 PcieDeviceCap;\r
 {\r
   UINT16 PcieCapReg;\r
   UINT32 PcieDeviceCap;\r
@@ -3796,8 +3882,8 @@ ExplainPcieDeviceCap (
   // Endpoint L0s and L1 Acceptable Latency is only valid for Endpoint\r
   //\r
   if (IS_PCIE_ENDPOINT (DevicePortType)) {\r
   // Endpoint L0s and L1 Acceptable Latency is only valid for Endpoint\r
   //\r
   if (IS_PCIE_ENDPOINT (DevicePortType)) {\r
-    L0sLatency = (UINT8) PCIE_CAP_L0sLatency (PcieDeviceCap);\r
-    L1Latency  = (UINT8) PCIE_CAP_L1Latency (PcieDeviceCap);\r
+    L0sLatency = (UINT8) PCIE_CAP_L0SLATENCY (PcieDeviceCap);\r
+    L1Latency  = (UINT8) PCIE_CAP_L1LATENCY (PcieDeviceCap);\r
     Print (L"  Endpoint L0s Acceptable Latency(8:6):     ");\r
     if (L0sLatency < 4) {\r
       Print (L"%EMaximum of %d ns%N\n", 1 << (L0sLatency + 6));\r
     Print (L"  Endpoint L0s Acceptable Latency(8:6):     ");\r
     if (L0sLatency < 4) {\r
       Print (L"%EMaximum of %d ns%N\n", 1 << (L0sLatency + 6));\r
@@ -3846,10 +3932,17 @@ ExplainPcieDeviceCap (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device control information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieDeviceControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieDeviceControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieCapReg;\r
   UINT16 PcieDeviceControl;\r
 {\r
   UINT16 PcieCapReg;\r
   UINT16 PcieDeviceControl;\r
@@ -3916,10 +4009,17 @@ ExplainPcieDeviceControl (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device status information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieDeviceStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieDeviceStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieDeviceStatus;\r
 \r
 {\r
   UINT16 PcieDeviceStatus;\r
 \r
@@ -3951,14 +4051,21 @@ ExplainPcieDeviceStatus (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device link information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieLinkCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieLinkCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT32 PcieLinkCap;\r
   CHAR16 *SupLinkSpeeds;\r
 {\r
   UINT32 PcieLinkCap;\r
   CHAR16 *SupLinkSpeeds;\r
-  CHAR16 *ASPM;\r
+  CHAR16 *AspmValue;\r
 \r
   PcieLinkCap = PciExpressCap->LinkCap;\r
   switch (PCIE_CAP_SUP_LINK_SPEEDS (PcieLinkCap)) {\r
 \r
   PcieLinkCap = PciExpressCap->LinkCap;\r
   switch (PCIE_CAP_SUP_LINK_SPEEDS (PcieLinkCap)) {\r
@@ -3982,26 +4089,26 @@ ExplainPcieLinkCap (
    );\r
   switch (PCIE_CAP_ASPM_SUPPORT (PcieLinkCap)) {\r
     case 1:\r
    );\r
   switch (PCIE_CAP_ASPM_SUPPORT (PcieLinkCap)) {\r
     case 1:\r
-      ASPM = L"L0s Entry";\r
+      AspmValue = L"L0s Entry";\r
       break;\r
     case 3:\r
       break;\r
     case 3:\r
-      ASPM = L"L0s and L1";\r
+      AspmValue = L"L0s and L1";\r
       break;\r
     default:\r
       break;\r
     default:\r
-      ASPM = L"Reserved";\r
+      AspmValue = L"Reserved";\r
       break;\r
   }\r
   Print (\r
     L"  Active State Power Management Support(11:10):       %E%s Supported%N\n",\r
       break;\r
   }\r
   Print (\r
     L"  Active State Power Management Support(11:10):       %E%s Supported%N\n",\r
-    ASPM\r
+    AspmValue\r
    );\r
   Print (\r
     L"  L0s Exit Latency(14:12):                            %E%s%N\n",\r
    );\r
   Print (\r
     L"  L0s Exit Latency(14:12):                            %E%s%N\n",\r
-    L0sLatencyStrTable[PCIE_CAP_L0s_LATENCY (PcieLinkCap)]\r
+    L0sLatencyStrTable[PCIE_CAP_L0S_LATENCY (PcieLinkCap)]\r
    );\r
   Print (\r
     L"  L1 Exit Latency(17:15):                             %E%s%N\n",\r
    );\r
   Print (\r
     L"  L1 Exit Latency(17:15):                             %E%s%N\n",\r
-    L1LatencyStrTable[PCIE_CAP_L0s_LATENCY (PcieLinkCap)]\r
+    L1LatencyStrTable[PCIE_CAP_L0S_LATENCY (PcieLinkCap)]\r
    );\r
   Print (\r
     L"  Clock Power Management(18):                         %E%d%N\n",\r
    );\r
   Print (\r
     L"  Clock Power Management(18):                         %E%d%N\n",\r
@@ -4026,10 +4133,17 @@ ExplainPcieLinkCap (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device link control information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieLinkControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieLinkControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieLinkControl;\r
   UINT8  DevicePortType;\r
 {\r
   UINT16 PcieLinkControl;\r
   UINT8  DevicePortType;\r
@@ -4090,10 +4204,17 @@ ExplainPcieLinkControl (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device link status information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieLinkStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieLinkStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieLinkStatus;\r
   CHAR16 *SupLinkSpeeds;\r
 {\r
   UINT16 PcieLinkStatus;\r
   CHAR16 *SupLinkSpeeds;\r
@@ -4141,10 +4262,17 @@ ExplainPcieLinkStatus (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device slot information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieSlotCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieSlotCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT32 PcieSlotCap;\r
 \r
 {\r
   UINT32 PcieSlotCap;\r
 \r
@@ -4202,10 +4330,17 @@ ExplainPcieSlotCap (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device slot control information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieSlotControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieSlotControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieSlotControl;\r
 \r
 {\r
   UINT16 PcieSlotControl;\r
 \r
@@ -4259,10 +4394,17 @@ ExplainPcieSlotControl (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device slot status information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieSlotStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieSlotStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieSlotStatus;\r
 \r
 {\r
   UINT16 PcieSlotStatus;\r
 \r
@@ -4313,10 +4455,17 @@ ExplainPcieSlotStatus (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device root information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieRootControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieRootControl (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieRootControl;\r
 \r
 {\r
   UINT16 PcieRootControl;\r
 \r
@@ -4346,10 +4495,17 @@ ExplainPcieRootControl (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device root capability information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieRootCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieRootCap (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT16 PcieRootCap;\r
 \r
 {\r
   UINT16 PcieRootCap;\r
 \r
@@ -4363,10 +4519,17 @@ ExplainPcieRootCap (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Print out information of the device root status information.\r
+\r
+  @param[in] PciExpressCap  The pointer to the structure about the device.\r
+\r
+  @retval EFI_SUCCESS   The operation was successful.\r
+**/\r
 EFI_STATUS\r
 ExplainPcieRootStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
 EFI_STATUS\r
 ExplainPcieRootStatus (\r
   IN PCIE_CAP_STURCTURE *PciExpressCap\r
-)\r
+  )\r
 {\r
   UINT32 PcieRootStatus;\r
 \r
 {\r
   UINT32 PcieRootStatus;\r
 \r
@@ -4387,6 +4550,13 @@ ExplainPcieRootStatus (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Display Pcie device structure.\r
+\r
+  @param[in] IoDev          The pointer to the root pci protocol.\r
+  @param[in] Address        The Address to start at.\r
+  @param[in] CapabilityPtr  The offset from the address to start.\r
+**/\r
 EFI_STATUS\r
 PciExplainPciExpress (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL         *IoDev,\r
 EFI_STATUS\r
 PciExplainPciExpress (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL         *IoDev,\r
@@ -4520,7 +4690,7 @@ PciExplainPciExpress (
   //\r
   Print (L"\n%HStart dumping PCIex extended configuration space (0x100 - 0xFFF).%N\n\n");\r
 \r
   //\r
   Print (L"\n%HStart dumping PCIex extended configuration space (0x100 - 0xFFF).%N\n\n");\r
 \r
-  PrivateDumpHex (\r
+  DumpHex (\r
     2,\r
     0x100,\r
     ExtendRegSize,\r
     2,\r
     0x100,\r
     ExtendRegSize,\r
index cbc1b0235af7a8d186a278385c2bc54b92a7c1da..04a22da52c83f140153e091ce5041aaa27f742d1 100644 (file)
@@ -100,9 +100,9 @@ typedef enum {
     (((PcieDeviceCap) >> 3) & 0x3)\r
 #define PCIE_CAP_EXTENDED_TAG(PcieDeviceCap) \\r
     (((PcieDeviceCap) >> 5) & 0x1)\r
     (((PcieDeviceCap) >> 3) & 0x3)\r
 #define PCIE_CAP_EXTENDED_TAG(PcieDeviceCap) \\r
     (((PcieDeviceCap) >> 5) & 0x1)\r
-#define PCIE_CAP_L0sLatency(PcieDeviceCap) \\r
+#define PCIE_CAP_L0SLATENCY(PcieDeviceCap) \\r
     (((PcieDeviceCap) >> 6) & 0x7)\r
     (((PcieDeviceCap) >> 6) & 0x7)\r
-#define PCIE_CAP_L1Latency(PcieDeviceCap) \\r
+#define PCIE_CAP_L1LATENCY(PcieDeviceCap) \\r
     (((PcieDeviceCap) >> 9) & 0x7)\r
 #define PCIE_CAP_ERR_REPORTING(PcieDeviceCap) \\r
     (((PcieDeviceCap) >> 15) & 0x1)\r
     (((PcieDeviceCap) >> 9) & 0x7)\r
 #define PCIE_CAP_ERR_REPORTING(PcieDeviceCap) \\r
     (((PcieDeviceCap) >> 15) & 0x1)\r
@@ -163,7 +163,7 @@ typedef enum {
     (((PcieLinkCap) >> 4) & 0x3f)\r
 #define PCIE_CAP_ASPM_SUPPORT(PcieLinkCap) \\r
     (((PcieLinkCap) >> 10) & 0x3)\r
     (((PcieLinkCap) >> 4) & 0x3f)\r
 #define PCIE_CAP_ASPM_SUPPORT(PcieLinkCap) \\r
     (((PcieLinkCap) >> 10) & 0x3)\r
-#define PCIE_CAP_L0s_LATENCY(PcieLinkCap) \\r
+#define PCIE_CAP_L0S_LATENCY(PcieLinkCap) \\r
     (((PcieLinkCap) >> 12) & 0x7)\r
 #define PCIE_CAP_L1_LATENCY(PcieLinkCap) \\r
     (((PcieLinkCap) >> 15) & 0x7)\r
     (((PcieLinkCap) >> 12) & 0x7)\r
 #define PCIE_CAP_L1_LATENCY(PcieLinkCap) \\r
     (((PcieLinkCap) >> 15) & 0x7)\r
@@ -334,7 +334,7 @@ typedef struct {
   UINT8   CacheLineSize;\r
   UINT8   PrimaryLatencyTimer;\r
   UINT8   HeaderType;\r
   UINT8   CacheLineSize;\r
   UINT8   PrimaryLatencyTimer;\r
   UINT8   HeaderType;\r
-  UINT8   BIST;\r
+  UINT8   Bist;\r
 \r
 } PCI_COMMON_HEADER;\r
 \r
 \r
 } PCI_COMMON_HEADER;\r
 \r
@@ -427,13 +427,15 @@ typedef struct {
   UINT32  Data[46];\r
 } PCI_CARDBUS_DATA;\r
 \r
   UINT32  Data[46];\r
 } PCI_CARDBUS_DATA;\r
 \r
+typedef union {\r
+  PCI_DEVICE_HEADER   Device;\r
+  PCI_BRIDGE_HEADER   Bridge;\r
+  PCI_CARDBUS_HEADER  CardBus;\r
+} NON_COMMON_UNION;\r
+\r
 typedef struct {\r
   PCI_COMMON_HEADER Common;\r
 typedef struct {\r
   PCI_COMMON_HEADER Common;\r
-  union {\r
-    PCI_DEVICE_HEADER   Device;\r
-    PCI_BRIDGE_HEADER   Bridge;\r
-    PCI_CARDBUS_HEADER  CardBus;\r
-  } NonCommon;\r
+  NON_COMMON_UNION NonCommon;\r
   UINT32  Data[48];\r
 } PCI_CONFIG_SPACE;\r
 \r
   UINT32  Data[48];\r
 } PCI_CONFIG_SPACE;\r
 \r
index a1e14678f34271cbe3bb19d02e9977a421608e4c..f07a4c492116997d01726cf4f7d76345f1871d2c 100644 (file)
@@ -1,7 +1,7 @@
-/**\r
+/** @file\r
   Module for clarifying the content of the smbios structure element info.\r
 \r
   Module for clarifying the content of the smbios structure element info.\r
 \r
-  Copyright (c) 2005-2010, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution. The full text of the license may be found at\r
   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
@@ -141,6 +141,12 @@ DisplaySysEventLogHeaderFormat (
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Display the header information for SEL log items.\r
+\r
+  @param[in] Key      The information key.\r
+  @param[in] Option   The option index.\r
+**/\r
 VOID\r
 DisplaySELLogHeaderLen (\r
   UINT8 Key,\r
 VOID\r
 DisplaySELLogHeaderLen (\r
   UINT8 Key,\r
@@ -163,9 +169,14 @@ DisplaySELLogHeaderLen (
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Display the header information for type 1 items.\r
+\r
+  @param[in] LogHeader      The buffer with the information.\r
+**/\r
 VOID\r
 DisplaySysEventLogHeaderType1 (\r
 VOID\r
 DisplaySysEventLogHeaderType1 (\r
-  UINT8 *LogHeader\r
+  IN UINT8 *LogHeader\r
   )\r
 {\r
   LOG_HEADER_TYPE1_FORMAT *Header;\r
   )\r
 {\r
   LOG_HEADER_TYPE1_FORMAT *Header;\r
@@ -186,8 +197,8 @@ DisplaySysEventLogHeaderType1 (
     Header->OEMReserved[3],\r
     Header->OEMReserved[4]\r
    );\r
     Header->OEMReserved[3],\r
     Header->OEMReserved[4]\r
    );\r
-  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_TIME), gShellDebug1HiiHandle, Header->METW);\r
-  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_COUNT), gShellDebug1HiiHandle, Header->MECI);\r
+  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_TIME), gShellDebug1HiiHandle, Header->Metw);\r
+  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_COUNT), gShellDebug1HiiHandle, Header->Meci);\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_ADDRESS), gShellDebug1HiiHandle, Header->CMOSAddress);\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_INDEX), gShellDebug1HiiHandle, Header->CMOSBitIndex);\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_CHECKSUM_STARTING_OFF), gShellDebug1HiiHandle, Header->StartingOffset);\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_ADDRESS), gShellDebug1HiiHandle, Header->CMOSAddress);\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_INDEX), gShellDebug1HiiHandle, Header->CMOSBitIndex);\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_CHECKSUM_STARTING_OFF), gShellDebug1HiiHandle, Header->StartingOffset);\r
@@ -235,6 +246,12 @@ DisplaySysEventLogHeader (
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Display the El Vdf information.\r
+\r
+  @param[in] ElVdfType    The information type.\r
+  @param[in] VarData      The information buffer.\r
+**/\r
 VOID\r
 DisplayElVdfInfo (\r
   UINT8 ElVdfType,\r
 VOID\r
 DisplayElVdfInfo (\r
   UINT8 ElVdfType,\r
index 62d7d77fdf495379159858991490e3c1c16d84cb..b32cfea812c0974097af9287671be775d7fb64c6 100644 (file)
@@ -1,7 +1,7 @@
-/**\r
+/** @file\r
   Module to clarify system event log of smbios structure.\r
 \r
   Module to clarify system event log of smbios structure.\r
 \r
-  Copyright (c) 2005-2010, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2005-2011, Intel Corporation. All rights reserved. <BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution. The full text of the license may be found at\r
   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 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#ifndef _SMBIOS_EVENT_LOG_INFO_H\r
-#define _SMBIOS_EVENT_LOG_INFO_H\r
+#ifndef _SMBIOS_EVENT_LOG_INFO_H_\r
+#define _SMBIOS_EVENT_LOG_INFO_H_\r
 \r
 #define END_OF_LOG  0xFF\r
 \r
 \r
 #define END_OF_LOG  0xFF\r
 \r
@@ -33,8 +33,8 @@ typedef struct {
 \r
 typedef struct {\r
   UINT8 OEMReserved[5];\r
 \r
 typedef struct {\r
   UINT8 OEMReserved[5];\r
-  UINT8 METW;           // Multiple Event Time Window\r
-  UINT8 MECI;           // Multiple Event Count Increment\r
+  UINT8 Metw;           // Multiple Event Time Window\r
+  UINT8 Meci;           // Multiple Event Count Increment\r
   UINT8 CMOSAddress;    // Pre-boot Event Log Reset - CMOS Address\r
   UINT8 CMOSBitIndex;   // Pre-boot Event Log Reset - CMOS Bit Index\r
   UINT8 StartingOffset; // CMOS Checksum - Starting Offset\r
   UINT8 CMOSAddress;    // Pre-boot Event Log Reset - CMOS Address\r
   UINT8 CMOSBitIndex;   // Pre-boot Event Log Reset - CMOS Bit Index\r
   UINT8 StartingOffset; // CMOS Checksum - Starting Offset\r
index d1ecc858acea5b2c6fa42239f3189bd3ba0a6bcf..5e146cde52bb3f63ebaf9db6a5b156c9286bb8c9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Lib include  for SMBIOS services. Used to get system serial number and GUID\r
 \r
 /** @file\r
   Lib include  for SMBIOS services. Used to get system serial number and GUID\r
 \r
-  Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   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 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#ifndef _LIB_SMBIOS_H\r
-#define _LIB_SMBIOS_H\r
+#ifndef _LIB_SMBIOS_H_\r
+#define _LIB_SMBIOS_H_\r
 \r
 //\r
 // Define SMBIOS tables.\r
 \r
 //\r
 // Define SMBIOS tables.\r
@@ -215,14 +215,14 @@ typedef struct {
   UINT8         DevFuncNum;\r
 } SMBIOS_TYPE9;\r
 \r
   UINT8         DevFuncNum;\r
 } SMBIOS_TYPE9;\r
 \r
-typedef struct DeviceStruct {\r
+typedef struct _DEVICE_STRUCTURE {\r
   UINT8         DeviceType;\r
   SMBIOS_STRING DescriptionString;\r
   UINT8         DeviceType;\r
   SMBIOS_STRING DescriptionString;\r
-} DeviceStruct;\r
+} DEVICE_STRUCTURE;\r
 \r
 typedef struct {\r
   SMBIOS_HEADER Hdr;\r
 \r
 typedef struct {\r
   SMBIOS_HEADER Hdr;\r
-  DeviceStruct  Device[1];\r
+  DEVICE_STRUCTURE  Device[1];\r
 } SMBIOS_TYPE10;\r
 \r
 typedef struct {\r
 } SMBIOS_TYPE10;\r
 \r
 typedef struct {\r
@@ -239,7 +239,7 @@ typedef struct {
   SMBIOS_HEADER Hdr;\r
   UINT8         InstallableLanguages;\r
   UINT8         Flags;\r
   SMBIOS_HEADER Hdr;\r
   UINT8         InstallableLanguages;\r
   UINT8         Flags;\r
-  UINT8         reserved[15];\r
+  UINT8         Reserved[15];\r
   SMBIOS_STRING CurrentLanguages;\r
 } SMBIOS_TYPE13;\r
 \r
   SMBIOS_STRING CurrentLanguages;\r
 } SMBIOS_TYPE13;\r
 \r
@@ -622,17 +622,19 @@ typedef union {
 \r
 #pragma pack()\r
 \r
 \r
 #pragma pack()\r
 \r
-CHAR8         *\r
-LibGetSmbiosString (\r
-  IN  SMBIOS_STRUCTURE_POINTER      *Smbios,\r
-  IN  UINT16                        StringNumber\r
-  );\r
+/**\r
+  Return SMBIOS string given the string number.\r
 \r
 \r
-EFI_STATUS\r
-LibGetSmbiosSystemGuidAndSerialNumber (\r
-  IN  EFI_GUID                      *SystemGuid,\r
-  OUT CHAR8                         **SystemSerialNumber\r
-  );\r
+  @param[in] Smbios         Pointer to SMBIOS structure.\r
+  @param[in] StringNumber   String number to return. -1 is used to skip all strings and\r
+                            point to the next SMBIOS structure.\r
 \r
 \r
+  @return Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1\r
+**/\r
+CHAR8*\r
+LibGetSmbiosString (\r
+  IN  SMBIOS_STRUCTURE_POINTER    *Smbios,\r
+  IN  UINT16                      StringNumber\r
+  );\r
 \r
 #endif\r
 \r
 #endif\r
index 22a8065a0153c83fc996a9b1ed1989dd4d6f2d8f..409f6840ef6b648ba81209c84654ee4c41bba002 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   API for SMBIOS table.\r
 \r
 /** @file\r
   API for SMBIOS table.\r
 \r
-  Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   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
 #include <Guid/Smbios.h>\r
 #include "LIbSmbios.h"\r
 #include "LibSmbiosView.h"\r
 #include <Guid/Smbios.h>\r
 #include "LIbSmbios.h"\r
 #include "LibSmbiosView.h"\r
-#include "smbiosview.h"\r
+#include "SmbiosView.h"\r
 \r
 STATIC UINT8                    mInit         = 0;\r
 STATIC SMBIOS_STRUCTURE_TABLE   *mSmbiosTable = NULL;\r
 STATIC SMBIOS_STRUCTURE_POINTER m_SmbiosStruct;\r
 STATIC SMBIOS_STRUCTURE_POINTER *mSmbiosStruct = &m_SmbiosStruct;\r
 \r
 \r
 STATIC UINT8                    mInit         = 0;\r
 STATIC SMBIOS_STRUCTURE_TABLE   *mSmbiosTable = NULL;\r
 STATIC SMBIOS_STRUCTURE_POINTER m_SmbiosStruct;\r
 STATIC SMBIOS_STRUCTURE_POINTER *mSmbiosStruct = &m_SmbiosStruct;\r
 \r
+/**\r
+  Init the SMBIOS VIEW API's environment.\r
+\r
+  @retval EFI_SUCCESS  Successful to init the SMBIOS VIEW Lib.\r
+**/\r
 EFI_STATUS\r
 LibSmbiosInit (\r
   VOID\r
   )\r
 EFI_STATUS\r
 LibSmbiosInit (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-    Init the SMBIOS VIEW API's environment.\r
-\r
-  Arguments:\r
-    None\r
-\r
-Returns:\r
-    EFI_SUCCESS       - Successful to init the SMBIOS VIEW Lib\r
-    Others            - Cannot get SMBIOS Table\r
-\r
-**/\r
 {\r
   EFI_STATUS  Status;\r
 \r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -73,6 +65,9 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Cleanup the Smbios information.\r
+**/\r
 VOID\r
 LibSmbiosCleanup (\r
   VOID\r
 VOID\r
 LibSmbiosCleanup (\r
   VOID\r
@@ -88,98 +83,46 @@ LibSmbiosCleanup (
   mInit = 0;\r
 }\r
 \r
   mInit = 0;\r
 }\r
 \r
+/**\r
+  Get the entry point structure for the table.\r
+\r
+  @param[out] EntryPointStructure  The pointer to populate.\r
+**/\r
 VOID\r
 LibSmbiosGetEPS (\r
 VOID\r
 LibSmbiosGetEPS (\r
-  SMBIOS_STRUCTURE_TABLE **pEntryPointStructure\r
+  OUT SMBIOS_STRUCTURE_TABLE **EntryPointStructure\r
   )\r
 {\r
   //\r
   // return SMBIOS Table address\r
   //\r
   )\r
 {\r
   //\r
   // return SMBIOS Table address\r
   //\r
-  *pEntryPointStructure = mSmbiosTable;\r
+  *EntryPointStructure = mSmbiosTable;\r
 }\r
 \r
 }\r
 \r
-VOID\r
-LibSmbiosGetStructHead (\r
-  SMBIOS_STRUCTURE_POINTER *pHead\r
-  )\r
-{\r
-  //\r
-  // return SMBIOS structure table address\r
-  //\r
-  pHead = mSmbiosStruct;\r
-}\r
-\r
-EFI_STATUS\r
-LibGetSmbiosInfo (\r
-  OUT CHAR8   *dmiBIOSRevision,\r
-  OUT UINT16  *NumStructures,\r
-  OUT UINT16  *StructureSize,\r
-  OUT UINT32  *dmiStorageBase,\r
-  OUT UINT16  *dmiStorageSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-    Get SMBIOS Information.\r
+/**\r
+    Get SMBIOS structure given the Handle,copy data to the Buffer,\r
+    Handle is changed to the next handle or 0xFFFF when the end is\r
+    reached or the handle is not found.\r
 \r
 \r
-  Arguments:\r
-    dmiBIOSRevision   - Revision of the SMBIOS Extensions.\r
-    NumStructures     - Max. Number of Structures the BIOS will return.\r
-    StructureSize     - Size of largest SMBIOS Structure.\r
-    dmiStorageBase    - 32-bit physical base address for memory mapped SMBIOS data.\r
-    dmiStorageSize    - Size of the memory-mapped SMBIOS data.\r
+    @param[in,out] Handle     0xFFFF: get the first structure\r
+                              Others: get a structure according to this value.\r
+    @param[in,out] Buffer     The pointer to the caller's memory buffer.\r
+    @param[out] Length        Length of return buffer in bytes.\r
 \r
 \r
-  Returns:\r
-    DMI_SUCCESS                 - successful.\r
-    DMI_FUNCTION_NOT_SUPPORTED  - Does not support SMBIOS calling interface capability.\r
+    @retval DMI_SUCCESS   Buffer contains the required structure data\r
+                          Handle is updated with next structure handle or\r
+                          0xFFFF(end-of-list).\r
 \r
 \r
+    @retval DMI_INVALID_HANDLE  Buffer not contain the requiring structure data.\r
+                                Handle is updated with next structure handle or\r
+                                0xFFFF(end-of-list).\r
 **/\r
 **/\r
-{\r
-  //\r
-  // If no SMIBOS table, unsupported.\r
-  //\r
-  if (mSmbiosTable == NULL) {\r
-    return DMI_FUNCTION_NOT_SUPPORTED;\r
-  }\r
-\r
-  *dmiBIOSRevision  = mSmbiosTable->SmbiosBcdRevision;\r
-  *NumStructures    = mSmbiosTable->NumberOfSmbiosStructures;\r
-  *StructureSize    = mSmbiosTable->MaxStructureSize;\r
-  *dmiStorageBase   = mSmbiosTable->TableAddress;\r
-  *dmiStorageSize   = mSmbiosTable->TableLength;\r
-\r
-  return DMI_SUCCESS;\r
-}\r
-\r
 EFI_STATUS\r
 LibGetSmbiosStructure (\r
   IN  OUT UINT16  *Handle,\r
   IN  OUT UINT8   *Buffer,\r
   OUT UINT16      *Length\r
   )\r
 EFI_STATUS\r
 LibGetSmbiosStructure (\r
   IN  OUT UINT16  *Handle,\r
   IN  OUT UINT8   *Buffer,\r
   OUT UINT16      *Length\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Get SMBIOS structure given the Handle,copy data to the Buffer,\r
-    Handle is changed to the next handle or 0xFFFF when the end is\r
-    reached or the handle is not found.\r
-\r
-  Arguments:\r
-    Handle:         - 0xFFFF: get the first structure\r
-                    - Others: get a structure according to this value.\r
-    Buffter:        - The pointer to the caller's memory buffer.\r
-    Length:         - Length of return buffer in bytes.\r
-\r
-  Returns:\r
-    DMI_SUCCESS         - Buffer contains the required structure data\r
-                        - Handle is updated with next structure handle or\r
-                          0xFFFF(end-of-list).\r
-\r
-    DMI_INVALID_HANDLE  - Buffer not contain the requiring structure data\r
-                        - Handle is updated with next structure handle or\r
-                          0xFFFF(end-of-list).\r
-**/\r
 {\r
   SMBIOS_STRUCTURE_POINTER  Smbios;\r
   SMBIOS_STRUCTURE_POINTER  SmbiosEnd;\r
 {\r
   SMBIOS_STRUCTURE_POINTER  Smbios;\r
   SMBIOS_STRUCTURE_POINTER  SmbiosEnd;\r
@@ -230,23 +173,18 @@ LibGetSmbiosStructure (
   return DMI_INVALID_HANDLE;\r
 }\r
 \r
   return DMI_INVALID_HANDLE;\r
 }\r
 \r
+/**\r
+  Check the structure to see if it is legal.\r
+\r
+  @param[in] Smbios    - Pointer to the structure that will be checked.\r
+\r
+  @retval DMI_SUCCESS           Structure data is legal.\r
+  @retval DMI_BAD_PARAMETER     Structure data contains bad parameter.\r
+**/\r
 EFI_STATUS\r
 SmbiosCheckStructure (\r
   IN  SMBIOS_STRUCTURE_POINTER *Smbios\r
   )\r
 EFI_STATUS\r
 SmbiosCheckStructure (\r
   IN  SMBIOS_STRUCTURE_POINTER *Smbios\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Check the structure to see if it is legal.\r
-\r
-  Arguments:\r
-    Smbios    - Pointer to the structure that will be checked.\r
-\r
-  Returns:\r
-    DMI_SUCCESS     - Structure data is legal.\r
-    DMI_BAD_PARAMETER - Structure data contains bad parameter\r
-\r
-**/\r
 {\r
   //\r
   // If key != value, then error.\r
 {\r
   //\r
   // If key != value, then error.\r
@@ -324,6 +262,13 @@ SmbiosCheckStructure (
   return Status;\r
 }\r
 \r
   return Status;\r
 }\r
 \r
+/**\r
+  Get a string from the smbios information.\r
+\r
+  @param[in] Smbios         The pointer to the smbios information.\r
+  @param[in] StringNumber   The index to the string to get.\r
+  @param[out] Buffer        The buffer to fill with the string when retrieved.\r
+**/\r
 VOID\r
 SmbiosGetPendingString (\r
   IN  SMBIOS_STRUCTURE_POINTER      *Smbios,\r
 VOID\r
 SmbiosGetPendingString (\r
   IN  SMBIOS_STRUCTURE_POINTER      *Smbios,\r
index 7ef341b0d688aeffadff163dd36bb723f3eda985..76442cdf1a24bf28051f1923b3ffaa038c720969 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.\r
 \r
 /** @file\r
   API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.\r
 \r
-  Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   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 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#ifndef _LIB_SMBIOS_VIEW_H\r
-#define _LIB_SMBIOS_VIEW_H\r
+#ifndef _LIB_SMBIOS_VIEW_H_\r
+#define _LIB_SMBIOS_VIEW_H_\r
 \r
 #include "LibSmbios.h"\r
 \r
 \r
 #include "LibSmbios.h"\r
 \r
 #define EFI_SMBIOSERR_TYPE_UNKNOWN      EFI_SMBIOSERR (3)\r
 #define EFI_SMBIOSERR_UNSUPPORTED       EFI_SMBIOSERR (4)\r
 \r
 #define EFI_SMBIOSERR_TYPE_UNKNOWN      EFI_SMBIOSERR (3)\r
 #define EFI_SMBIOSERR_UNSUPPORTED       EFI_SMBIOSERR (4)\r
 \r
+/**\r
+  Init the SMBIOS VIEW API's environment.\r
+\r
+  @retval EFI_SUCCESS  Successful to init the SMBIOS VIEW Lib.\r
+**/\r
 EFI_STATUS\r
 LibSmbiosInit (\r
   VOID\r
   );\r
 \r
 EFI_STATUS\r
 LibSmbiosInit (\r
   VOID\r
   );\r
 \r
+/**\r
+  Cleanup the Smbios information.\r
+**/\r
 VOID\r
 LibSmbiosCleanup (\r
   VOID\r
   );\r
 \r
 VOID\r
 LibSmbiosCleanup (\r
   VOID\r
   );\r
 \r
-VOID\r
-LibSmbiosGetEPS (\r
-  SMBIOS_STRUCTURE_TABLE **pEntryPointStructure\r
-  );\r
+/**\r
+  Get the entry point structure for the table.\r
 \r
 \r
+  @param[out] EntryPointStructure  The pointer to populate.\r
+**/\r
 VOID\r
 VOID\r
-LibSmbiosGetStructHead (\r
-  SMBIOS_STRUCTURE_POINTER *pHead\r
+LibSmbiosGetEPS (\r
+  OUT SMBIOS_STRUCTURE_TABLE **EntryPointStructure\r
   );\r
 \r
   );\r
 \r
-EFI_STATUS\r
-LibGetSmbiosInfo (\r
-  OUT CHAR8   *dmiBIOSRevision,\r
-  OUT UINT16  *NumStructures,\r
-  OUT UINT16  *StructureSize,\r
-  OUT UINT32  *dmiStorageBase,\r
-  OUT UINT16  *dmiStorageSize\r
-  );\r
+/**\r
+    Get SMBIOS structure given the Handle,copy data to the Buffer,\r
+    Handle is changed to the next handle or 0xFFFF when the end is\r
+    reached or the handle is not found.\r
 \r
 \r
-/*++\r
-  Description:\r
-    Get SMBIOS Information.\r
+    @param[in,out] Handle     0xFFFF: get the first structure\r
+                              Others: get a structure according to this value.\r
+    @param[in,out] Buffer     The pointer to the caller's memory buffer.\r
+    @param[out] Length        Length of return buffer in bytes.\r
 \r
 \r
-  Arguments:\r
-    dmiBIOSRevision   - Revision of the SMBIOS Extensions.\r
-    NumStructures     - Max. Number of Structures the BIOS will return.\r
-    StructureSize     - Size of largest SMBIOS Structure.\r
-    dmiStorageBase    - 32-bit physical base address for memory mapped SMBIOS data.\r
-    dmiStorageSize    - Size of the memory-mapped SMBIOS data.\r
+    @retval DMI_SUCCESS   Buffer contains the required structure data\r
+                          Handle is updated with next structure handle or\r
+                          0xFFFF(end-of-list).\r
 \r
 \r
-  Returns:\r
-    DMI_SUCCESS                 - successful.\r
-    DMI_FUNCTION_NOT_SUPPORTED  - Does not support SMBIOS calling interface capability.\r
+    @retval DMI_INVALID_HANDLE  Buffer not contain the requiring structure data.\r
+                                Handle is updated with next structure handle or\r
+                                0xFFFF(end-of-list).\r
 **/\r
 EFI_STATUS\r
 LibGetSmbiosStructure (\r
 **/\r
 EFI_STATUS\r
 LibGetSmbiosStructure (\r
@@ -90,20 +92,12 @@ LibGetSmbiosStructure (
   OUT UINT16      *Length\r
   );\r
 \r
   OUT UINT16      *Length\r
   );\r
 \r
-/*++\r
-  Description:\r
-    Get SMBIOS structure given the Handle,copy data to the Buffer,Handle is then the next.\r
-\r
-  Arguments:\r
-    Handle:         - 0x0: get the first structure\r
-                    - Others: get a certain structure according to this value.\r
-    Buffter:        - contains the pointer to the caller's memory buffer.\r
+/**\r
+  Get a string from the smbios information.\r
 \r
 \r
-  Returns:\r
-    DMI_SUCCESS         - Buffer contains the required structure data\r
-                        - Handle is updated with next structure handle or 0xFFFF(end-of-list).\r
-    DMI_INVALID_HANDLE  - Buffer not contain the requiring structure data\r
-                        - Handle is updated with next structure handle or 0xFFFF(end-of-list).\r
+  @param[in] Smbios         The pointer to the smbios information.\r
+  @param[in] StringNumber   The index to the string to get.\r
+  @param[out] Buffer        The buffer to fill with the string when retrieved.\r
 **/\r
 VOID\r
 SmbiosGetPendingString (\r
 **/\r
 VOID\r
 SmbiosGetPendingString (\r
@@ -112,9 +106,17 @@ SmbiosGetPendingString (
   OUT CHAR8                         *Buffer\r
   );\r
 \r
   OUT CHAR8                         *Buffer\r
   );\r
 \r
+/**\r
+  Check the structure to see if it is legal.\r
+\r
+  @param[in] Smbios    - Pointer to the structure that will be checked.\r
+\r
+  @retval DMI_SUCCESS           Structure data is legal.\r
+  @retval DMI_BAD_PARAMETER     Structure data contains bad parameter.\r
+**/\r
 EFI_STATUS\r
 SmbiosCheckStructure (\r
 EFI_STATUS\r
 SmbiosCheckStructure (\r
-  IN  SMBIOS_STRUCTURE_POINTER      *Smbios\r
+  IN  SMBIOS_STRUCTURE_POINTER *Smbios\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index 91835106d56015a4c261dce1558d5a6497e1f2c1..3ae1eeaf7c40a0dcc789c4989af3044e3603f8fa 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Module for clarifying the content of the smbios structure element information.\r
 \r
 /** @file\r
   Module for clarifying the content of the smbios structure element information.\r
 \r
-  Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   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
@@ -28,7 +28,7 @@
 //////////////////////////////////////////////////////////\r
 //  Macros of print structure element, simplify coding.\r
 //\r
 //////////////////////////////////////////////////////////\r
 //  Macros of print structure element, simplify coding.\r
 //\r
-#define PrintPendingString(pStruct, type, element) \\r
+#define PRINT_PENDING_STRING(pStruct, type, element) \\r
   do { \\r
     CHAR8 StringBuf[64]; \\r
     SetMem (StringBuf, sizeof (StringBuf), 0x00); \\r
   do { \\r
     CHAR8 StringBuf[64]; \\r
     SetMem (StringBuf, sizeof (StringBuf), 0x00); \\r
@@ -37,7 +37,7 @@
     ShellPrintEx(-1,-1,L": %a\n", StringBuf); \\r
   } while (0);\r
 \r
     ShellPrintEx(-1,-1,L": %a\n", StringBuf); \\r
   } while (0);\r
 \r
-#define PrintSmbiosString(pStruct, stringnumber, element) \\r
+#define PRINT_SMBIOS_STRING(pStruct, stringnumber, element) \\r
   do { \\r
     CHAR8 StringBuf[64]; \\r
     SetMem (StringBuf, sizeof (StringBuf), 0x00); \\r
   do { \\r
     CHAR8 StringBuf[64]; \\r
     SetMem (StringBuf, sizeof (StringBuf), 0x00); \\r
     ShellPrintEx(-1,-1,L": %a\n", StringBuf); \\r
   } while (0);\r
 \r
     ShellPrintEx(-1,-1,L": %a\n", StringBuf); \\r
   } while (0);\r
 \r
-#define PrintStructValue(pStruct, type, element) \\r
+#define PRINT_STRUCT_VALUE(pStruct, type, element) \\r
   do { \\r
     ShellPrintEx(-1,-1,L"%a",#element); \\r
     ShellPrintEx(-1,-1,L": %d\n", (pStruct->type->element)); \\r
   } while (0);\r
 \r
   do { \\r
     ShellPrintEx(-1,-1,L"%a",#element); \\r
     ShellPrintEx(-1,-1,L": %d\n", (pStruct->type->element)); \\r
   } while (0);\r
 \r
-#define PrintStructValueH(pStruct, type, element) \\r
+#define PRINT_STRUCT_VALUE_H(pStruct, type, element) \\r
   do { \\r
     ShellPrintEx(-1,-1,L"%a",#element); \\r
     ShellPrintEx(-1,-1,L": 0x%x\n", (pStruct->type->element)); \\r
   } while (0);\r
 \r
   do { \\r
     ShellPrintEx(-1,-1,L"%a",#element); \\r
     ShellPrintEx(-1,-1,L": 0x%x\n", (pStruct->type->element)); \\r
   } while (0);\r
 \r
-#define PrintBitField(pStruct, type, element, size) \\r
+#define PRINT_BIT_FIELD(pStruct, type, element, size) \\r
   do { \\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gShellDebug1HiiHandle); \\r
     ShellPrintEx(-1,-1,L"%a",#element); \\r
   do { \\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gShellDebug1HiiHandle); \\r
     ShellPrintEx(-1,-1,L"%a",#element); \\r
@@ -66,7 +66,7 @@
     DumpHex (0, 0, size, &(pStruct->type->element)); \\r
   } while (0);\r
 \r
     DumpHex (0, 0, size, &(pStruct->type->element)); \\r
   } while (0);\r
 \r
-#define PrintSmbiosBitField(pStruct, startaddress, element, size) \\r
+#define PRINT_SMBIOS_BIT_FIELD(pStruct, startaddress, element, size) \\r
   do { \\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gShellDebug1HiiHandle); \\r
     ShellPrintEx(-1,-1,L"%a",#element); \\r
   do { \\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gShellDebug1HiiHandle); \\r
     ShellPrintEx(-1,-1,L"%a",#element); \\r
 //\r
 /////////////////////////////////////////\r
 //\r
 //\r
 /////////////////////////////////////////\r
 //\r
+\r
+/**\r
+  Copy Length of Src buffer to Dest buffer,\r
+  add a NULL termination to Dest buffer.\r
+\r
+  @param[in,out] Dest  Destination buffer head.\r
+  @param[in] Src       Source buffer head.\r
+  @param[in] Length    Length of buffer to be copied.\r
+**/\r
 VOID\r
 MemToString (\r
   IN OUT VOID   *Dest,\r
   IN VOID       *Src,\r
   IN UINTN      Length\r
   )\r
 VOID\r
 MemToString (\r
   IN OUT VOID   *Dest,\r
   IN VOID       *Src,\r
   IN UINTN      Length\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Copy Length of Src buffer to Dest buffer,\r
-  add a NULL termination to Dest buffer.\r
-\r
-Arguments:\r
-  Dest      - Destination buffer head\r
-  Src       - Source buffer head\r
-  Length    - Length of buffer to be copied\r
-\r
-Returns:\r
-  None.\r
-\r
-**/\r
 {\r
   UINT8 *SrcBuffer;\r
   UINT8 *DestBuffer;\r
 {\r
   UINT8 *SrcBuffer;\r
   UINT8 *DestBuffer;\r
@@ -120,23 +114,18 @@ Returns:
 //\r
 // Functions below is to show the information\r
 //\r
 //\r
 // Functions below is to show the information\r
 //\r
+\r
+/**\r
+  Print the info of EPS(Entry Point Structure).\r
+\r
+  @param[in] SmbiosTable    Pointer to the SMBIOS table entry point.\r
+  @param[in] Option         Display option.\r
+**/\r
 VOID\r
 SmbiosPrintEPSInfo (\r
   IN  SMBIOS_STRUCTURE_TABLE  *SmbiosTable,\r
   IN  UINT8                   Option\r
   )\r
 VOID\r
 SmbiosPrintEPSInfo (\r
   IN  SMBIOS_STRUCTURE_TABLE  *SmbiosTable,\r
   IN  UINT8                   Option\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Print the info of EPS(Entry Point Structure)\r
-\r
-Arguments:\r
-  SmbiosTable    - Pointer to the SMBIOS table entry point\r
-  Option         - Display option\r
-\r
-Returns: None\r
-\r
-**/\r
 {\r
   UINT8 Anchor[5];\r
   UINT8 InAnchor[6];\r
 {\r
   UINT8 Anchor[5];\r
   UINT8 InAnchor[6];\r
@@ -199,33 +188,28 @@ Returns: None
   Print (L"\n");\r
 }\r
 \r
   Print (L"\n");\r
 }\r
 \r
+/**\r
+  This function print the content of the structure pointed by Struct.\r
+\r
+  @param[in] Struct       Point to the structure to be printed.\r
+  @param[in] Option       Print option of information detail.\r
+\r
+  @retval EFI_SUCCESS               Successfully Printing this function.\r
+  @retval EFI_INVALID_PARAMETER     Invalid Structure.\r
+  @retval EFI_UNSUPPORTED           Unsupported.\r
+**/\r
 EFI_STATUS\r
 SmbiosPrintStructure (\r
 EFI_STATUS\r
 SmbiosPrintStructure (\r
-  IN  SMBIOS_STRUCTURE_POINTER  *pStruct,\r
+  IN  SMBIOS_STRUCTURE_POINTER  *Struct,\r
   IN  UINT8                     Option\r
   )\r
   IN  UINT8                     Option\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  This function print the content of the structure pointed by pStruct\r
-\r
-Arguments:\r
-  pStruct     - point to the structure to be printed\r
-  Option      - print option of information detail\r
-\r
-Returns:\r
-  EFI_SUCCESS             - Successfully Printing this function\r
-  EFI_INVALID_PARAMETER   - Invalid Structure\r
-  EFI_UNSUPPORTED         - Unsupported\r
-\r
-**/\r
 {\r
   UINT8 Index;\r
   UINT8 *Buffer;\r
 \r
 {\r
   UINT8 Index;\r
   UINT8 *Buffer;\r
 \r
-  Buffer = (UINT8 *) (UINTN) (pStruct->Raw);\r
+  Buffer = (UINT8 *) (UINTN) (Struct->Raw);\r
 \r
 \r
-  if (pStruct == NULL) {\r
+  if (Struct == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -235,35 +219,35 @@ Returns:
   //\r
   // Display structure header\r
   //\r
   //\r
   // Display structure header\r
   //\r
-  DisplayStructureTypeInfo (pStruct->Hdr->Type, SHOW_DETAIL);\r
-  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FORMAT_PART_LEN), gShellDebug1HiiHandle, pStruct->Hdr->Length);\r
-  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_HANDLE), gShellDebug1HiiHandle, pStruct->Hdr->Handle);\r
+  DisplayStructureTypeInfo (Struct->Hdr->Type, SHOW_DETAIL);\r
+  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FORMAT_PART_LEN), gShellDebug1HiiHandle, Struct->Hdr->Length);\r
+  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_HANDLE), gShellDebug1HiiHandle, Struct->Hdr->Handle);\r
 \r
   if (Option == SHOW_OUTLINE) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
 \r
   if (Option == SHOW_OUTLINE) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
-  switch (pStruct->Hdr->Type) {\r
+  switch (Struct->Hdr->Type) {\r
   //\r
   //\r
   //\r
   case 0:\r
   //\r
   //\r
   //\r
   case 0:\r
-    PrintPendingString (pStruct, Type0, Vendor);\r
-    PrintPendingString (pStruct, Type0, BiosVersion);\r
-    PrintStructValue (pStruct, Type0, BiosSegment);\r
-    PrintPendingString (pStruct, Type0, BiosReleaseDate);\r
-    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 64 * (pStruct->Type0->BiosSize + 1));\r
+    PRINT_PENDING_STRING (Struct, Type0, Vendor);\r
+    PRINT_PENDING_STRING (Struct, Type0, BiosVersion);\r
+    PRINT_STRUCT_VALUE (Struct, Type0, BiosSegment);\r
+    PRINT_PENDING_STRING (Struct, Type0, BiosReleaseDate);\r
+    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 64 * (Struct->Type0->BiosSize + 1));\r
 \r
     if (Option < SHOW_DETAIL) {\r
 \r
     if (Option < SHOW_DETAIL) {\r
-      PrintStructValueH (pStruct, Type0, BiosCharacteristics);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type0, BiosCharacteristics);\r
     } else {\r
     } else {\r
-      DisplayBiosCharacteristics (pStruct->Type0->BiosCharacteristics, Option);\r
+      DisplayBiosCharacteristics (Struct->Type0->BiosCharacteristics, Option);\r
 \r
       //\r
       // The length of above format part is 0x12 bytes,\r
       // Ext bytes are following, size = 'len-0x12'.\r
       // If len-0x12 > 0, then\r
 \r
       //\r
       // The length of above format part is 0x12 bytes,\r
       // Ext bytes are following, size = 'len-0x12'.\r
       // If len-0x12 > 0, then\r
-      //    there are extension bytes (byte1, byte2, byte3...)\r
+      //    there are extension bytes (Byte1, byte2, byte3...)\r
       // And byte3 not stated in spec, so dump all extension bytes(1, 2, 3..)\r
       //\r
       if ((Buffer[1] - (CHAR8) 0x12) > 0) {\r
       // And byte3 not stated in spec, so dump all extension bytes(1, 2, 3..)\r
       //\r
       if ((Buffer[1] - (CHAR8) 0x12) > 0) {\r
@@ -275,8 +259,8 @@ Returns:
       }\r
 \r
       if ((Buffer[1] - (CHAR8) 0x12) > 2) {\r
       }\r
 \r
       if ((Buffer[1] - (CHAR8) 0x12) > 2) {\r
-        PrintBitField (\r
-          pStruct,\r
+        PRINT_BIT_FIELD (\r
+          Struct,\r
           Type0,\r
           BiosCharacteristics,\r
           Buffer[1] - (CHAR8) 0x12\r
           Type0,\r
           BiosCharacteristics,\r
           Buffer[1] - (CHAR8) 0x12\r
@@ -289,77 +273,77 @@ Returns:
   // System Information (Type 1)\r
   //\r
   case 1:\r
   // System Information (Type 1)\r
   //\r
   case 1:\r
-    PrintPendingString (pStruct, Type1, Manufacturer);\r
-    PrintPendingString (pStruct, Type1, ProductName);\r
-    PrintPendingString (pStruct, Type1, Version);\r
-    PrintPendingString (pStruct, Type1, SerialNumber);\r
-    PrintBitField (pStruct, Type1, Uuid, 16);\r
-    DisplaySystemWakeupType (pStruct->Type1->WakeUpType, Option);\r
+    PRINT_PENDING_STRING (Struct, Type1, Manufacturer);\r
+    PRINT_PENDING_STRING (Struct, Type1, ProductName);\r
+    PRINT_PENDING_STRING (Struct, Type1, Version);\r
+    PRINT_PENDING_STRING (Struct, Type1, SerialNumber);\r
+    PRINT_BIT_FIELD (Struct, Type1, Uuid, 16);\r
+    DisplaySystemWakeupType (Struct->Type1->WakeUpType, Option);\r
     break;\r
 \r
   case 2:\r
     break;\r
 \r
   case 2:\r
-    PrintPendingString (pStruct, Type2, Manufacturer);\r
-    PrintPendingString (pStruct, Type2, ProductName);\r
-    PrintPendingString (pStruct, Type2, Version);\r
-    PrintPendingString (pStruct, Type2, SerialNumber);\r
+    PRINT_PENDING_STRING (Struct, Type2, Manufacturer);\r
+    PRINT_PENDING_STRING (Struct, Type2, ProductName);\r
+    PRINT_PENDING_STRING (Struct, Type2, Version);\r
+    PRINT_PENDING_STRING (Struct, Type2, SerialNumber);\r
     break;\r
 \r
   //\r
   // System Enclosure (Type 3)\r
   //\r
   case 3:\r
     break;\r
 \r
   //\r
   // System Enclosure (Type 3)\r
   //\r
   case 3:\r
-    PrintPendingString (pStruct, Type3, Manufacturer);\r
-    PrintStructValue (pStruct, Type3, Type);\r
-    DisplaySystemEnclosureType (pStruct->Type3->Type, Option);\r
-    PrintPendingString (pStruct, Type3, Version);\r
-    PrintPendingString (pStruct, Type3, SerialNumber);\r
-    PrintPendingString (pStruct, Type3, AssetTag);\r
+    PRINT_PENDING_STRING (Struct, Type3, Manufacturer);\r
+    PRINT_STRUCT_VALUE (Struct, Type3, Type);\r
+    DisplaySystemEnclosureType (Struct->Type3->Type, Option);\r
+    PRINT_PENDING_STRING (Struct, Type3, Version);\r
+    PRINT_PENDING_STRING (Struct, Type3, SerialNumber);\r
+    PRINT_PENDING_STRING (Struct, Type3, AssetTag);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOTUP_STATE), gShellDebug1HiiHandle);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOTUP_STATE), gShellDebug1HiiHandle);\r
-    DisplaySystemEnclosureStatus (pStruct->Type3->BootupState, Option);\r
+    DisplaySystemEnclosureStatus (Struct->Type3->BootupState, Option);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE), gShellDebug1HiiHandle);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE), gShellDebug1HiiHandle);\r
-    DisplaySystemEnclosureStatus (pStruct->Type3->PowerSupplyState, Option);\r
+    DisplaySystemEnclosureStatus (Struct->Type3->PowerSupplyState, Option);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE), gShellDebug1HiiHandle);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE), gShellDebug1HiiHandle);\r
-    DisplaySystemEnclosureStatus (pStruct->Type3->ThermalState, Option);\r
+    DisplaySystemEnclosureStatus (Struct->Type3->ThermalState, Option);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS), gShellDebug1HiiHandle);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS), gShellDebug1HiiHandle);\r
-    DisplaySESecurityStatus (pStruct->Type3->SecurityStatus, Option);\r
-    PrintBitField (pStruct, Type3, OemDefined, 4);\r
+    DisplaySESecurityStatus (Struct->Type3->SecurityStatus, Option);\r
+    PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4);\r
     break;\r
 \r
   //\r
   // Processor Information (Type 4)\r
   //\r
   case 4:\r
     break;\r
 \r
   //\r
   // Processor Information (Type 4)\r
   //\r
   case 4:\r
-    PrintStructValue (pStruct, Type4, Socket);\r
-    DisplayProcessorType (pStruct->Type4->ProcessorType, Option);\r
+    PRINT_STRUCT_VALUE (Struct, Type4, Socket);\r
+    DisplayProcessorType (Struct->Type4->ProcessorType, Option);\r
     if ((SmbiosMajorVersion > 0x2 || (SmbiosMajorVersion == 0x2 && SmbiosMinorVersion >= 0x6)) &&\r
     if ((SmbiosMajorVersion > 0x2 || (SmbiosMajorVersion == 0x2 && SmbiosMinorVersion >= 0x6)) &&\r
-        (pStruct->Type4->ProcessorFamily == 0xFE)) {\r
+        (Struct->Type4->ProcessorFamily == 0xFE)) {\r
       //\r
       // Get family from ProcessorFamily2 field\r
       //\r
       //\r
       // Get family from ProcessorFamily2 field\r
       //\r
-      DisplayProcessorFamily2 (pStruct->Type4->ProcessorFamily2, Option);\r
+      DisplayProcessorFamily2 (Struct->Type4->ProcessorFamily2, Option);\r
     } else {\r
     } else {\r
-      DisplayProcessorFamily (pStruct->Type4->ProcessorFamily, Option);\r
+      DisplayProcessorFamily (Struct->Type4->ProcessorFamily, Option);\r
     }\r
     }\r
-    PrintPendingString (pStruct, Type4, ProcessorManufacture);\r
-    PrintBitField (pStruct, Type4, ProcessorId, 8);\r
-    PrintPendingString (pStruct, Type4, ProcessorVersion);\r
-    DisplayProcessorVoltage (pStruct->Type4->Voltage, Option);\r
-    PrintStructValue (pStruct, Type4, ExternalClock);\r
-    PrintStructValue (pStruct, Type4, MaxSpeed);\r
-    PrintStructValue (pStruct, Type4, CurrentSpeed);\r
-    DisplayProcessorStatus (pStruct->Type4->Status, Option);\r
-    DisplayProcessorUpgrade (pStruct->Type4->ProcessorUpgrade, Option);\r
-    PrintStructValueH (pStruct, Type4, L1CacheHandle);\r
-    PrintStructValueH (pStruct, Type4, L2CacheHandle);\r
-    PrintStructValueH (pStruct, Type4, L3CacheHandle);\r
-    PrintPendingString (pStruct, Type4, SerialNumber);\r
-    PrintPendingString (pStruct, Type4, AssetTag);\r
-    PrintPendingString (pStruct, Type4, PartNumber);\r
+    PRINT_PENDING_STRING (Struct, Type4, ProcessorManufacture);\r
+    PRINT_BIT_FIELD (Struct, Type4, ProcessorId, 8);\r
+    PRINT_PENDING_STRING (Struct, Type4, ProcessorVersion);\r
+    DisplayProcessorVoltage (Struct->Type4->Voltage, Option);\r
+    PRINT_STRUCT_VALUE (Struct, Type4, ExternalClock);\r
+    PRINT_STRUCT_VALUE (Struct, Type4, MaxSpeed);\r
+    PRINT_STRUCT_VALUE (Struct, Type4, CurrentSpeed);\r
+    DisplayProcessorStatus (Struct->Type4->Status, Option);\r
+    DisplayProcessorUpgrade (Struct->Type4->ProcessorUpgrade, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type4, L1CacheHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type4, L2CacheHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type4, L3CacheHandle);\r
+    PRINT_PENDING_STRING (Struct, Type4, SerialNumber);\r
+    PRINT_PENDING_STRING (Struct, Type4, AssetTag);\r
+    PRINT_PENDING_STRING (Struct, Type4, PartNumber);\r
     if (SmbiosMajorVersion > 0x2 || (SmbiosMajorVersion == 0x2 && SmbiosMinorVersion >= 0x5)) {\r
     if (SmbiosMajorVersion > 0x2 || (SmbiosMajorVersion == 0x2 && SmbiosMinorVersion >= 0x5)) {\r
-      PrintStructValue (pStruct, Type4, CoreCount);\r
-      PrintStructValue (pStruct, Type4, EnabledCoreCount);\r
-      PrintStructValue (pStruct, Type4, ThreadCount);\r
-      PrintStructValueH (pStruct, Type4, ProcessorCharacteristics);\r
+      PRINT_STRUCT_VALUE (Struct, Type4, CoreCount);\r
+      PRINT_STRUCT_VALUE (Struct, Type4, EnabledCoreCount);\r
+      PRINT_STRUCT_VALUE (Struct, Type4, ThreadCount);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type4, ProcessorCharacteristics);\r
     }\r
     break;\r
 \r
     }\r
     break;\r
 \r
@@ -369,19 +353,19 @@ Returns:
   case 5:\r
     {\r
       UINT8 SlotNum;\r
   case 5:\r
     {\r
       UINT8 SlotNum;\r
-      SlotNum = pStruct->Type5->AssociatedMemorySlotNum;\r
+      SlotNum = Struct->Type5->AssociatedMemorySlotNum;\r
 \r
 \r
-      DisplayMcErrorDetectMethod (pStruct->Type5->ErrDetectMethod, Option);\r
-      DisplayMcErrorCorrectCapability (pStruct->Type5->ErrCorrectCapability, Option);\r
+      DisplayMcErrorDetectMethod (Struct->Type5->ErrDetectMethod, Option);\r
+      DisplayMcErrorCorrectCapability (Struct->Type5->ErrCorrectCapability, Option);\r
       ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRT), gShellDebug1HiiHandle);\r
       ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRT), gShellDebug1HiiHandle);\r
-      DisplayMcInterleaveSupport (pStruct->Type5->SupportInterleave, Option);\r
+      DisplayMcInterleaveSupport (Struct->Type5->SupportInterleave, Option);\r
       ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CURRENT), gShellDebug1HiiHandle);\r
       ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CURRENT), gShellDebug1HiiHandle);\r
-      DisplayMcInterleaveSupport (pStruct->Type5->CurrentInterleave, Option);\r
-      DisplayMaxMemoryModuleSize (pStruct->Type5->MaxMemoryModuleSize, SlotNum, Option);\r
-      DisplayMcMemorySpeeds (pStruct->Type5->SupportSpeed, Option);\r
-      DisplayMmMemoryType (pStruct->Type5->SupportMemoryType, Option);\r
-      DisplayMemoryModuleVoltage (pStruct->Type5->MemoryModuleVoltage, Option);\r
-      PrintStructValue (pStruct, Type5, AssociatedMemorySlotNum);\r
+      DisplayMcInterleaveSupport (Struct->Type5->CurrentInterleave, Option);\r
+      DisplayMaxMemoryModuleSize (Struct->Type5->MaxMemoryModuleSize, SlotNum, Option);\r
+      DisplayMcMemorySpeeds (Struct->Type5->SupportSpeed, Option);\r
+      DisplayMmMemoryType (Struct->Type5->SupportMemoryType, Option);\r
+      DisplayMemoryModuleVoltage (Struct->Type5->MemoryModuleVoltage, Option);\r
+      PRINT_STRUCT_VALUE (Struct, Type5, AssociatedMemorySlotNum);\r
       //\r
       // According to SMBIOS Specification, offset 0x0F\r
       //\r
       //\r
       // According to SMBIOS Specification, offset 0x0F\r
       //\r
@@ -394,67 +378,67 @@ Returns:
   // Memory Module Information (Type 6)\r
   //\r
   case 6:\r
   // Memory Module Information (Type 6)\r
   //\r
   case 6:\r
-    PrintPendingString (pStruct, Type6, SocketDesignation);\r
-    DisplayMmBankConnections (pStruct->Type6->BankConnections, Option);\r
-    PrintStructValue (pStruct, Type6, CurrentSpeed);\r
-    DisplayMmMemoryType (pStruct->Type6->CurrentMemoryType, Option);\r
+    PRINT_PENDING_STRING (Struct, Type6, SocketDesignation);\r
+    DisplayMmBankConnections (Struct->Type6->BankConnections, Option);\r
+    PRINT_STRUCT_VALUE (Struct, Type6, CurrentSpeed);\r
+    DisplayMmMemoryType (Struct->Type6->CurrentMemoryType, Option);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INSTALLED), gShellDebug1HiiHandle);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INSTALLED), gShellDebug1HiiHandle);\r
-    DisplayMmMemorySize (pStruct->Type6->InstalledSize, Option);\r
+    DisplayMmMemorySize (Struct->Type6->InstalledSize, Option);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED), gShellDebug1HiiHandle);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED), gShellDebug1HiiHandle);\r
-    DisplayMmMemorySize (pStruct->Type6->EnabledSize, Option);\r
-    DisplayMmErrorStatus (pStruct->Type6->ErrorStatus, Option);\r
+    DisplayMmMemorySize (Struct->Type6->EnabledSize, Option);\r
+    DisplayMmErrorStatus (Struct->Type6->ErrorStatus, Option);\r
     break;\r
 \r
   //\r
   // Cache Information (Type 7)\r
   //\r
   case 7:\r
     break;\r
 \r
   //\r
   // Cache Information (Type 7)\r
   //\r
   case 7:\r
-    PrintPendingString (pStruct, Type7, SocketDesignation);\r
-    PrintStructValueH (pStruct, Type7, CacheConfiguration);\r
-    PrintStructValueH (pStruct, Type7, MaximumCacheSize);\r
-    PrintStructValueH (pStruct, Type7, InstalledSize);\r
-    PrintStructValueH (pStruct, Type7, SupportedSRAMType);\r
-    PrintStructValueH (pStruct, Type7, CurrentSRAMType);\r
-    DisplayCacheSRAMType (pStruct->Type7->CurrentSRAMType, Option);\r
-    PrintStructValueH (pStruct, Type7, CacheSpeed);\r
-    DisplayCacheErrCorrectingType (pStruct->Type7->ErrorCorrectionType, Option);\r
-    DisplayCacheSystemCacheType (pStruct->Type7->SystemCacheType, Option);\r
-    DisplayCacheAssociativity (pStruct->Type7->Associativity, Option);\r
+    PRINT_PENDING_STRING (Struct, Type7, SocketDesignation);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type7, CacheConfiguration);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type7, MaximumCacheSize);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type7, InstalledSize);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type7, SupportedSRAMType);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type7, CurrentSRAMType);\r
+    DisplayCacheSRAMType (Struct->Type7->CurrentSRAMType, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type7, CacheSpeed);\r
+    DisplayCacheErrCorrectingType (Struct->Type7->ErrorCorrectionType, Option);\r
+    DisplayCacheSystemCacheType (Struct->Type7->SystemCacheType, Option);\r
+    DisplayCacheAssociativity (Struct->Type7->Associativity, Option);\r
     break;\r
 \r
   //\r
   // Port Connector Information  (Type 8)\r
   //\r
   case 8:\r
     break;\r
 \r
   //\r
   // Port Connector Information  (Type 8)\r
   //\r
   case 8:\r
-    PrintPendingString (pStruct, Type8, InternalReferenceDesignator);\r
+    PRINT_PENDING_STRING (Struct, Type8, InternalReferenceDesignator);\r
     Print (L"Internal ");\r
     Print (L"Internal ");\r
-    DisplayPortConnectorType (pStruct->Type8->InternalConnectorType, Option);\r
-    PrintPendingString (pStruct, Type8, ExternalReferenceDesignator);\r
+    DisplayPortConnectorType (Struct->Type8->InternalConnectorType, Option);\r
+    PRINT_PENDING_STRING (Struct, Type8, ExternalReferenceDesignator);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EXTERNAL), gShellDebug1HiiHandle);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EXTERNAL), gShellDebug1HiiHandle);\r
-    DisplayPortConnectorType (pStruct->Type8->ExternalConnectorType, Option);\r
-    DisplayPortType (pStruct->Type8->PortType, Option);\r
+    DisplayPortConnectorType (Struct->Type8->ExternalConnectorType, Option);\r
+    DisplayPortType (Struct->Type8->PortType, Option);\r
     break;\r
 \r
   //\r
   // System Slots (Type 9)\r
   //\r
   case 9:\r
     break;\r
 \r
   //\r
   // System Slots (Type 9)\r
   //\r
   case 9:\r
-    PrintPendingString (pStruct, Type9, SlotDesignation);\r
-    DisplaySystemSlotType (pStruct->Type9->SlotType, Option);\r
-    DisplaySystemSlotDataBusWidth (pStruct->Type9->SlotDataBusWidth, Option);\r
-    DisplaySystemSlotCurrentUsage (pStruct->Type9->CurrentUsage, Option);\r
-    DisplaySystemSlotLength (pStruct->Type9->SlotLength, Option);\r
+    PRINT_PENDING_STRING (Struct, Type9, SlotDesignation);\r
+    DisplaySystemSlotType (Struct->Type9->SlotType, Option);\r
+    DisplaySystemSlotDataBusWidth (Struct->Type9->SlotDataBusWidth, Option);\r
+    DisplaySystemSlotCurrentUsage (Struct->Type9->CurrentUsage, Option);\r
+    DisplaySystemSlotLength (Struct->Type9->SlotLength, Option);\r
     DisplaySystemSlotId (\r
     DisplaySystemSlotId (\r
-      pStruct->Type9->SlotID,\r
-      pStruct->Type9->SlotType,\r
+      Struct->Type9->SlotID,\r
+      Struct->Type9->SlotType,\r
       Option\r
      );\r
       Option\r
      );\r
-    DisplaySlotCharacteristics1 (pStruct->Type9->SlotCharacteristics1, Option);\r
-    DisplaySlotCharacteristics2 (pStruct->Type9->SlotCharacteristics2, Option);\r
+    DisplaySlotCharacteristics1 (Struct->Type9->SlotCharacteristics1, Option);\r
+    DisplaySlotCharacteristics2 (Struct->Type9->SlotCharacteristics2, Option);\r
     if (SmbiosMajorVersion > 0x2 || (SmbiosMajorVersion == 0x2 && SmbiosMinorVersion >= 0x6)) {\r
     if (SmbiosMajorVersion > 0x2 || (SmbiosMajorVersion == 0x2 && SmbiosMinorVersion >= 0x6)) {\r
-      PrintStructValueH (pStruct, Type9, SegmentGroupNum);\r
-      PrintStructValueH (pStruct, Type9, BusNum);\r
-      PrintStructValueH (pStruct, Type9, DevFuncNum);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type9, SegmentGroupNum);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type9, BusNum);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type9, DevFuncNum);\r
     }\r
     break;\r
 \r
     }\r
     break;\r
 \r
@@ -464,40 +448,40 @@ Returns:
   case 10:\r
     {\r
       UINTN NumOfDevice;\r
   case 10:\r
     {\r
       UINTN NumOfDevice;\r
-      NumOfDevice = (pStruct->Type10->Hdr.Length - sizeof (SMBIOS_HEADER)) / (2 * sizeof (UINT8));\r
+      NumOfDevice = (Struct->Type10->Hdr.Length - sizeof (SMBIOS_HEADER)) / (2 * sizeof (UINT8));\r
       for (Index = 0; Index < NumOfDevice; Index++) {\r
       for (Index = 0; Index < NumOfDevice; Index++) {\r
-        DisplayOnboardDeviceTypes (pStruct->Type10->Device[Index].DeviceType, Option);\r
+        DisplayOnboardDeviceTypes (Struct->Type10->Device[Index].DeviceType, Option);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DESC_STRING), gShellDebug1HiiHandle);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DESC_STRING), gShellDebug1HiiHandle);\r
-        ShellPrintEx(-1,-1,L"%a",LibGetSmbiosString (pStruct, pStruct->Type10->Device[Index].DescriptionString));\r
+        ShellPrintEx(-1,-1,L"%a",LibGetSmbiosString (Struct, Struct->Type10->Device[Index].DescriptionString));\r
       }\r
     }\r
     break;\r
 \r
   case 11:\r
       }\r
     }\r
     break;\r
 \r
   case 11:\r
-    PrintStructValue (pStruct, Type11, StringCount);\r
-    for (Index = 1; Index <= pStruct->Type11->StringCount; Index++) {\r
-      ShellPrintEx(-1,-1,L"%a\n", LibGetSmbiosString (pStruct, Index));\r
+    PRINT_STRUCT_VALUE (Struct, Type11, StringCount);\r
+    for (Index = 1; Index <= Struct->Type11->StringCount; Index++) {\r
+      ShellPrintEx(-1,-1,L"%a\n", LibGetSmbiosString (Struct, Index));\r
     }\r
     break;\r
 \r
   case 12:\r
     }\r
     break;\r
 \r
   case 12:\r
-    PrintStructValue (pStruct, Type12, StringCount);\r
-    for (Index = 1; Index <= pStruct->Type12->StringCount; Index++) {\r
-      ShellPrintEx(-1,-1,L"%a\n", LibGetSmbiosString (pStruct, Index));\r
+    PRINT_STRUCT_VALUE (Struct, Type12, StringCount);\r
+    for (Index = 1; Index <= Struct->Type12->StringCount; Index++) {\r
+      ShellPrintEx(-1,-1,L"%a\n", LibGetSmbiosString (Struct, Index));\r
     }\r
     break;\r
 \r
   case 13:\r
     }\r
     break;\r
 \r
   case 13:\r
-    PrintStructValue (pStruct, Type13, InstallableLanguages);\r
-    PrintStructValue (pStruct, Type13, Flags);\r
-    PrintBitField (pStruct, Type13, reserved, 15);\r
-    PrintPendingString (pStruct, Type13, CurrentLanguages);\r
+    PRINT_STRUCT_VALUE (Struct, Type13, InstallableLanguages);\r
+    PRINT_STRUCT_VALUE (Struct, Type13, Flags);\r
+    PRINT_BIT_FIELD (Struct, Type13, Reserved, 15);\r
+    PRINT_PENDING_STRING (Struct, Type13, CurrentLanguages);\r
     break;\r
 \r
   case 14:\r
     break;\r
 \r
   case 14:\r
-    PrintPendingString (pStruct, Type14, GroupName);\r
-    PrintStructValue (pStruct, Type14, ItemType);\r
-    PrintStructValue (pStruct, Type14, ItemHandle);\r
+    PRINT_PENDING_STRING (Struct, Type14, GroupName);\r
+    PRINT_STRUCT_VALUE (Struct, Type14, ItemType);\r
+    PRINT_STRUCT_VALUE (Struct, Type14, ItemHandle);\r
     break;\r
 \r
   //\r
     break;\r
 \r
   //\r
@@ -509,20 +493,20 @@ Returns:
       UINT8         Count;\r
       UINT8         *AccessMethodAddress;\r
 \r
       UINT8         Count;\r
       UINT8         *AccessMethodAddress;\r
 \r
-      PrintStructValueH (pStruct, Type15, LogAreaLength);\r
-      PrintStructValueH (pStruct, Type15, LogHeaderStartOffset);\r
-      PrintStructValueH (pStruct, Type15, LogDataStartOffset);\r
-      DisplaySELAccessMethod (pStruct->Type15->AccessMethod, Option);\r
-      PrintStructValueH (pStruct, Type15, AccessMethodAddress);\r
-      DisplaySELLogStatus (pStruct->Type15->LogStatus, Option);\r
-      PrintStructValueH (pStruct, Type15, LogChangeToken);\r
-      DisplaySysEventLogHeaderFormat (pStruct->Type15->LogHeaderFormat, Option);\r
-      PrintStructValueH (pStruct, Type15, NumberOfSupportedLogTypeDescriptors);\r
-      PrintStructValueH (pStruct, Type15, LengthOfLogTypeDescriptor);\r
-\r
-      Count = pStruct->Type15->NumberOfSupportedLogTypeDescriptors;\r
+      PRINT_STRUCT_VALUE_H (Struct, Type15, LogAreaLength);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type15, LogHeaderStartOffset);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type15, LogDataStartOffset);\r
+      DisplaySELAccessMethod (Struct->Type15->AccessMethod, Option);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type15, AccessMethodAddress);\r
+      DisplaySELLogStatus (Struct->Type15->LogStatus, Option);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type15, LogChangeToken);\r
+      DisplaySysEventLogHeaderFormat (Struct->Type15->LogHeaderFormat, Option);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type15, NumberOfSupportedLogTypeDescriptors);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type15, LengthOfLogTypeDescriptor);\r
+\r
+      Count = Struct->Type15->NumberOfSupportedLogTypeDescriptors;\r
       if (Count > 0) {\r
       if (Count > 0) {\r
-        Ptr = pStruct->Type15->EventLogTypeDescriptors;\r
+        Ptr = Struct->Type15->EventLogTypeDescriptors;\r
 \r
         //\r
         // Display all Event Log type descriptors supported by system\r
 \r
         //\r
         // Display all Event Log type descriptors supported by system\r
@@ -534,9 +518,9 @@ Returns:
         }\r
 \r
         if (Option >= SHOW_DETAIL) {\r
         }\r
 \r
         if (Option >= SHOW_DETAIL) {\r
-          switch (pStruct->Type15->AccessMethod) {\r
+          switch (Struct->Type15->AccessMethod) {\r
           case 03:\r
           case 03:\r
-            AccessMethodAddress = (UINT8 *) (UINTN) (pStruct->Type15->AccessMethodAddress);\r
+            AccessMethodAddress = (UINT8 *) (UINTN) (Struct->Type15->AccessMethodAddress);\r
             break;\r
 \r
           case 00:\r
             break;\r
 \r
           case 00:\r
@@ -547,7 +531,7 @@ Returns:
             ShellPrintHiiEx(-1,-1,NULL,\r
               STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACCESS_METHOD_NOT_SUPOPRTED),\r
               gShellDebug1HiiHandle,\r
             ShellPrintHiiEx(-1,-1,NULL,\r
               STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACCESS_METHOD_NOT_SUPOPRTED),\r
               gShellDebug1HiiHandle,\r
-              pStruct->Type15->AccessMethod\r
+              Struct->Type15->AccessMethod\r
              );\r
             return EFI_UNSUPPORTED;\r
           }\r
              );\r
             return EFI_UNSUPPORTED;\r
           }\r
@@ -558,8 +542,8 @@ Returns:
           // of the event-log's header, from the Access Method Address\r
           //\r
           DisplaySysEventLogHeader (\r
           // of the event-log's header, from the Access Method Address\r
           //\r
           DisplaySysEventLogHeader (\r
-            pStruct->Type15->LogHeaderFormat,\r
-            AccessMethodAddress + pStruct->Type15->LogHeaderStartOffset\r
+            Struct->Type15->LogHeaderFormat,\r
+            AccessMethodAddress + Struct->Type15->LogHeaderStartOffset\r
            );\r
 \r
           //\r
            );\r
 \r
           //\r
@@ -569,11 +553,11 @@ Returns:
           // of the event-log's first data byte, from the Access Method Address(0x14)\r
           //\r
           DisplaySysEventLogData (\r
           // of the event-log's first data byte, from the Access Method Address(0x14)\r
           //\r
           DisplaySysEventLogData (\r
-            AccessMethodAddress + pStruct->Type15->LogDataStartOffset,\r
+            AccessMethodAddress + Struct->Type15->LogDataStartOffset,\r
             (UINT16)\r
             (\r
             (UINT16)\r
             (\r
-            pStruct->Type15->LogAreaLength -\r
-            (pStruct->Type15->LogDataStartOffset - pStruct->Type15->LogDataStartOffset)\r
+            Struct->Type15->LogAreaLength -\r
+            (Struct->Type15->LogDataStartOffset - Struct->Type15->LogDataStartOffset)\r
            )\r
            );\r
         }\r
            )\r
            );\r
         }\r
@@ -586,39 +570,39 @@ Returns:
   // Physical Memory Array (Type 16)\r
   //\r
   case 16:\r
   // Physical Memory Array (Type 16)\r
   //\r
   case 16:\r
-    DisplayPMALocation (pStruct->Type16->Location, Option);\r
-    DisplayPMAUse (pStruct->Type16->Use, Option);\r
+    DisplayPMALocation (Struct->Type16->Location, Option);\r
+    DisplayPMAUse (Struct->Type16->Use, Option);\r
     DisplayPMAErrorCorrectionTypes (\r
     DisplayPMAErrorCorrectionTypes (\r
-      pStruct->Type16->MemoryErrorCorrection,\r
+      Struct->Type16->MemoryErrorCorrection,\r
       Option\r
      );\r
       Option\r
      );\r
-    PrintStructValueH (pStruct, Type16, MaximumCapacity);\r
-    PrintStructValueH (pStruct, Type16, MemoryErrorInformationHandle);\r
-    PrintStructValueH (pStruct, Type16, NumberOfMemoryDevices);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type16, MaximumCapacity);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type16, MemoryErrorInformationHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type16, NumberOfMemoryDevices);\r
     break;\r
 \r
   //\r
   // Memory Device (Type 17)\r
   //\r
   case 17:\r
     break;\r
 \r
   //\r
   // Memory Device (Type 17)\r
   //\r
   case 17:\r
-    PrintStructValueH (pStruct, Type17, MemoryArrayHandle);\r
-    PrintStructValueH (pStruct, Type17, MemoryErrorInformationHandle);\r
-    PrintStructValue (pStruct, Type17, TotalWidth);\r
-    PrintStructValue (pStruct, Type17, DataWidth);\r
-    PrintStructValue (pStruct, Type17, Size);\r
-    DisplayMemoryDeviceFormFactor (pStruct->Type17->FormFactor, Option);\r
-    PrintStructValueH (pStruct, Type17, DeviceSet);\r
-    PrintPendingString (pStruct, Type17, DeviceLocator);\r
-    PrintPendingString (pStruct, Type17, BankLocator);\r
-    DisplayMemoryDeviceType (pStruct->Type17->MemoryType, Option);\r
-    DisplayMemoryDeviceTypeDetail (pStruct->Type17->TypeDetail, Option);\r
-    PrintStructValueH (pStruct, Type17, Speed);\r
-    PrintPendingString (pStruct, Type17, Manufacturer);\r
-    PrintPendingString (pStruct, Type17, SerialNumber);\r
-    PrintPendingString (pStruct, Type17, AssetTag);\r
-    PrintPendingString (pStruct, Type17, PartNumber);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryArrayHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryErrorInformationHandle);\r
+    PRINT_STRUCT_VALUE (Struct, Type17, TotalWidth);\r
+    PRINT_STRUCT_VALUE (Struct, Type17, DataWidth);\r
+    PRINT_STRUCT_VALUE (Struct, Type17, Size);\r
+    DisplayMemoryDeviceFormFactor (Struct->Type17->FormFactor, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type17, DeviceSet);\r
+    PRINT_PENDING_STRING (Struct, Type17, DeviceLocator);\r
+    PRINT_PENDING_STRING (Struct, Type17, BankLocator);\r
+    DisplayMemoryDeviceType (Struct->Type17->MemoryType, Option);\r
+    DisplayMemoryDeviceTypeDetail (Struct->Type17->TypeDetail, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type17, Speed);\r
+    PRINT_PENDING_STRING (Struct, Type17, Manufacturer);\r
+    PRINT_PENDING_STRING (Struct, Type17, SerialNumber);\r
+    PRINT_PENDING_STRING (Struct, Type17, AssetTag);\r
+    PRINT_PENDING_STRING (Struct, Type17, PartNumber);\r
     if (SmbiosMajorVersion > 0x2 || (SmbiosMajorVersion == 0x2 && SmbiosMinorVersion >= 0x6)) {\r
     if (SmbiosMajorVersion > 0x2 || (SmbiosMajorVersion == 0x2 && SmbiosMinorVersion >= 0x6)) {\r
-      PrintStructValueH (pStruct, Type17, Attributes);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type17, Attributes);\r
     }\r
     break;\r
 \r
     }\r
     break;\r
 \r
@@ -626,154 +610,154 @@ Returns:
   // 32-bit Memory Error Information (Type 18)\r
   //\r
   case 18:\r
   // 32-bit Memory Error Information (Type 18)\r
   //\r
   case 18:\r
-    DisplayMemoryErrorType (pStruct->Type18->ErrorType, Option);\r
+    DisplayMemoryErrorType (Struct->Type18->ErrorType, Option);\r
     DisplayMemoryErrorGranularity (\r
     DisplayMemoryErrorGranularity (\r
-      pStruct->Type18->ErrorGranularity,\r
+      Struct->Type18->ErrorGranularity,\r
       Option\r
      );\r
       Option\r
      );\r
-    DisplayMemoryErrorOperation (pStruct->Type18->ErrorOperation, Option);\r
-    PrintStructValueH (pStruct, Type18, VendorSyndrome);\r
-    PrintStructValueH (pStruct, Type18, MemoryArrayErrorAddress);\r
-    PrintStructValueH (pStruct, Type18, DeviceErrorAddress);\r
-    PrintStructValueH (pStruct, Type18, ErrorResolution);\r
+    DisplayMemoryErrorOperation (Struct->Type18->ErrorOperation, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type18, VendorSyndrome);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type18, MemoryArrayErrorAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type18, DeviceErrorAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type18, ErrorResolution);\r
     break;\r
 \r
   //\r
   // Memory Array Mapped Address (Type 19)\r
   //\r
   case 19:\r
     break;\r
 \r
   //\r
   // Memory Array Mapped Address (Type 19)\r
   //\r
   case 19:\r
-    PrintStructValueH (pStruct, Type19, StartingAddress);\r
-    PrintStructValueH (pStruct, Type19, EndingAddress);\r
-    PrintStructValueH (pStruct, Type19, MemoryArrayHandle);\r
-    PrintStructValueH (pStruct, Type19, PartitionWidth);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type19, StartingAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type19, EndingAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type19, MemoryArrayHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type19, PartitionWidth);\r
     break;\r
 \r
   //\r
   // Memory Device Mapped Address  (Type 20)\r
   //\r
   case 20:\r
     break;\r
 \r
   //\r
   // Memory Device Mapped Address  (Type 20)\r
   //\r
   case 20:\r
-    PrintStructValueH (pStruct, Type20, StartingAddress);\r
-    PrintStructValueH (pStruct, Type20, EndingAddress);\r
-    PrintStructValueH (pStruct, Type20, MemoryDeviceHandle);\r
-    PrintStructValueH (pStruct, Type20, MemoryArrayMappedAddressHandle);\r
-    PrintStructValueH (pStruct, Type20, PartitionRowPosition);\r
-    PrintStructValueH (pStruct, Type20, InterleavePosition);\r
-    PrintStructValueH (pStruct, Type20, InterleavedDataDepth);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type20, StartingAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type20, EndingAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type20, MemoryDeviceHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type20, MemoryArrayMappedAddressHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type20, PartitionRowPosition);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type20, InterleavePosition);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type20, InterleavedDataDepth);\r
     break;\r
 \r
   //\r
   // Built-in Pointing Device  (Type 21)\r
   //\r
   case 21:\r
     break;\r
 \r
   //\r
   // Built-in Pointing Device  (Type 21)\r
   //\r
   case 21:\r
-    DisplayPointingDeviceType (pStruct->Type21->Type, Option);\r
-    DisplayPointingDeviceInterface (pStruct->Type21->Interface, Option);\r
-    PrintStructValue (pStruct, Type21, NumberOfButtons);\r
+    DisplayPointingDeviceType (Struct->Type21->Type, Option);\r
+    DisplayPointingDeviceInterface (Struct->Type21->Interface, Option);\r
+    PRINT_STRUCT_VALUE (Struct, Type21, NumberOfButtons);\r
     break;\r
 \r
   //\r
   // Portable Battery  (Type 22)\r
   //\r
   case 22:\r
     break;\r
 \r
   //\r
   // Portable Battery  (Type 22)\r
   //\r
   case 22:\r
-    PrintPendingString (pStruct, Type22, Location);\r
-    PrintPendingString (pStruct, Type22, Manufacturer);\r
-    PrintPendingString (pStruct, Type22, ManufactureDate);\r
-    PrintPendingString (pStruct, Type22, SerialNumber);\r
-    PrintPendingString (pStruct, Type22, DeviceName);\r
+    PRINT_PENDING_STRING (Struct, Type22, Location);\r
+    PRINT_PENDING_STRING (Struct, Type22, Manufacturer);\r
+    PRINT_PENDING_STRING (Struct, Type22, ManufactureDate);\r
+    PRINT_PENDING_STRING (Struct, Type22, SerialNumber);\r
+    PRINT_PENDING_STRING (Struct, Type22, DeviceName);\r
     DisplayPBDeviceChemistry (\r
     DisplayPBDeviceChemistry (\r
-      pStruct->Type22->DeviceChemistry,\r
+      Struct->Type22->DeviceChemistry,\r
       Option\r
      );\r
       Option\r
      );\r
-    PrintStructValueH (pStruct, Type22, DeviceCapacity);\r
-    PrintStructValueH (pStruct, Type22, DesignVoltage);\r
-    PrintPendingString (pStruct, Type22, SBDSVersionNumber);\r
-    PrintStructValueH (pStruct, Type22, MaximumErrorInBatteryData);\r
-    PrintStructValueH (pStruct, Type22, SBDSSerialNumber);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type22, DeviceCapacity);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type22, DesignVoltage);\r
+    PRINT_PENDING_STRING (Struct, Type22, SBDSVersionNumber);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type22, MaximumErrorInBatteryData);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type22, SBDSSerialNumber);\r
     DisplaySBDSManufactureDate (\r
     DisplaySBDSManufactureDate (\r
-      pStruct->Type22->SBDSManufactureDate,\r
+      Struct->Type22->SBDSManufactureDate,\r
       Option\r
      );\r
       Option\r
      );\r
-    PrintPendingString (pStruct, Type22, SBDSDeviceChemistry);\r
-    PrintStructValueH (pStruct, Type22, DesignCapacityMultiplier);\r
-    PrintStructValueH (pStruct, Type22, OEMSpecific);\r
+    PRINT_PENDING_STRING (Struct, Type22, SBDSDeviceChemistry);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type22, DesignCapacityMultiplier);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type22, OEMSpecific);\r
     break;\r
 \r
   case 23:\r
     DisplaySystemResetCapabilities (\r
     break;\r
 \r
   case 23:\r
     DisplaySystemResetCapabilities (\r
-      pStruct->Type23->Capabilities,\r
+      Struct->Type23->Capabilities,\r
       Option\r
      );\r
       Option\r
      );\r
-    PrintStructValueH (pStruct, Type23, ResetCount);\r
-    PrintStructValueH (pStruct, Type23, ResetLimit);\r
-    PrintStructValueH (pStruct, Type23, TimerInterval);\r
-    PrintStructValueH (pStruct, Type23, Timeout);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type23, ResetCount);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type23, ResetLimit);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type23, TimerInterval);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type23, Timeout);\r
     break;\r
 \r
   case 24:\r
     DisplayHardwareSecuritySettings (\r
     break;\r
 \r
   case 24:\r
     DisplayHardwareSecuritySettings (\r
-      pStruct->Type24->HardwareSecuritySettings,\r
+      Struct->Type24->HardwareSecuritySettings,\r
       Option\r
      );\r
     break;\r
 \r
   case 25:\r
       Option\r
      );\r
     break;\r
 \r
   case 25:\r
-    PrintStructValueH (pStruct, Type25, NextScheduledPowerOnMonth);\r
-    PrintStructValueH (pStruct, Type25, NextScheduledPowerOnDayOfMonth);\r
-    PrintStructValueH (pStruct, Type25, NextScheduledPowerOnHour);\r
-    PrintStructValueH (pStruct, Type25, NextScheduledPowerOnMinute);\r
-    PrintStructValueH (pStruct, Type25, NextScheduledPowerOnSecond);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnMonth);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnDayOfMonth);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnHour);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnMinute);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnSecond);\r
     break;\r
 \r
   case 26:\r
     break;\r
 \r
   case 26:\r
-    PrintPendingString (pStruct, Type26, Description);\r
-    DisplayVPLocation (pStruct->Type26->LocationAndStatus, Option);\r
-    DisplayVPStatus (pStruct->Type26->LocationAndStatus, Option);\r
-    PrintStructValueH (pStruct, Type26, MaximumValue);\r
-    PrintStructValueH (pStruct, Type26, MinimumValue);\r
-    PrintStructValueH (pStruct, Type26, Resolution);\r
-    PrintStructValueH (pStruct, Type26, Tolerance);\r
-    PrintStructValueH (pStruct, Type26, Accuracy);\r
-    PrintStructValueH (pStruct, Type26, OEMDefined);\r
-    PrintStructValueH (pStruct, Type26, NominalValue);\r
+    PRINT_PENDING_STRING (Struct, Type26, Description);\r
+    DisplayVPLocation (Struct->Type26->LocationAndStatus, Option);\r
+    DisplayVPStatus (Struct->Type26->LocationAndStatus, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type26, MaximumValue);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type26, MinimumValue);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type26, Resolution);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type26, Tolerance);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type26, Accuracy);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type26, OEMDefined);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type26, NominalValue);\r
     break;\r
 \r
   case 27:\r
     break;\r
 \r
   case 27:\r
-    PrintStructValueH (pStruct, Type27, TemperatureProbeHandle);\r
-    DisplayCoolingDeviceStatus (pStruct->Type27->DeviceTypeAndStatus, Option);\r
-    DisplayCoolingDeviceType (pStruct->Type27->DeviceTypeAndStatus, Option);\r
-    PrintStructValueH (pStruct, Type27, CoolingUnitGroup);\r
-    PrintStructValueH (pStruct, Type27, OEMDefined);\r
-    PrintStructValueH (pStruct, Type27, NominalSpeed);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type27, TemperatureProbeHandle);\r
+    DisplayCoolingDeviceStatus (Struct->Type27->DeviceTypeAndStatus, Option);\r
+    DisplayCoolingDeviceType (Struct->Type27->DeviceTypeAndStatus, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type27, CoolingUnitGroup);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type27, OEMDefined);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type27, NominalSpeed);\r
     break;\r
 \r
   case 28:\r
     break;\r
 \r
   case 28:\r
-    PrintPendingString (pStruct, Type28, Description);\r
-    DisplayTemperatureProbeStatus (pStruct->Type28->LocationAndStatus, Option);\r
-    DisplayTemperatureProbeLoc (pStruct->Type28->LocationAndStatus, Option);\r
-    PrintStructValueH (pStruct, Type28, MaximumValue);\r
-    PrintStructValueH (pStruct, Type28, MinimumValue);\r
-    PrintStructValueH (pStruct, Type28, Resolution);\r
-    PrintStructValueH (pStruct, Type28, Tolerance);\r
-    PrintStructValueH (pStruct, Type28, Accuracy);\r
-    PrintStructValueH (pStruct, Type28, OEMDefined);\r
-    PrintStructValueH (pStruct, Type28, NominalValue);\r
+    PRINT_PENDING_STRING (Struct, Type28, Description);\r
+    DisplayTemperatureProbeStatus (Struct->Type28->LocationAndStatus, Option);\r
+    DisplayTemperatureProbeLoc (Struct->Type28->LocationAndStatus, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type28, MaximumValue);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type28, MinimumValue);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type28, Resolution);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type28, Tolerance);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type28, Accuracy);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type28, OEMDefined);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type28, NominalValue);\r
     break;\r
 \r
   case 29:\r
     break;\r
 \r
   case 29:\r
-    PrintPendingString (pStruct, Type29, Description);\r
-    DisplayECPStatus (pStruct->Type29->LocationAndStatus, Option);\r
-    DisplayECPLoc (pStruct->Type29->LocationAndStatus, Option);\r
-    PrintStructValueH (pStruct, Type29, MaximumValue);\r
-    PrintStructValueH (pStruct, Type29, MinimumValue);\r
-    PrintStructValueH (pStruct, Type29, Resolution);\r
-    PrintStructValueH (pStruct, Type29, Tolerance);\r
-    PrintStructValueH (pStruct, Type29, Accuracy);\r
-    PrintStructValueH (pStruct, Type29, OEMDefined);\r
-    PrintStructValueH (pStruct, Type29, NominalValue);\r
+    PRINT_PENDING_STRING (Struct, Type29, Description);\r
+    DisplayECPStatus (Struct->Type29->LocationAndStatus, Option);\r
+    DisplayECPLoc (Struct->Type29->LocationAndStatus, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type29, MaximumValue);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type29, MinimumValue);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type29, Resolution);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type29, Tolerance);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type29, Accuracy);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type29, OEMDefined);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type29, NominalValue);\r
     break;\r
 \r
   case 30:\r
     break;\r
 \r
   case 30:\r
-    PrintPendingString (pStruct, Type30, ManufacturerName);\r
-    DisplayOBRAConnections (pStruct->Type30->Connections, Option);\r
+    PRINT_PENDING_STRING (Struct, Type30, ManufacturerName);\r
+    DisplayOBRAConnections (Struct->Type30->Connections, Option);\r
     break;\r
 \r
   case 31:\r
     break;\r
 \r
   case 31:\r
@@ -781,47 +765,47 @@ Returns:
     break;\r
 \r
   case 32:\r
     break;\r
 \r
   case 32:\r
-    PrintBitField (pStruct, Type32, Reserved, 6);\r
-    DisplaySystemBootStatus (pStruct->Type32->BootStatus[0], Option);\r
+    PRINT_BIT_FIELD (Struct, Type32, Reserved, 6);\r
+    DisplaySystemBootStatus (Struct->Type32->BootStatus[0], Option);\r
     break;\r
 \r
   case 33:\r
     break;\r
 \r
   case 33:\r
-    DisplayMemoryErrorType (pStruct->Type33->ErrorType, Option);\r
+    DisplayMemoryErrorType (Struct->Type33->ErrorType, Option);\r
     DisplayMemoryErrorGranularity (\r
     DisplayMemoryErrorGranularity (\r
-      pStruct->Type33->ErrorGranularity,\r
+      Struct->Type33->ErrorGranularity,\r
       Option\r
      );\r
       Option\r
      );\r
-    DisplayMemoryErrorOperation (pStruct->Type33->ErrorOperation, Option);\r
-    PrintStructValueH (pStruct, Type33, VendorSyndrome);\r
-    PrintStructValueH (pStruct, Type33, MemoryArrayErrorAddress);\r
-    PrintStructValueH (pStruct, Type33, DeviceErrorAddress);\r
-    PrintStructValueH (pStruct, Type33, ErrorResolution);\r
+    DisplayMemoryErrorOperation (Struct->Type33->ErrorOperation, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type33, VendorSyndrome);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type33, MemoryArrayErrorAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type33, DeviceErrorAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type33, ErrorResolution);\r
     break;\r
 \r
   //\r
   // Management Device  (Type 34)\r
   //\r
   case 34:\r
     break;\r
 \r
   //\r
   // Management Device  (Type 34)\r
   //\r
   case 34:\r
-    PrintPendingString (pStruct, Type34, Description);\r
-    DisplayMDType (pStruct->Type34->Type, Option);\r
-    PrintStructValueH (pStruct, Type34, Address);\r
-    PrintStructValueH (pStruct, Type34, AddressType);\r
+    PRINT_PENDING_STRING (Struct, Type34, Description);\r
+    DisplayMDType (Struct->Type34->Type, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type34, Address);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type34, AddressType);\r
     break;\r
 \r
   case 35:\r
     break;\r
 \r
   case 35:\r
-    PrintPendingString (pStruct, Type35, Description);\r
-    PrintStructValueH (pStruct, Type35, ManagementDeviceHandle);\r
-    PrintStructValueH (pStruct, Type35, ComponentHandle);\r
-    PrintStructValueH (pStruct, Type35, ThresholdHandle);\r
+    PRINT_PENDING_STRING (Struct, Type35, Description);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type35, ManagementDeviceHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type35, ComponentHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type35, ThresholdHandle);\r
     break;\r
 \r
   case 36:\r
     break;\r
 \r
   case 36:\r
-    PrintStructValueH (pStruct, Type36, LowerThresholdNonCritical);\r
-    PrintStructValueH (pStruct, Type36, UpperThresholdNonCritical);\r
-    PrintStructValueH (pStruct, Type36, LowerThresholdCritical);\r
-    PrintStructValueH (pStruct, Type36, UpperThresholdCritical);\r
-    PrintStructValueH (pStruct, Type36, LowerThresholdNonRecoverable);\r
-    PrintStructValueH (pStruct, Type36, UpperThresholdNonRecoverable);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdNonCritical);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdNonCritical);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdCritical);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdCritical);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdNonRecoverable);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdNonRecoverable);\r
     break;\r
 \r
   //\r
     break;\r
 \r
   //\r
@@ -831,12 +815,12 @@ Returns:
     {\r
       UINT8         Count;\r
       MEMORYDEVICE  *Ptr;\r
     {\r
       UINT8         Count;\r
       MEMORYDEVICE  *Ptr;\r
-      DisplayMemoryChannelType (pStruct->Type37->ChannelType, Option);\r
-      PrintStructValueH (pStruct, Type37, MaximumChannelLoad);\r
-      PrintStructValueH (pStruct, Type37, MemoryDeviceCount);\r
+      DisplayMemoryChannelType (Struct->Type37->ChannelType, Option);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type37, MaximumChannelLoad);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type37, MemoryDeviceCount);\r
 \r
 \r
-      Count = pStruct->Type37->MemoryDeviceCount;\r
-      Ptr   = pStruct->Type37->MemoryDevice;\r
+      Count = Struct->Type37->MemoryDeviceCount;\r
+      Ptr   = Struct->Type37->MemoryDevice;\r
       for (Index = 0; Index < Count; Index++) {\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_DEVICE), gShellDebug1HiiHandle, Index + 1);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_LOAD), gShellDebug1HiiHandle, Ptr->DeviceLoad);\r
       for (Index = 0; Index < Count; Index++) {\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_DEVICE), gShellDebug1HiiHandle, Index + 1);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_LOAD), gShellDebug1HiiHandle, Ptr->DeviceLoad);\r
@@ -849,33 +833,33 @@ Returns:
   // IPMI Device Information  (Type 38)\r
   //\r
   case 38:\r
   // IPMI Device Information  (Type 38)\r
   //\r
   case 38:\r
-    DisplayIPMIDIBMCInterfaceType (pStruct->Type38->InterfaceType, Option);\r
-    PrintStructValueH (pStruct, Type38, IPMISpecificationRevision);\r
-    PrintStructValueH (pStruct, Type38, I2CSlaveAddress);\r
-    PrintStructValueH (pStruct, Type38, NVStorageDeviceAddress);\r
-    PrintStructValueH (pStruct, Type38, BaseAddress);\r
+    DisplayIPMIDIBMCInterfaceType (Struct->Type38->InterfaceType, Option);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type38, IPMISpecificationRevision);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type38, I2CSlaveAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type38, NVStorageDeviceAddress);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type38, BaseAddress);\r
     break;\r
 \r
   //\r
   // System Power Supply (Type 39)\r
   //\r
   case 39:\r
     break;\r
 \r
   //\r
   // System Power Supply (Type 39)\r
   //\r
   case 39:\r
-    PrintStructValueH (pStruct, Type39, PowerUnitGroup);\r
-    PrintPendingString (pStruct, Type39, Location);\r
-    PrintPendingString (pStruct, Type39, DeviceName);\r
-    PrintPendingString (pStruct, Type39, Manufacturer);\r
-    PrintPendingString (pStruct, Type39, SerialNumber);\r
-    PrintPendingString (pStruct, Type39, AssetTagNumber);\r
-    PrintPendingString (pStruct, Type39, ModelPartNumber);\r
-    PrintPendingString (pStruct, Type39, RevisionLevel);\r
-    PrintStructValueH (pStruct, Type39, MaxPowerCapacity);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type39, PowerUnitGroup);\r
+    PRINT_PENDING_STRING (Struct, Type39, Location);\r
+    PRINT_PENDING_STRING (Struct, Type39, DeviceName);\r
+    PRINT_PENDING_STRING (Struct, Type39, Manufacturer);\r
+    PRINT_PENDING_STRING (Struct, Type39, SerialNumber);\r
+    PRINT_PENDING_STRING (Struct, Type39, AssetTagNumber);\r
+    PRINT_PENDING_STRING (Struct, Type39, ModelPartNumber);\r
+    PRINT_PENDING_STRING (Struct, Type39, RevisionLevel);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type39, MaxPowerCapacity);\r
     DisplaySPSCharacteristics (\r
     DisplaySPSCharacteristics (\r
-      pStruct->Type39->PowerSupplyCharacteristics,\r
+      Struct->Type39->PowerSupplyCharacteristics,\r
       Option\r
      );\r
       Option\r
      );\r
-    PrintStructValueH (pStruct, Type39, InputVoltageProbeHandle);\r
-    PrintStructValueH (pStruct, Type39, CoolingDeviceHandle);\r
-    PrintStructValueH (pStruct, Type39, InputCurrentProbeHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type39, InputVoltageProbeHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type39, CoolingDeviceHandle);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type39, InputCurrentProbeHandle);\r
     break;\r
 \r
   //\r
     break;\r
 \r
   //\r
@@ -888,18 +872,18 @@ Returns:
       ADDITIONAL_INFORMATION_ENTRY   *Entries;\r
 \r
       EntryLength     = 0;\r
       ADDITIONAL_INFORMATION_ENTRY   *Entries;\r
 \r
       EntryLength     = 0;\r
-      Entries         = pStruct->Type40->AdditionalInfoEntries;\r
-      NumberOfEntries = pStruct->Type40->NumberOfAdditionalInformationEntries;\r
+      Entries         = Struct->Type40->AdditionalInfoEntries;\r
+      NumberOfEntries = Struct->Type40->NumberOfAdditionalInformationEntries;\r
 \r
 \r
-      PrintStructValueH (pStruct, Type40, NumberOfAdditionalInformationEntries);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type40, NumberOfAdditionalInformationEntries);\r
 \r
       for (Index = 0; Index < NumberOfEntries; Index++) {\r
         EntryLength = Entries->EntryLength;\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTRYLEN), gShellDebug1HiiHandle, EntryLength);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDHANDLE), gShellDebug1HiiHandle, Entries->ReferencedHandle);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDOFFSET), gShellDebug1HiiHandle, Entries->ReferencedOffset);\r
 \r
       for (Index = 0; Index < NumberOfEntries; Index++) {\r
         EntryLength = Entries->EntryLength;\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTRYLEN), gShellDebug1HiiHandle, EntryLength);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDHANDLE), gShellDebug1HiiHandle, Entries->ReferencedHandle);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDOFFSET), gShellDebug1HiiHandle, Entries->ReferencedOffset);\r
-        PrintSmbiosString (pStruct, Entries->EntryString, String);\r
-        PrintSmbiosBitField (pStruct, Entries->Value, Value, EntryLength - 5);\r
+        PRINT_SMBIOS_STRING (Struct, Entries->EntryString, String);\r
+        PRINT_SMBIOS_BIT_FIELD (Struct, Entries->Value, Value, EntryLength - 5);\r
         Entries = (ADDITIONAL_INFORMATION_ENTRY *) ((UINT8 *)Entries + EntryLength);\r
       }\r
     }\r
         Entries = (ADDITIONAL_INFORMATION_ENTRY *) ((UINT8 *)Entries + EntryLength);\r
       }\r
     }\r
@@ -909,12 +893,12 @@ Returns:
   // Onboard Devices Extended Information (Type 41)\r
   //\r
   case 41:\r
   // Onboard Devices Extended Information (Type 41)\r
   //\r
   case 41:\r
-    PrintPendingString (pStruct, Type41, ReferenceDesignation);\r
-    PrintStructValueH (pStruct, Type41, DeviceType);\r
-    PrintStructValueH (pStruct, Type41, DeviceTypeInstance);\r
-    PrintStructValueH (pStruct, Type41, SegmentGroupNum);\r
-    PrintStructValueH (pStruct, Type41, BusNum);\r
-    PrintStructValueH (pStruct, Type41, DevFuncNum);\r
+    PRINT_PENDING_STRING (Struct, Type41, ReferenceDesignation);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type41, DeviceType);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type41, DeviceTypeInstance);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type41, SegmentGroupNum);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type41, BusNum);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type41, DevFuncNum);\r
     break;\r
 \r
   case 126:\r
     break;\r
 \r
   case 126:\r
@@ -933,10 +917,16 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Display BIOS Information (Type 0) information.\r
+\r
+  @param[in] Chara    The information bits.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristics (\r
 VOID\r
 DisplayBiosCharacteristics (\r
-  UINT64  chara,\r
-  UINT8   Option\r
+  IN UINT64  Chara,\r
+  IN UINT8   Option\r
   )\r
 {\r
   //\r
   )\r
 {\r
   //\r
@@ -946,199 +936,211 @@ DisplayBiosCharacteristics (
   //\r
   // print option\r
   //\r
   //\r
   // print option\r
   //\r
-  PRINT_INFO_OPTION (chara, Option);\r
+  PRINT_INFO_OPTION (Chara, Option);\r
 \r
   //\r
   // Check all the bits and print information\r
   // This function does not use Table because table of bits\r
   //   are designed not to deal with UINT64\r
   //\r
 \r
   //\r
   // Check all the bits and print information\r
   // This function does not use Table because table of bits\r
   //   are designed not to deal with UINT64\r
   //\r
-  if (BIT (chara, 0) != 0) {\r
+  if (BIT (Chara, 0) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 1) != 0) {\r
+  if (BIT (Chara, 1) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 2) != 0) {\r
+  if (BIT (Chara, 2) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN_BIT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN_BIT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 3) != 0) {\r
+  if (BIT (Chara, 3) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_NOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_NOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 4) != 0) {\r
+  if (BIT (Chara, 4) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ISA_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ISA_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 5) != 0) {\r
+  if (BIT (Chara, 5) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MSA_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MSA_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 6) != 0) {\r
+  if (BIT (Chara, 6) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EISA_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EISA_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 7) != 0) {\r
+  if (BIT (Chara, 7) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PCI_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PCI_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 8) != 0) {\r
+  if (BIT (Chara, 8) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PC_CARD_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PC_CARD_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 9) != 0) {\r
+  if (BIT (Chara, 9) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PLUG_PLAY_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PLUG_PLAY_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 10) != 0) {\r
+  if (BIT (Chara, 10) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_APM_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_APM_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 11) != 0) {\r
+  if (BIT (Chara, 11) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_UPGRADEABLE), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_UPGRADEABLE), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 12) != 0) {\r
+  if (BIT (Chara, 12) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SHADOWING), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SHADOWING), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 13) != 0) {\r
+  if (BIT (Chara, 13) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VESA_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VESA_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 14) != 0) {\r
+  if (BIT (Chara, 14) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ECSD_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ECSD_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 15) != 0) {\r
+  if (BIT (Chara, 15) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FORM_CD_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FORM_CD_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 16) != 0) {\r
+  if (BIT (Chara, 16) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 17) != 0) {\r
+  if (BIT (Chara, 17) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 18) != 0) {\r
+  if (BIT (Chara, 18) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 19) != 0) {\r
+  if (BIT (Chara, 19) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 20) != 0) {\r
+  if (BIT (Chara, 20) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_NEC), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_NEC), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 21) != 0) {\r
+  if (BIT (Chara, 21) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_TOSHIBA), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_TOSHIBA), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 22) != 0) {\r
+  if (BIT (Chara, 22) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FLOPPY_SERVICES_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FLOPPY_SERVICES_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 23) != 0) {\r
+  if (BIT (Chara, 23) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_POINT_TWO_MB), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_POINT_TWO_MB), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 24) != 0) {\r
+  if (BIT (Chara, 24) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_720_KB), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_720_KB), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 25) != 0) {\r
+  if (BIT (Chara, 25) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TWO_POINT_EIGHT_EIGHT_MB), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TWO_POINT_EIGHT_EIGHT_MB), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 26) != 0) {\r
+  if (BIT (Chara, 26) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINT_SCREEN_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINT_SCREEN_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 27) != 0) {\r
+  if (BIT (Chara, 27) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_SERV_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_SERV_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 28) != 0) {\r
+  if (BIT (Chara, 28) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SERIAL_SERVICES_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SERIAL_SERVICES_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 29) != 0) {\r
+  if (BIT (Chara, 29) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINTER_SERVICES_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINTER_SERVICES_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 30) != 0) {\r
+  if (BIT (Chara, 30) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONO_VIDEO_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONO_VIDEO_SUPPORT), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (chara, 31) != 0) {\r
+  if (BIT (Chara, 31) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NEC_PC_98), gShellDebug1HiiHandle);\r
   }\r
   //\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NEC_PC_98), gShellDebug1HiiHandle);\r
   }\r
   //\r
-  // Just print the reserved\r
+  // Just print the Reserved\r
   //\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_32_47), gShellDebug1HiiHandle);\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_48_64), gShellDebug1HiiHandle);\r
 }\r
 \r
   //\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_32_47), gShellDebug1HiiHandle);\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_48_64), gShellDebug1HiiHandle);\r
 }\r
 \r
+/**\r
+  Display Bios Characteristice extensions1 information.\r
+\r
+  @param[in] Byte1    The information.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristicsExt1 (\r
 VOID\r
 DisplayBiosCharacteristicsExt1 (\r
-  UINT8 byte1,\r
-  UINT8 Option\r
+  IN UINT8 Byte1,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION), gShellDebug1HiiHandle);\r
   //\r
   // Print option\r
   //\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION), gShellDebug1HiiHandle);\r
   //\r
   // Print option\r
   //\r
-  PRINT_INFO_OPTION (byte1, Option);\r
+  PRINT_INFO_OPTION (Byte1, Option);\r
 \r
   //\r
   // check bit and print\r
   //\r
 \r
   //\r
   // check bit and print\r
   //\r
-  if (BIT (byte1, 0) != 0) {\r
+  if (BIT (Byte1, 0) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACPI_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACPI_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (byte1, 1) != 0) {\r
+  if (BIT (Byte1, 1) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USB_LEGACY_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USB_LEGACY_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (byte1, 2) != 0) {\r
+  if (BIT (Byte1, 2) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AGP_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AGP_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (byte1, 3) != 0) {\r
+  if (BIT (Byte1, 3) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_I2O_BOOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_I2O_BOOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (byte1, 4) != 0) {\r
+  if (BIT (Byte1, 4) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LS_120_BOOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LS_120_BOOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (byte1, 5) != 0) {\r
+  if (BIT (Byte1, 5) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ATAPI_ZIP_DRIVE), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ATAPI_ZIP_DRIVE), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (byte1, 6) != 0) {\r
+  if (BIT (Byte1, 6) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_1394_BOOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_1394_BOOT_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 \r
-  if (BIT (byte1, 7) != 0) {\r
+  if (BIT (Byte1, 7) != 0) {\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMART_BATTERY_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 }\r
 \r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMART_BATTERY_SUPPORTED), gShellDebug1HiiHandle);\r
   }\r
 }\r
 \r
+/**\r
+  Display Bios Characteristice extensions2 information.\r
+\r
+  @param[in] byte2    The information.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristicsExt2 (\r
 VOID\r
 DisplayBiosCharacteristicsExt2 (\r
-  UINT8 byte2,\r
-  UINT8 Option\r
+  IN UINT8 byte2,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION_2), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION_2), gShellDebug1HiiHandle);\r
@@ -1158,6 +1160,12 @@ DisplayBiosCharacteristicsExt2 (
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle);\r
 }\r
 \r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle);\r
 }\r
 \r
+/**\r
+  Display Processor Information (Type 4) information.\r
+\r
+  @param[in] Family       The family value.\r
+  @param[in] Option       The option value.\r
+**/\r
 VOID\r
 DisplayProcessorFamily (\r
   UINT8 Family,\r
 VOID\r
 DisplayProcessorFamily (\r
   UINT8 Family,\r
@@ -1723,10 +1731,16 @@ DisplayProcessorFamily (
   //\r
 }\r
 \r
   //\r
 }\r
 \r
+/**\r
+  Display processor family information.\r
+\r
+  @param[in] Family2      The family value.\r
+  @param[in] Option       The option value.\r
+**/\r
 VOID\r
 DisplayProcessorFamily2 (\r
 VOID\r
 DisplayProcessorFamily2 (\r
-  UINT16 Family2,\r
-  UINT8  Option\r
+  IN UINT16 Family2,\r
+  IN UINT8  Option\r
   )\r
 {\r
   //\r
   )\r
 {\r
   //\r
@@ -1789,36 +1803,33 @@ DisplayProcessorFamily2 (
 \r
 }\r
 \r
 \r
 }\r
 \r
+/**\r
+  Display processor voltage information.\r
+\r
+  @param[in] Voltage      The Voltage.\r
+                      Bit 7 Set to 0, indicating 'legacy' mode for processor voltage\r
+                      Bits 6:4  Reserved, must be zero\r
+                      Bits 3:0  Voltage Capability.\r
+                                A Set bit indicates that the voltage is supported.\r
+                        Bit 0 - 5V\r
+                        Bit 1 - 3.3V\r
+                        Bit 2 - 2.9V\r
+                        Bit 3 - Reserved, must be zero.\r
+\r
+                      Note:\r
+                        Setting of multiple bits indicates the socket is configurable\r
+                        If bit 7 is set to 1, the remaining seven bits of the field are set to\r
+                        contain the processor's current voltage times 10.\r
+                        For example, the field value for a processor voltage of 1.8 volts would be\r
+                        92h = 80h + (1.8 * 10) = 80h + 18 = 80h +12h.\r
+\r
+  @param[in] Option       The option.\r
+**/\r
 VOID\r
 DisplayProcessorVoltage (\r
 VOID\r
 DisplayProcessorVoltage (\r
-  UINT8 Voltage,\r
-  UINT8 Option\r
+  IN UINT8 Voltage,\r
+  IN UINT8 Option\r
   )\r
   )\r
-/*++\r
-Routine Description:\r
-  Bit 7 Set to 0, indicating 'legacy' mode for processor voltage\r
-  Bits 6:4  Reserved, must be zero\r
-  Bits 3:0  Voltage Capability.\r
-            A Set bit indicates that the voltage is supported.\r
-    Bit 0 - 5V\r
-    Bit 1 - 3.3V\r
-    Bit 2 - 2.9V\r
-    Bit 3 - Reserved, must be zero.\r
-\r
-  Note:\r
-    Setting of multiple bits indicates the socket is configurable\r
-    If bit 7 is set to 1, the remaining seven bits of the field are set to\r
-    contain the processor's current voltage times 10.\r
-    For example, the field value for a processor voltage of 1.8 volts would be\r
-    92h = 80h + (1.8 * 10) = 80h + 18 = 80h +12h.\r
-\r
-Arguments:\r
-  Voltage  - The Voltage\r
-  Option   - The option\r
-\r
-Returns:\r
-\r
-**/\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_INFO), gShellDebug1HiiHandle);\r
   //\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_INFO), gShellDebug1HiiHandle);\r
   //\r
@@ -1861,35 +1872,31 @@ Returns:
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Display processor information.\r
+\r
+  @param[in] Status   The status.\r
+                        Bit 7 Reserved, must be 0\r
+                        Bit 6   CPU Socket Populated\r
+                         1 - CPU Socket Populated\r
+                         0 - CPU Socket UnpopulatedBits\r
+                         5:3  Reserved, must be zero\r
+                         Bits 2:0 CPU Status\r
+                          0h - Unknown\r
+                          1h - CPU Enabled\r
+                          2h - CPU Disabled by User via BIOS Setup\r
+                          3h - CPU Disabled By BIOS (POST Error)\r
+                          4h - CPU is Idle, waiting to be enabled.\r
+                          5-6h - Reserved\r
+                          7h - Other\r
+\r
+  @param[in] Option   The option\r
+**/\r
 VOID\r
 DisplayProcessorStatus (\r
 VOID\r
 DisplayProcessorStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
   )\r
   )\r
-/*++\r
-Routine Description:\r
-\r
-Bit 7 Reserved, must be 0\r
-Bit 6   CPU Socket Populated\r
- 1 - CPU Socket Populated\r
- 0 - CPU Socket UnpopulatedBits\r
- 5:3  Reserved, must be zero\r
- Bits 2:0 CPU Status\r
-  0h - Unknown\r
-  1h - CPU Enabled\r
-  2h - CPU Disabled by User via BIOS Setup\r
-  3h - CPU Disabled By BIOS (POST Error)\r
-  4h - CPU is Idle, waiting to be enabled.\r
-  5-6h - Reserved\r
-  7h - Other\r
-\r
-Arguments:\r
-  Status  - The status\r
-  Option  - The option\r
-\r
-Returns:\r
-\r
-**/\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_STATUS), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Status, Option);\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_STATUS), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Status, Option);\r
@@ -1944,11 +1951,18 @@ Returns:
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Display information about Memory Controller Information (Type 5).\r
+\r
+  @param[in] Size     Memory size.\r
+  @param[in] SlotNum  Which slot is this about.\r
+  @param[in] Option   Option for the level of detail output required.\r
+**/\r
 VOID\r
 DisplayMaxMemoryModuleSize (\r
 VOID\r
 DisplayMaxMemoryModuleSize (\r
-  UINT8 Size,\r
-  UINT8 SlotNum,\r
-  UINT8 Option\r
+  IN UINT8 Size,\r
+  IN UINT8 SlotNum,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINTN MaxSize;\r
   )\r
 {\r
   UINTN MaxSize;\r
@@ -1965,11 +1979,18 @@ DisplayMaxMemoryModuleSize (
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Display information about memory configuration handles.\r
+\r
+  @param[in] Handles  The buffer of handles to output info on.\r
+  @param[in] SlotNum  The number of handles in the above buffer.\r
+  @param[in] Option   Option for the level of detail output required.\r
+**/\r
 VOID\r
 DisplayMemoryModuleConfigHandles (\r
 VOID\r
 DisplayMemoryModuleConfigHandles (\r
-  UINT16 *Handles,\r
-  UINT8  SlotNum,\r
-  UINT8  Option\r
+  IN UINT16 *Handles,\r
+  IN UINT8  SlotNum,\r
+  IN UINT8  Option\r
   )\r
 {\r
   UINT8 Index;\r
   )\r
 {\r
   UINT8 Index;\r
@@ -1989,13 +2010,17 @@ DisplayMemoryModuleConfigHandles (
     }\r
   }\r
 }\r
     }\r
   }\r
 }\r
-//\r
-// Memory Module Information (Type 6)\r
-//\r
+\r
+/**\r
+  Display Memory Module Information (Type 6).\r
+\r
+  @param[in] BankConnections\r
+  @param[in] Option\r
+**/\r
 VOID\r
 DisplayMmBankConnections (\r
 VOID\r
 DisplayMmBankConnections (\r
-  UINT8 BankConnections,\r
-  UINT8 Option\r
+  IN UINT8 BankConnections,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8 High;\r
   )\r
 {\r
   UINT8 High;\r
@@ -2027,13 +2052,9 @@ DisplayMmBankConnections (
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-VOID\r
-DisplayMmMemorySize (\r
-  UINT8 Size,\r
-  UINT8 Option\r
-  )\r
-/*++\r
-Routine Description:\r
+/**\r
+  Display memory informcation.\r
+\r
   Bits 0:6  Size (n),\r
       where 2**n is the size in MB with three special-case values:\r
       7Dh Not determinable (Installed Size only)\r
   Bits 0:6  Size (n),\r
       where 2**n is the size in MB with three special-case values:\r
       7Dh Not determinable (Installed Size only)\r
@@ -2042,13 +2063,14 @@ Routine Description:
   Bit  7  Defines whether the memory module has a single- (0)\r
           or double-bank (1) connection.\r
 \r
   Bit  7  Defines whether the memory module has a single- (0)\r
           or double-bank (1) connection.\r
 \r
-Arguments:\r
-  Size   - The size\r
-  Option - The option\r
-\r
-Returns:\r
-\r
+  @param[in] Size   - The size\r
+  @param[in] Option - The option\r
 **/\r
 **/\r
+VOID\r
+DisplayMmMemorySize (\r
+  IN UINT8 Size,\r
+  IN UINT8 Option\r
+  )\r
 {\r
   UINT8 Value;\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEMORY_SIZE), gShellDebug1HiiHandle);\r
 {\r
   UINT8 Value;\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEMORY_SIZE), gShellDebug1HiiHandle);\r
@@ -2078,28 +2100,21 @@ Returns:
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-VOID\r
-DisplaySystemSlotId (\r
-  UINT16  SlotId,\r
-  UINT8   SlotType,\r
-  UINT8   Option\r
-  )\r
-/*++\r
-Routine Description:\r
-\r
+/**\r
   The Slot ID field of the System Slot structure provides a mechanism to\r
   correlate the physical attributes of the slot to its logical access method\r
   (which varies based on the Slot Type field).\r
 \r
   The Slot ID field of the System Slot structure provides a mechanism to\r
   correlate the physical attributes of the slot to its logical access method\r
   (which varies based on the Slot Type field).\r
 \r
-Arguments:\r
-\r
-  SlotId   - The slot ID\r
-  SlotType - The slot type\r
-  Option   - The Option\r
-\r
-Returns:\r
-\r
+  @param[in] SlotId   - The slot ID\r
+  @param[in] SlotType - The slot type\r
+  @param[in] Option   - The Option\r
 **/\r
 **/\r
+VOID\r
+DisplaySystemSlotId (\r
+  IN UINT16  SlotId,\r
+  IN UINT8   SlotType,\r
+  IN UINT8   Option\r
+  )\r
 {\r
   //\r
   // Display slot type first\r
 {\r
   //\r
   // Display slot type first\r
@@ -2167,10 +2182,16 @@ Returns:
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Display System Boot Information (Type 32) information.\r
+\r
+  @param[in] Parameter      The parameter.\r
+  @param[in] Option         The options.\r
+**/\r
 VOID\r
 DisplaySystemBootStatus (\r
 VOID\r
 DisplaySystemBootStatus (\r
-  UINT8 Parameter,\r
-  UINT8 Option\r
+  IN UINT8 Parameter,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_BOOT_STATUS), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_BOOT_STATUS), gShellDebug1HiiHandle);\r
@@ -2210,16 +2231,10 @@ DisplaySystemBootStatus (
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_VALUE), gShellDebug1HiiHandle);\r
   }\r
 }\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_VALUE), gShellDebug1HiiHandle);\r
   }\r
 }\r
-//\r
-// Portable Battery (Type 22)\r
-//\r
-VOID\r
-DisplaySBDSManufactureDate (\r
-  UINT16  Date,\r
-  UINT8   Option\r
-  )\r
-/*++\r
-Routine Description:\r
+\r
+/**\r
+  Display Portable Battery (Type 22) information.\r
+\r
   The date the cell pack was manufactured, in packed format:\r
    Bits 15:9  Year, biased by 1980, in the range 0 to 127.\r
    Bits 8:5 Month, in the range 1 to 12.\r
   The date the cell pack was manufactured, in packed format:\r
    Bits 15:9  Year, biased by 1980, in the range 0 to 127.\r
    Bits 8:5 Month, in the range 1 to 12.\r
@@ -2227,13 +2242,14 @@ Routine Description:
   For example, 01 February 2000 would be identified as\r
   0010 1000 0100 0001b (0x2841).\r
 \r
   For example, 01 February 2000 would be identified as\r
   0010 1000 0100 0001b (0x2841).\r
 \r
-Arguments:\r
-  Date   - The date\r
-  Option - The option\r
-\r
-Returns:\r
-\r
+  @param[in] Date     The date\r
+  @param[in] Option   The option\r
 **/\r
 **/\r
+VOID\r
+DisplaySBDSManufactureDate (\r
+  IN UINT16  Date,\r
+  IN UINT8   Option\r
+  )\r
 {\r
   UINTN Day;\r
   UINTN Month;\r
 {\r
   UINTN Day;\r
   UINTN Month;\r
@@ -2250,41 +2266,37 @@ Returns:
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONTH_DAY_YEAR), gShellDebug1HiiHandle, Day, Month, Year);\r
 \r
 }\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONTH_DAY_YEAR), gShellDebug1HiiHandle, Day, Month, Year);\r
 \r
 }\r
-//\r
-// System Reset  (Type 23)\r
-//\r
+\r
+/**\r
+  Display System Reset  (Type 23) information.\r
+\r
+  \r
+  Identifies the system-reset capabilities for the system.\r
+   Bits 7:6 Reserved for future assignment via this specification, set to 00b.\r
+   Bit 5  System contains a watchdog timer, either True (1) or False (0).\r
+   Bits 4:3 Boot Option on Limit.\r
+    Identifies the system action to be taken when the Reset Limit is reached, one of:\r
+    00b Reserved, do not use.\r
+    01b Operating system\r
+    10b System utilities\r
+    11b Do not rebootBits\r
+   2:1  Boot Option.  Indicates the action to be taken following a watchdog reset, one of:\r
+    00b Reserved, do not use.\r
+    01b Operating system\r
+    10b System utilities\r
+    11b Do not reboot\r
+   Bit 0  Status.\r
+    1b The system reset is enabled by the user\r
+    0b The system reset is not enabled by the user\r
+\r
+  @param[in] Reset   Reset\r
+  @param[in] Option  The option\r
+**/\r
 VOID\r
 DisplaySystemResetCapabilities (\r
 VOID\r
 DisplaySystemResetCapabilities (\r
-  UINT8 Reset,\r
-  UINT8 Option\r
+  IN UINT8 Reset,\r
+  IN UINT8 Option\r
   )\r
   )\r
-/*++\r
-Routine Description:\r
-Identifies the system-reset capabilities for the system.\r
- Bits 7:6 Reserved for future assignment via this specification, set to 00b.\r
- Bit 5  System contains a watchdog timer, either True (1) or False (0).\r
- Bits 4:3 Boot Option on Limit.\r
-  Identifies the system action to be taken when the Reset Limit is reached, one of:\r
-  00b Reserved, do not use.\r
-  01b Operating system\r
-  10b System utilities\r
-  11b Do not rebootBits\r
- 2:1  Boot Option.  Indicates the action to be taken following a watchdog reset, one of:\r
-  00b Reserved, do not use.\r
-  01b Operating system\r
-  10b System utilities\r
-  11b Do not reboot\r
- Bit 0  Status.\r
-  1b The system reset is enabled by the user\r
-  0b The system reset is not enabled by the user\r
-\r
-Arguments:\r
-  Reset   - Reset\r
-  Option  - The option\r
-\r
-Returns:\r
-\r
-**/\r
 {\r
   UINTN Temp;\r
 \r
 {\r
   UINTN Temp;\r
 \r
@@ -2358,46 +2370,42 @@ Returns:
     Print (L"The system reset is disabled by the user\n");\r
   }\r
 }\r
     Print (L"The system reset is disabled by the user\n");\r
   }\r
 }\r
-//\r
-// Hardware Security (Type 24)\r
-//\r
+\r
+/**\r
+  Display Hardware Security (Type 24) information.\r
+\r
+    \r
+    Identifies the password and reset status for the system:\r
+\r
+    Bits 7:6    Power-on Password Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 5:4    Keyboard Password Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 3:2    Administrator Password Status, one  of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 1:0    Front Panel Reset Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+\r
+  @param[in] Settings The device settings.\r
+  @param[in] Option   The device options.\r
+**/\r
 VOID\r
 DisplayHardwareSecuritySettings (\r
 VOID\r
 DisplayHardwareSecuritySettings (\r
-  UINT8 Settings,\r
-  UINT8 Option\r
+  IN UINT8 Settings,\r
+  IN UINT8 Option\r
   )\r
   )\r
-/*++\r
-Routine Description:\r
-Identifies the password and reset status for the system:\r
-\r
-Bits 7:6    Power-on Password Status, one of:\r
-  00b Disabled\r
-  01b Enabled\r
-  10b Not Implemented\r
-  11b Unknown\r
-Bits 5:4    Keyboard Password Status, one of:\r
-  00b Disabled\r
-  01b Enabled\r
-  10b Not Implemented\r
-  11b Unknown\r
-Bits 3:2    Administrator Password Status, one  of:\r
-  00b Disabled\r
-  01b Enabled\r
-  10b Not Implemented\r
-  11b Unknown\r
-Bits 1:0    Front Panel Reset Status, one of:\r
-  00b Disabled\r
-  01b Enabled\r
-  10b Not Implemented\r
-  11b Unknown\r
-\r
-Arguments:\r
-  Settings    - The settings\r
-  Option      - the option\r
-\r
-Returns:\r
-\r
-**/\r
 {\r
   UINTN Temp;\r
 \r
 {\r
   UINTN Temp;\r
 \r
@@ -2493,13 +2501,17 @@ Returns:
     break;\r
   }\r
 }\r
     break;\r
   }\r
 }\r
-//\r
-// Out-of-Band Remote Access (Type 30)\r
-//\r
+\r
+/**\r
+  Display Out-of-Band Remote Access (Type 30) information.\r
+\r
+  @param[in] Connections        The device characteristics.\r
+  @param[in] Option             The device options.\r
+**/\r
 VOID\r
 DisplayOBRAConnections (\r
 VOID\r
 DisplayOBRAConnections (\r
-  UINT8   Connections,\r
-  UINT8   Option\r
+  IN UINT8   Connections,\r
+  IN UINT8   Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CONNECTIONS), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CONNECTIONS), gShellDebug1HiiHandle);\r
@@ -2528,13 +2540,17 @@ DisplayOBRAConnections (
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INBOUND_CONN_DISABLED), gShellDebug1HiiHandle);\r
   }\r
 }\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INBOUND_CONN_DISABLED), gShellDebug1HiiHandle);\r
   }\r
 }\r
-//\r
-// System Power Supply (Type 39)\r
-//\r
+\r
+/**\r
+  Display System Power Supply (Type 39) information.\r
+\r
+  @param[in] Characteristics    The device characteristics.\r
+  @param[in] Option             The device options.\r
+**/\r
 VOID\r
 DisplaySPSCharacteristics (\r
 VOID\r
 DisplaySPSCharacteristics (\r
-  UINT16  Characteristics,\r
-  UINT8   Option\r
+  IN UINT16  Characteristics,\r
+  IN UINT8   Option\r
   )\r
 {\r
   UINTN Temp;\r
   )\r
 {\r
   UINTN Temp;\r
index a6c8ef6ba8d771e931b3d449e24a356a7684d72a..d9bf3b687de070defbc16029ab471363479be1b4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Module to clarify the element info of the smbios structure.\r
 \r
 /** @file\r
   Module to clarify the element info of the smbios structure.\r
 \r
-  Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   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 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#ifndef _SMBIOS_PRINT_INFO_H\r
-#define _SMBIOS_PRINT_INFO_H\r
+#ifndef _SMBIOS_PRINT_INFO_H_\r
+#define _SMBIOS_PRINT_INFO_H_\r
 \r
 #include "LibSmbios.h"\r
 \r
 \r
 #include "LibSmbios.h"\r
 \r
@@ -34,159 +34,344 @@ extern UINT8  SmbiosMinorVersion;
 #define AS_UINT32(pData)  (*((UINT32 *) pData))\r
 #define AS_UINT64(pData)  (*((UINT64 *) pData))\r
 \r
 #define AS_UINT32(pData)  (*((UINT32 *) pData))\r
 #define AS_UINT64(pData)  (*((UINT64 *) pData))\r
 \r
+/**\r
+  Print the info of EPS(Entry Point Structure).\r
+\r
+  @param[in] SmbiosTable    Pointer to the SMBIOS table entry point.\r
+  @param[in] Option         Display option.\r
+**/\r
 VOID\r
 SmbiosPrintEPSInfo (\r
 VOID\r
 SmbiosPrintEPSInfo (\r
-  IN  SMBIOS_STRUCTURE_TABLE  *pSmbiosTable,\r
+  IN  SMBIOS_STRUCTURE_TABLE  *SmbiosTable,\r
   IN  UINT8                   Option\r
   );\r
 \r
   IN  UINT8                   Option\r
   );\r
 \r
+/**\r
+  This function print the content of the structure pointed by Struct.\r
+\r
+  @param[in] Struct       Point to the structure to be printed.\r
+  @param[in] Option       Print option of information detail.\r
+\r
+  @retval EFI_SUCCESS               Successfully Printing this function.\r
+  @retval EFI_INVALID_PARAMETER     Invalid Structure.\r
+  @retval EFI_UNSUPPORTED           Unsupported.\r
+**/\r
 EFI_STATUS\r
 SmbiosPrintStructure (\r
 EFI_STATUS\r
 SmbiosPrintStructure (\r
-  IN  SMBIOS_STRUCTURE_POINTER  *pStruct,\r
+  IN  SMBIOS_STRUCTURE_POINTER  *Struct,\r
   IN  UINT8                     Option\r
   );\r
 \r
   IN  UINT8                     Option\r
   );\r
 \r
-//\r
-// BIOS Information (Type 0)\r
-//\r
+/**\r
+  Display BIOS Information (Type 0) information.\r
+\r
+  @param[in] Chara    The information bits.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristics (\r
 VOID\r
 DisplayBiosCharacteristics (\r
-  UINT64  chara,\r
-  UINT8   Option\r
+  IN UINT64  Chara,\r
+  IN UINT8   Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Bios Characteristice extensions1 information.\r
+\r
+  @param[in] Byte1    The information.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristicsExt1 (\r
 VOID\r
 DisplayBiosCharacteristicsExt1 (\r
-  UINT8 byte1,\r
-  UINT8 Option\r
+  IN UINT8 Byte1,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Bios Characteristice extensions2 information.\r
+\r
+  @param[in] Byte2    The information.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristicsExt2 (\r
 VOID\r
 DisplayBiosCharacteristicsExt2 (\r
-  UINT8 byte2,\r
-  UINT8 Option\r
+  IN UINT8 Byte2,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Processor Information (Type 4)\r
-//\r
+/**\r
+  Display Processor Information (Type 4) information.\r
+\r
+  @param[in] Family       The family value.\r
+  @param[in] Option       The option value.\r
+**/\r
 VOID\r
 DisplayProcessorFamily (\r
   UINT8 Family,\r
   UINT8 Option\r
   );\r
 \r
 VOID\r
 DisplayProcessorFamily (\r
   UINT8 Family,\r
   UINT8 Option\r
   );\r
 \r
+/**\r
+  Display processor family information.\r
+\r
+  @param[in] Family2      The family value.\r
+  @param[in] Option       The option value.\r
+**/\r
 VOID\r
 DisplayProcessorFamily2 (\r
 VOID\r
 DisplayProcessorFamily2 (\r
-  UINT16 Family2,\r
-  UINT8  Option\r
+  IN UINT16 Family2,\r
+  IN UINT8  Option\r
   );\r
 \r
   );\r
 \r
+/**\r
+  Display processor voltage information.\r
+\r
+  @param[in] Voltage      The Voltage.\r
+                      Bit 7 Set to 0, indicating 'legacy' mode for processor voltage\r
+                      Bits 6:4  Reserved, must be zero\r
+                      Bits 3:0  Voltage Capability.\r
+                                A Set bit indicates that the voltage is supported.\r
+                        Bit 0 - 5V\r
+                        Bit 1 - 3.3V\r
+                        Bit 2 - 2.9V\r
+                        Bit 3 - Reserved, must be zero.\r
+\r
+                      Note:\r
+                        Setting of multiple bits indicates the socket is configurable\r
+                        If bit 7 is set to 1, the remaining seven bits of the field are set to\r
+                        contain the processor's current voltage times 10.\r
+                        For example, the field value for a processor voltage of 1.8 volts would be\r
+                        92h = 80h + (1.8 * 10) = 80h + 18 = 80h +12h.\r
+\r
+  @param[in] Option       The option.\r
+**/\r
 VOID\r
 DisplayProcessorVoltage (\r
 VOID\r
 DisplayProcessorVoltage (\r
-  UINT8 Voltage,\r
-  UINT8 Option\r
+  IN UINT8 Voltage,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display processor information.\r
+\r
+  @param[in] Status   The status.\r
+                        Bit 7 Reserved, must be 0\r
+                        Bit 6   CPU Socket Populated\r
+                         1 - CPU Socket Populated\r
+                         0 - CPU Socket UnpopulatedBits\r
+                         5:3  Reserved, must be zero\r
+                         Bits 2:0 CPU Status\r
+                          0h - Unknown\r
+                          1h - CPU Enabled\r
+                          2h - CPU Disabled by User via BIOS Setup\r
+                          3h - CPU Disabled By BIOS (POST Error)\r
+                          4h - CPU is Idle, waiting to be enabled.\r
+                          5-6h - Reserved\r
+                          7h - Other\r
+\r
+  @param[in] Option   The option\r
+**/\r
 VOID\r
 DisplayProcessorStatus (\r
 VOID\r
 DisplayProcessorStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Memory Controller Information (Type 5)\r
-//\r
+/**\r
+  Display information about Memory Controller Information (Type 5).\r
+\r
+  @param[in] Size     Memory size.\r
+  @param[in] SlotNum  Which slot is this about.\r
+  @param[in] Option   Option for the level of detail output required.\r
+**/\r
 VOID\r
 DisplayMaxMemoryModuleSize (\r
 VOID\r
 DisplayMaxMemoryModuleSize (\r
-  UINT8 Size,\r
-  UINT8 SlotNum,\r
-  UINT8 Option\r
+  IN UINT8 Size,\r
+  IN UINT8 SlotNum,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display information about memory configuration handles.\r
+\r
+  @param[in] Handles  The buffer of handles to output info on.\r
+  @param[in] SlotNum  The number of handles in the above buffer.\r
+  @param[in] Option   Option for the level of detail output required.\r
+**/\r
 VOID\r
 DisplayMemoryModuleConfigHandles (\r
 VOID\r
 DisplayMemoryModuleConfigHandles (\r
-  UINT16  *pHandles,\r
-  UINT8   SlotNum,\r
-  UINT8   Option\r
+  IN UINT16 *Handles,\r
+  IN UINT8  SlotNum,\r
+  IN UINT8  Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Memory Module Information (Type 6)\r
-//\r
+/**\r
+  Display Memory Module Information (Type 6).\r
+\r
+  @param[in] BankConnections\r
+  @param[in] Option\r
+**/\r
 VOID\r
 DisplayMmBankConnections (\r
 VOID\r
 DisplayMmBankConnections (\r
-  UINT8 BankConnections,\r
-  UINT8 Option\r
+  IN UINT8 BankConnections,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display memory informcation.\r
+\r
+  Bits 0:6  Size (n),\r
+      where 2**n is the size in MB with three special-case values:\r
+      7Dh Not determinable (Installed Size only)\r
+      7Eh Module is installed, but no memory has been enabled\r
+      7Fh Not installed\r
+  Bit  7  Defines whether the memory module has a single- (0)\r
+          or double-bank (1) connection.\r
+\r
+  @param[in] Size   - The size\r
+  @param[in] Option - The option\r
+**/\r
 VOID\r
 DisplayMmMemorySize (\r
 VOID\r
 DisplayMmMemorySize (\r
-  UINT8 Size,\r
-  UINT8 Option\r
+  IN UINT8 Size,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// System Slots (Type 9)\r
-//\r
+/**\r
+  The Slot ID field of the System Slot structure provides a mechanism to\r
+  correlate the physical attributes of the slot to its logical access method\r
+  (which varies based on the Slot Type field).\r
+\r
+  @param[in] SlotId   - The slot ID\r
+  @param[in] SlotType - The slot type\r
+  @param[in] Option   - The Option\r
+**/\r
 VOID\r
 DisplaySystemSlotId (\r
 VOID\r
 DisplaySystemSlotId (\r
-  UINT16  SlotId,\r
-  UINT8   SlotType,\r
-  UINT8   Option\r
+  IN UINT16  SlotId,\r
+  IN UINT8   SlotType,\r
+  IN UINT8   Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Physical Memory Array (Type 16)\r
-// Memory Device (Type 17)\r
-// Memory Array Mapped Address (Type 19)\r
-// Memory Device Mapped Address (Type 20)\r
-// Portable Battery (Type 22)\r
-//\r
+/**\r
+  Display Portable Battery (Type 22) information.\r
+\r
+  The date the cell pack was manufactured, in packed format:\r
+   Bits 15:9  Year, biased by 1980, in the range 0 to 127.\r
+   Bits 8:5 Month, in the range 1 to 12.\r
+   Bits 4:0 Date, in the range 1 to 31.\r
+  For example, 01 February 2000 would be identified as\r
+  0010 1000 0100 0001b (0x2841).\r
+\r
+  @param[in] Date     The date\r
+  @param[in] Option   The option\r
+**/\r
 VOID\r
 DisplaySBDSManufactureDate (\r
 VOID\r
 DisplaySBDSManufactureDate (\r
-  UINT16  Date,\r
-  UINT8   Option\r
+  IN UINT16  Date,\r
+  IN UINT8   Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// System Reset  (Type 23)\r
-//\r
+/**\r
+  Display System Reset  (Type 23) information.\r
+\r
+  Routine Description:\r
+  Identifies the system-reset capabilities for the system.\r
+   Bits 7:6 Reserved for future assignment via this specification, set to 00b.\r
+   Bit 5  System contains a watchdog timer, either True (1) or False (0).\r
+   Bits 4:3 Boot Option on Limit.\r
+    Identifies the system action to be taken when the Reset Limit is reached, one of:\r
+    00b Reserved, do not use.\r
+    01b Operating system\r
+    10b System utilities\r
+    11b Do not rebootBits\r
+   2:1  Boot Option.  Indicates the action to be taken following a watchdog reset, one of:\r
+    00b Reserved, do not use.\r
+    01b Operating system\r
+    10b System utilities\r
+    11b Do not reboot\r
+   Bit 0  Status.\r
+    1b The system reset is enabled by the user\r
+    0b The system reset is not enabled by the user\r
+\r
+  @param[in] Reset   Reset\r
+  @param[in] Option  The option\r
+**/\r
 VOID\r
 DisplaySystemResetCapabilities (\r
 VOID\r
 DisplaySystemResetCapabilities (\r
-  UINT8 Reset,\r
-  UINT8 Option\r
+  IN UINT8 Reset,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Hardware Security (Type 24)\r
-//\r
+/**\r
+  Display Hardware Security (Type 24) information.\r
+\r
+    Routine Description:\r
+    Identifies the password and reset status for the system:\r
+\r
+    Bits 7:6    Power-on Password Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 5:4    Keyboard Password Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 3:2    Administrator Password Status, one  of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 1:0    Front Panel Reset Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+\r
+  @param[in] Settings The device settings.\r
+  @param[in] Option   The device options.\r
+**/\r
 VOID\r
 DisplayHardwareSecuritySettings (\r
 VOID\r
 DisplayHardwareSecuritySettings (\r
-  UINT8 Settings,\r
-  UINT8 Option\r
+  IN UINT8 Settings,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Out-of-Band Remote Access (Type 30)\r
-//\r
+/**\r
+  Display Out-of-Band Remote Access (Type 30) information.\r
+\r
+  @param[in] Connections        The device characteristics.\r
+  @param[in] Option             The device options.\r
+**/\r
 VOID\r
 DisplayOBRAConnections (\r
 VOID\r
 DisplayOBRAConnections (\r
-  UINT8   Connections,\r
-  UINT8   Option\r
+  IN UINT8   Connections,\r
+  IN UINT8   Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// System Boot Information (Type 32)\r
-//\r
+/**\r
+  Display System Boot Information (Type 32) information.\r
+\r
+  @param[in] Parameter      The parameter.\r
+  @param[in] Option         The options.\r
+**/\r
 VOID\r
 DisplaySystemBootStatus (\r
 VOID\r
 DisplaySystemBootStatus (\r
-  UINT8 Parameter,\r
-  UINT8 Option\r
+  IN UINT8 Parameter,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// System Power Supply (Type 39)\r
-//\r
+/**\r
+  Display System Power Supply (Type 39) information.\r
+\r
+  @param[in] Characteristics    The device characteristics.\r
+  @param[in] Option             The device options.\r
+**/\r
 VOID\r
 DisplaySPSCharacteristics (\r
 VOID\r
 DisplaySPSCharacteristics (\r
-  UINT16  Characteristics,\r
-  UINT8   Option\r
+  IN UINT16  Characteristics,\r
+  IN UINT8   Option\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index f3e3f5f37b316c5c1ec5fb1d7dce30f1a8e54c51..d84ab10c298a1c528a7727a89451d7b9fd1f7fd5 100644 (file)
@@ -2986,27 +2986,19 @@ QueryTable (
   return QUERY_TABLE_UNFOUND;\r
 }\r
 \r
   return QUERY_TABLE_UNFOUND;\r
 }\r
 \r
+/**\r
+  Given a table of bit info and a Key, return the responding info to the Key.\r
+\r
+  @param[in] Table     Point to a table which maintains a map of 'bit' to 'message'.\r
+  @param[in] Number    Number of table items.\r
+  @param[in] Bits      The Key of query the bit map information.\r
+**/\r
 VOID\r
 PrintBitsInfo (\r
   IN  TABLE_ITEM    *Table,\r
   IN  UINTN         Number,\r
   IN  UINT32        Bits\r
   )\r
 VOID\r
 PrintBitsInfo (\r
   IN  TABLE_ITEM    *Table,\r
   IN  UINTN         Number,\r
   IN  UINT32        Bits\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-      Given a table of bit info and a Key,\r
-      return the responding info to the Key.\r
-\r
-  Arguments:\r
-    Table     - Point to a table which maintains a map of 'bit' to 'message'\r
-    Number    - Number of table items.\r
-    Bits      - The Key of query the bit map information.\r
-\r
-  Returns:\r
-    None\r
-\r
-**/\r
 {\r
   //\r
   // Get certain bit of 'Value':\r
 {\r
   //\r
   // Get certain bit of 'Value':\r
@@ -3077,28 +3069,33 @@ PrintBitsInfo (
     PrintBitsInfo (Table, Num, (UINT32) bits); \\r
   } while (0);\r
 \r
     PrintBitsInfo (Table, Num, (UINT32) bits); \\r
   } while (0);\r
 \r
-//\r
-////////////////////////////////////////////////////////////////////\r
-//\r
-// System Information (Type 1)\r
-//\r
+/**\r
+  Display System Information (Type 1) Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplaySystemWakeupType (\r
 VOID\r
 DisplaySystemWakeupType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_WAKEUP_TYPE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (SystemWakeupTypeTable, Type);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_WAKEUP_TYPE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (SystemWakeupTypeTable, Type);\r
 }\r
-//\r
-// System Enclosure (Type 3)\r
-//\r
+\r
+/**\r
+  Display System Enclosure (Type 3) Enclosure Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplaySystemEnclosureType (\r
 VOID\r
 DisplaySystemEnclosureType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_TYPE), gShellDebug1HiiHandle);\r
@@ -3113,10 +3110,16 @@ DisplaySystemEnclosureType (
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Display System Enclosure (Type 3) Enclosure Status.\r
+\r
+  @param[in] Status         The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplaySystemEnclosureStatus (\r
 VOID\r
 DisplaySystemEnclosureStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_STATUS), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_STATUS), gShellDebug1HiiHandle);\r
@@ -3124,23 +3127,33 @@ DisplaySystemEnclosureStatus (
   PRINT_TABLE_ITEM (SystemEnclosureStatusTable, Status);\r
 }\r
 \r
   PRINT_TABLE_ITEM (SystemEnclosureStatusTable, Status);\r
 }\r
 \r
+/**\r
+  Display System Enclosure (Type 3) Security Status.\r
+\r
+  @param[in] Status         The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplaySESecurityStatus (\r
 VOID\r
 DisplaySESecurityStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_SECURITY), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Status, Option);\r
   PRINT_TABLE_ITEM (SESecurityStatusTable, Status);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_SECURITY), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Status, Option);\r
   PRINT_TABLE_ITEM (SESecurityStatusTable, Status);\r
 }\r
-//\r
-// Processor Information (Type 4)\r
-//\r
+\r
+/**\r
+  Display Processor Information (Type 4) Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayProcessorType (\r
 VOID\r
 DisplayProcessorType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_TYPE), gShellDebug1HiiHandle);\r
@@ -3148,23 +3161,33 @@ DisplayProcessorType (
   PRINT_TABLE_ITEM (ProcessorTypeTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (ProcessorTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display Processor Information (Type 4) Upgrade.\r
+\r
+  @param[in] Upgrade        The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayProcessorUpgrade (\r
 VOID\r
 DisplayProcessorUpgrade (\r
-  UINT8 Upgrade,\r
-  UINT8 Option\r
+  IN UINT8 Upgrade,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_UPDATE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Upgrade, Option);\r
   PRINT_TABLE_ITEM (ProcessorUpgradeTable, Upgrade);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_UPDATE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Upgrade, Option);\r
   PRINT_TABLE_ITEM (ProcessorUpgradeTable, Upgrade);\r
 }\r
-//\r
-// Memory Controller Information (Type 5)\r
-//\r
+\r
+/**\r
+  Display Memory Controller Information (Type 5) method.\r
+\r
+  @param[in] Method         The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMcErrorDetectMethod (\r
 VOID\r
 DisplayMcErrorDetectMethod (\r
-  UINT8 Method,\r
-  UINT8 Option\r
+  IN UINT8 Method,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DETECTMETHOD), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DETECTMETHOD), gShellDebug1HiiHandle);\r
@@ -3172,10 +3195,16 @@ DisplayMcErrorDetectMethod (
   PRINT_TABLE_ITEM (McErrorDetectMethodTable, Method);\r
 }\r
 \r
   PRINT_TABLE_ITEM (McErrorDetectMethodTable, Method);\r
 }\r
 \r
+/**\r
+  Display Memory Controller Information (Type 5) Capability.\r
+\r
+  @param[in] Capability     The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMcErrorCorrectCapability (\r
 VOID\r
 DisplayMcErrorCorrectCapability (\r
-  UINT8 Capability,\r
-  UINT8 Option\r
+  IN UINT8 Capability,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CORRECT_CAPABILITY), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CORRECT_CAPABILITY), gShellDebug1HiiHandle);\r
@@ -3183,10 +3212,16 @@ DisplayMcErrorCorrectCapability (
   PRINT_BITS_INFO (McErrorCorrectCapabilityTable, Capability);\r
 }\r
 \r
   PRINT_BITS_INFO (McErrorCorrectCapabilityTable, Capability);\r
 }\r
 \r
+/**\r
+  Display Memory Controller Information (Type 5) Support.\r
+\r
+  @param[in] Support        The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMcInterleaveSupport (\r
 VOID\r
 DisplayMcInterleaveSupport (\r
-  UINT8 Support,\r
-  UINT8 Option\r
+  IN UINT8 Support,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_INTERLEAVE_SUPPORT), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_INTERLEAVE_SUPPORT), gShellDebug1HiiHandle);\r
@@ -3194,10 +3229,16 @@ DisplayMcInterleaveSupport (
   PRINT_TABLE_ITEM (McInterleaveSupportTable, Support);\r
 }\r
 \r
   PRINT_TABLE_ITEM (McInterleaveSupportTable, Support);\r
 }\r
 \r
+/**\r
+  Display Memory Controller Information (Type 5) speeds.\r
+\r
+  @param[in] Speed          The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMcMemorySpeeds (\r
 VOID\r
 DisplayMcMemorySpeeds (\r
-  UINT16  Speed,\r
-  UINT8   Option\r
+  IN UINT16  Speed,\r
+  IN UINT8   Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MEMORY_SPEED), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MEMORY_SPEED), gShellDebug1HiiHandle);\r
@@ -3205,23 +3246,33 @@ DisplayMcMemorySpeeds (
   PRINT_BITS_INFO (McMemorySpeedsTable, Speed);\r
 }\r
 \r
   PRINT_BITS_INFO (McMemorySpeedsTable, Speed);\r
 }\r
 \r
+/**\r
+  Display Memory Controller Information (Type 5) voltage.\r
+\r
+  @param[in] Voltage        The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryModuleVoltage (\r
 VOID\r
 DisplayMemoryModuleVoltage (\r
-  UINT8 Voltage,\r
-  UINT8 Option\r
+  IN UINT8 Voltage,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_REQUIRED_VOLTAGES), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Voltage, Option);\r
   PRINT_BITS_INFO (MemoryModuleVoltageTable, Voltage);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_REQUIRED_VOLTAGES), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Voltage, Option);\r
   PRINT_BITS_INFO (MemoryModuleVoltageTable, Voltage);\r
 }\r
-//\r
-// Memory Module Information (Type 6)\r
-//\r
+\r
+/**\r
+  Display Memory Module Information (Type 6) type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMmMemoryType (\r
 VOID\r
 DisplayMmMemoryType (\r
-  UINT16  Type,\r
-  UINT8   Option\r
+  IN UINT16  Type,\r
+  IN UINT8   Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_TYPE), gShellDebug1HiiHandle);\r
@@ -3229,23 +3280,33 @@ DisplayMmMemoryType (
   PRINT_BITS_INFO (MmMemoryTypeTable, Type);\r
 }\r
 \r
   PRINT_BITS_INFO (MmMemoryTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display Memory Module Information (Type 6) status.\r
+\r
+  @param[in] Status         The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMmErrorStatus (\r
 VOID\r
 DisplayMmErrorStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_ERROR_STATUS), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Status, Option);\r
   PRINT_BITS_INFO (MmErrorStatusTable, Status);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_ERROR_STATUS), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Status, Option);\r
   PRINT_BITS_INFO (MmErrorStatusTable, Status);\r
 }\r
-//\r
-// Cache Information (Type 7)\r
-//\r
+\r
+/**\r
+  Display Cache Information (Type 7) SRAM Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayCacheSRAMType (\r
 VOID\r
 DisplayCacheSRAMType (\r
-  UINT16  Type,\r
-  UINT8   Option\r
+  IN UINT16  Type,\r
+  IN UINT8   Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SRAM_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SRAM_TYPE), gShellDebug1HiiHandle);\r
@@ -3253,10 +3314,16 @@ DisplayCacheSRAMType (
   PRINT_BITS_INFO (CacheSRAMTypeTable, (UINT8) Type);\r
 }\r
 \r
   PRINT_BITS_INFO (CacheSRAMTypeTable, (UINT8) Type);\r
 }\r
 \r
+/**\r
+  Display Cache Information (Type 7) correcting Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayCacheErrCorrectingType (\r
 VOID\r
 DisplayCacheErrCorrectingType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ERROR_CORRECTING), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ERROR_CORRECTING), gShellDebug1HiiHandle);\r
@@ -3264,10 +3331,16 @@ DisplayCacheErrCorrectingType (
   PRINT_TABLE_ITEM (CacheErrCorrectingTypeTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (CacheErrCorrectingTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display Cache Information (Type 7) Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayCacheSystemCacheType (\r
 VOID\r
 DisplayCacheSystemCacheType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SYSTEM_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SYSTEM_TYPE), gShellDebug1HiiHandle);\r
@@ -3275,23 +3348,33 @@ DisplayCacheSystemCacheType (
   PRINT_TABLE_ITEM (CacheSystemCacheTypeTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (CacheSystemCacheTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display Cache Information (Type 7) Associativity.\r
+\r
+  @param[in] Associativity  The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayCacheAssociativity (\r
 VOID\r
 DisplayCacheAssociativity (\r
-  UINT8 Associativity,\r
-  UINT8 Option\r
+  IN UINT8 Associativity,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ASSOCIATIVITY), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Associativity, Option);\r
   PRINT_TABLE_ITEM (CacheAssociativityTable, Associativity);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ASSOCIATIVITY), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Associativity, Option);\r
   PRINT_TABLE_ITEM (CacheAssociativityTable, Associativity);\r
 }\r
-//\r
-// Port Connector Information (Type 8)\r
-//\r
+\r
+/**\r
+  Display Port Connector Information  (Type 8) type.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPortConnectorType (\r
 VOID\r
 DisplayPortConnectorType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_CONNECTOR_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_CONNECTOR_TYPE), gShellDebug1HiiHandle);\r
@@ -3299,23 +3382,33 @@ DisplayPortConnectorType (
   PRINT_TABLE_ITEM (PortConnectorTypeTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (PortConnectorTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display Port Connector Information  (Type 8) port type.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPortType (\r
 VOID\r
 DisplayPortType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_TYPE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (PortTypeTable, Type);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_TYPE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (PortTypeTable, Type);\r
 }\r
-//\r
-// System Slots (Type 9)\r
-//\r
+\r
+/**\r
+  Display System Slots (Type 9) slot type.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySystemSlotType (\r
 VOID\r
 DisplaySystemSlotType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_TYPE), gShellDebug1HiiHandle);\r
@@ -3323,10 +3416,16 @@ DisplaySystemSlotType (
   PRINT_TABLE_ITEM (SystemSlotTypeTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (SystemSlotTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display System Slots (Type 9) data bus width.\r
+\r
+  @param[in] Width      The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySystemSlotDataBusWidth (\r
 VOID\r
 DisplaySystemSlotDataBusWidth (\r
-  UINT8 Width,\r
-  UINT8 Option\r
+  IN UINT8 Width,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_DATA), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_DATA), gShellDebug1HiiHandle);\r
@@ -3334,10 +3433,16 @@ DisplaySystemSlotDataBusWidth (
   PRINT_TABLE_ITEM (SystemSlotDataBusWidthTable, Width);\r
 }\r
 \r
   PRINT_TABLE_ITEM (SystemSlotDataBusWidthTable, Width);\r
 }\r
 \r
+/**\r
+  Display System Slots (Type 9) usage information.\r
+\r
+  @param[in] Usage      The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySystemSlotCurrentUsage (\r
 VOID\r
 DisplaySystemSlotCurrentUsage (\r
-  UINT8 Usage,\r
-  UINT8 Option\r
+  IN UINT8 Usage,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_CURRENT_USAGE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_CURRENT_USAGE), gShellDebug1HiiHandle);\r
@@ -3345,10 +3450,16 @@ DisplaySystemSlotCurrentUsage (
   PRINT_TABLE_ITEM (SystemSlotCurrentUsageTable, Usage);\r
 }\r
 \r
   PRINT_TABLE_ITEM (SystemSlotCurrentUsageTable, Usage);\r
 }\r
 \r
+/**\r
+  Display System Slots (Type 9) slot length.\r
+\r
+  @param[in] Length     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySystemSlotLength (\r
 VOID\r
 DisplaySystemSlotLength (\r
-  UINT8 Length,\r
-  UINT8 Option\r
+  IN UINT8 Length,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_LENGTH), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_LENGTH), gShellDebug1HiiHandle);\r
@@ -3356,10 +3467,16 @@ DisplaySystemSlotLength (
   PRINT_TABLE_ITEM (SystemSlotLengthTable, Length);\r
 }\r
 \r
   PRINT_TABLE_ITEM (SystemSlotLengthTable, Length);\r
 }\r
 \r
+/**\r
+  Display System Slots (Type 9) characteristics.\r
+\r
+  @param[in] Chara1     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySlotCharacteristics1 (\r
 VOID\r
 DisplaySlotCharacteristics1 (\r
-  UINT8 Chara1,\r
-  UINT8 Option\r
+  IN UINT8 Chara1,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS), gShellDebug1HiiHandle);\r
@@ -3367,36 +3484,50 @@ DisplaySlotCharacteristics1 (
   PRINT_BITS_INFO (SlotCharacteristics1Table, Chara1);\r
 }\r
 \r
   PRINT_BITS_INFO (SlotCharacteristics1Table, Chara1);\r
 }\r
 \r
+/**\r
+  Display System Slots (Type 9) characteristics.\r
+\r
+  @param[in] Chara2     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySlotCharacteristics2 (\r
 VOID\r
 DisplaySlotCharacteristics2 (\r
-  UINT8 Chara2,\r
-  UINT8 Option\r
+  IN UINT8 Chara2,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS_2), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Chara2, Option);\r
   PRINT_BITS_INFO (SlotCharacteristics2Table, Chara2);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS_2), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Chara2, Option);\r
   PRINT_BITS_INFO (SlotCharacteristics2Table, Chara2);\r
 }\r
-//\r
-// On Board Devices Information (Type 10)\r
-//\r
+\r
+/**\r
+  Display On Board Devices Information (Type 10) types.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayOnboardDeviceTypes (\r
 VOID\r
 DisplayOnboardDeviceTypes (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (OnboardDeviceTypesTable, Type);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (OnboardDeviceTypesTable, Type);\r
 }\r
-//\r
-// System Event Log (Type 15)\r
-//\r
+\r
+/**\r
+  Display System Event Log (Type 15) types.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySELTypes (\r
 VOID\r
 DisplaySELTypes (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE), gShellDebug1HiiHandle);\r
@@ -3404,10 +3535,16 @@ DisplaySELTypes (
   PRINT_TABLE_ITEM (SELTypesTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (SELTypesTable, Type);\r
 }\r
 \r
+/**\r
+  Display System Event Log (Type 15) format type.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySELVarDataFormatType (\r
 VOID\r
 DisplaySELVarDataFormatType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT), gShellDebug1HiiHandle);\r
@@ -3415,10 +3552,16 @@ DisplaySELVarDataFormatType (
   PRINT_TABLE_ITEM (SELVarDataFormatTypeTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (SELVarDataFormatTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display System Event Log (Type 15) dw1.\r
+\r
+  @param[in] Key        The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPostResultsBitmapDw1 (\r
 VOID\r
 DisplayPostResultsBitmapDw1 (\r
-  UINT32  Key,\r
-  UINT8   Option\r
+  IN UINT32  Key,\r
+  IN UINT8   Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_BITMAP), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_BITMAP), gShellDebug1HiiHandle);\r
@@ -3426,10 +3569,16 @@ DisplayPostResultsBitmapDw1 (
   PRINT_BITS_INFO (PostResultsBitmapDw1Table, Key);\r
 }\r
 \r
   PRINT_BITS_INFO (PostResultsBitmapDw1Table, Key);\r
 }\r
 \r
+/**\r
+  Display System Event Log (Type 15) dw2.\r
+\r
+  @param[in] Key        The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPostResultsBitmapDw2 (\r
 VOID\r
 DisplayPostResultsBitmapDw2 (\r
-  UINT32  Key,\r
-  UINT8   Option\r
+  IN UINT32  Key,\r
+  IN UINT8   Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_SECOND_DWORD), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_SECOND_DWORD), gShellDebug1HiiHandle);\r
@@ -3437,10 +3586,16 @@ DisplayPostResultsBitmapDw2 (
   PRINT_BITS_INFO (PostResultsBitmapDw2Table, Key);\r
 }\r
 \r
   PRINT_BITS_INFO (PostResultsBitmapDw2Table, Key);\r
 }\r
 \r
+/**\r
+  Display System Event Log (Type 15) type.\r
+\r
+  @param[in] SMType     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySELSysManagementTypes (\r
 VOID\r
 DisplaySELSysManagementTypes (\r
-  UINT32  SMType,\r
-  UINT8   Option\r
+  IN UINT32  SMType,\r
+  IN UINT8   Option\r
   )\r
 {\r
   UINT8       Temp;\r
   )\r
 {\r
   UINT8       Temp;\r
@@ -3467,13 +3622,17 @@ DisplaySELSysManagementTypes (
     PRINT_TABLE_ITEM (SELSysManagementTypesTable, Temp);\r
   }\r
 }\r
     PRINT_TABLE_ITEM (SELSysManagementTypesTable, Temp);\r
   }\r
 }\r
-//\r
-// Physical Memory Array (Type 16)\r
-//\r
+\r
+/**\r
+  Display Physical Memory Array (Type 16) Location.\r
+\r
+  @param[in] Location   The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPMALocation (\r
 VOID\r
 DisplayPMALocation (\r
-  UINT8 Location,\r
-  UINT8 Option\r
+  IN UINT8 Location,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION), gShellDebug1HiiHandle);\r
@@ -3481,10 +3640,16 @@ DisplayPMALocation (
   PRINT_TABLE_ITEM (PMALocationTable, Location);\r
 }\r
 \r
   PRINT_TABLE_ITEM (PMALocationTable, Location);\r
 }\r
 \r
+/**\r
+  Display Physical Memory Array (Type 16) Use.\r
+\r
+  @param[in] Use        The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPMAUse (\r
 VOID\r
 DisplayPMAUse (\r
-  UINT8 Use,\r
-  UINT8 Option\r
+  IN UINT8 Use,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION), gShellDebug1HiiHandle);\r
@@ -3492,23 +3657,33 @@ DisplayPMAUse (
   PRINT_TABLE_ITEM (PMAUseTable, Use);\r
 }\r
 \r
   PRINT_TABLE_ITEM (PMAUseTable, Use);\r
 }\r
 \r
+/**\r
+  Display Physical Memory Array (Type 16) Types.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPMAErrorCorrectionTypes (\r
 VOID\r
 DisplayPMAErrorCorrectionTypes (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_ERROR), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (PMAErrorCorrectionTypesTable, Type);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_ERROR), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (PMAErrorCorrectionTypesTable, Type);\r
 }\r
-//\r
-// Memory Device (Type 17)\r
-//\r
+\r
+/**\r
+  Display Memory Device (Type 17) form factor.\r
+\r
+  @param[in] FormFactor The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryDeviceFormFactor (\r
 VOID\r
 DisplayMemoryDeviceFormFactor (\r
-  UINT8 FormFactor,\r
-  UINT8 Option\r
+  IN UINT8 FormFactor,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_FORM_FACTOR), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_FORM_FACTOR), gShellDebug1HiiHandle);\r
@@ -3516,10 +3691,16 @@ DisplayMemoryDeviceFormFactor (
   PRINT_TABLE_ITEM (MemoryDeviceFormFactorTable, FormFactor);\r
 }\r
 \r
   PRINT_TABLE_ITEM (MemoryDeviceFormFactorTable, FormFactor);\r
 }\r
 \r
+/**\r
+  Display Memory Device (Type 17) type.\r
+\r
+  @param[in] Type     The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryDeviceType (\r
 VOID\r
 DisplayMemoryDeviceType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE), gShellDebug1HiiHandle);\r
@@ -3527,23 +3708,33 @@ DisplayMemoryDeviceType (
   PRINT_TABLE_ITEM (MemoryDeviceTypeTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (MemoryDeviceTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display Memory Device (Type 17) details.\r
+\r
+  @param[in] Para     The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryDeviceTypeDetail (\r
 VOID\r
 DisplayMemoryDeviceTypeDetail (\r
-  UINT16  para,\r
-  UINT8   Option\r
+  IN UINT16  Para,\r
+  IN UINT8   Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE_DETAIL), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE_DETAIL), gShellDebug1HiiHandle);\r
-  PRINT_INFO_OPTION (para, Option);\r
-  PRINT_BITS_INFO (MemoryDeviceTypeDetailTable, para);\r
+  PRINT_INFO_OPTION (Para, Option);\r
+  PRINT_BITS_INFO (MemoryDeviceTypeDetailTable, Para);\r
 }\r
 }\r
-//\r
-// 32-bit Memory Error Information (Type 18)\r
-//\r
+\r
+/**\r
+  Display 32-bit Memory Error Information (Type 18) type.\r
+\r
+  @param[in] ErrorType  The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryErrorType (\r
 VOID\r
 DisplayMemoryErrorType (\r
-  UINT8 ErrorType,\r
-  UINT8 Option\r
+  IN UINT8 ErrorType,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_INFO), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_INFO), gShellDebug1HiiHandle);\r
@@ -3551,10 +3742,16 @@ DisplayMemoryErrorType (
   PRINT_TABLE_ITEM (MemoryErrorTypeTable, ErrorType);\r
 }\r
 \r
   PRINT_TABLE_ITEM (MemoryErrorTypeTable, ErrorType);\r
 }\r
 \r
+/**\r
+  Display 32-bit Memory Error Information (Type 18) error granularity.\r
+\r
+  @param[in] Granularity  The key of the structure.\r
+  @param[in] Option       The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryErrorGranularity (\r
 VOID\r
 DisplayMemoryErrorGranularity (\r
-  UINT8 Granularity,\r
-  UINT8 Option\r
+  IN UINT8 Granularity,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_GRANULARITY), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_GRANULARITY), gShellDebug1HiiHandle);\r
@@ -3562,23 +3759,33 @@ DisplayMemoryErrorGranularity (
   PRINT_TABLE_ITEM (MemoryErrorGranularityTable, Granularity);\r
 }\r
 \r
   PRINT_TABLE_ITEM (MemoryErrorGranularityTable, Granularity);\r
 }\r
 \r
+/**\r
+  Display 32-bit Memory Error Information (Type 18) error information.\r
+\r
+  @param[in] Operation  The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryErrorOperation (\r
 VOID\r
 DisplayMemoryErrorOperation (\r
-  UINT8 Operation,\r
-  UINT8 Option\r
+  IN UINT8 Operation,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_OP), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Operation, Option);\r
   PRINT_TABLE_ITEM (MemoryErrorOperationTable, Operation);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_OP), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Operation, Option);\r
   PRINT_TABLE_ITEM (MemoryErrorOperationTable, Operation);\r
 }\r
-//\r
-// Built-in Pointing Device (Type 21)\r
-//\r
+\r
+/**\r
+  Display Built-in Pointing Device (Type 21) type information.\r
+\r
+  @param[in] Type     The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayPointingDeviceType (\r
 VOID\r
 DisplayPointingDeviceType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_TYPE), gShellDebug1HiiHandle);\r
@@ -3586,36 +3793,50 @@ DisplayPointingDeviceType (
   PRINT_TABLE_ITEM (PointingDeviceTypeTable, Type);\r
 }\r
 \r
   PRINT_TABLE_ITEM (PointingDeviceTypeTable, Type);\r
 }\r
 \r
+/**\r
+  Display Built-in Pointing Device (Type 21) information.\r
+\r
+  @param[in] Interface  The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPointingDeviceInterface (\r
 VOID\r
 DisplayPointingDeviceInterface (\r
-  UINT8   Interface,\r
-  UINT8   Option\r
+  IN UINT8   Interface,\r
+  IN UINT8   Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_INTERFACE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Interface, Option);\r
   PRINT_TABLE_ITEM (PointingDeviceInterfaceTable, Interface);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_INTERFACE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Interface, Option);\r
   PRINT_TABLE_ITEM (PointingDeviceInterfaceTable, Interface);\r
 }\r
-//\r
-// Portable Battery (Type 22)\r
-//\r
+\r
+/**\r
+  Display Portable Battery  (Type 22) information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayPBDeviceChemistry (\r
 VOID\r
 DisplayPBDeviceChemistry (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORTABLE_BATT_DEV_CHEM), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Key, Option);\r
   PRINT_TABLE_ITEM (PBDeviceChemistryTable, Key);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORTABLE_BATT_DEV_CHEM), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Key, Option);\r
   PRINT_TABLE_ITEM (PBDeviceChemistryTable, Key);\r
 }\r
-//\r
-// Voltage Probe (Type 26)\r
-//\r
+\r
+/**\r
+  Display Voltage Probe (Type 26) location information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayVPLocation (\r
 VOID\r
 DisplayVPLocation (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8       Loc;\r
   )\r
 {\r
   UINT8       Loc;\r
@@ -3626,10 +3847,16 @@ DisplayVPLocation (
   PRINT_TABLE_ITEM (VPLocationTable, Loc);\r
 }\r
 \r
   PRINT_TABLE_ITEM (VPLocationTable, Loc);\r
 }\r
 \r
+/**\r
+  Display Voltage Probe (Type 26) status ype information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayVPStatus (\r
 VOID\r
 DisplayVPStatus (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8       Status;\r
   )\r
 {\r
   UINT8       Status;\r
@@ -3639,13 +3866,17 @@ DisplayVPStatus (
   PRINT_INFO_OPTION (Status, Option);\r
   PRINT_TABLE_ITEM (VPStatusTable, Status);\r
 }\r
   PRINT_INFO_OPTION (Status, Option);\r
   PRINT_TABLE_ITEM (VPStatusTable, Status);\r
 }\r
-//\r
-// Voltage Probe (Type 27)\r
-//\r
+\r
+/**\r
+  Display Cooling (Type 27) status information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayCoolingDeviceStatus (\r
 VOID\r
 DisplayCoolingDeviceStatus (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8       Status;\r
   )\r
 {\r
   UINT8       Status;\r
@@ -3656,10 +3887,16 @@ DisplayCoolingDeviceStatus (
   PRINT_TABLE_ITEM (CoolingDeviceStatusTable, Status);\r
 }\r
 \r
   PRINT_TABLE_ITEM (CoolingDeviceStatusTable, Status);\r
 }\r
 \r
+/**\r
+  Display Cooling (Type 27) type information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayCoolingDeviceType (\r
 VOID\r
 DisplayCoolingDeviceType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8       Type;\r
   )\r
 {\r
   UINT8       Type;\r
@@ -3669,13 +3906,17 @@ DisplayCoolingDeviceType (
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (CoolingDeviceTypeTable, Type);\r
 }\r
   PRINT_INFO_OPTION (Type, Option);\r
   PRINT_TABLE_ITEM (CoolingDeviceTypeTable, Type);\r
 }\r
-//\r
-// Temperature Probe  (Type 28)\r
-//\r
+\r
+/**\r
+  Display Temperature Probe (Type 28) status information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayTemperatureProbeStatus (\r
 VOID\r
 DisplayTemperatureProbeStatus (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8       Status;\r
   )\r
 {\r
   UINT8       Status;\r
@@ -3686,10 +3927,16 @@ DisplayTemperatureProbeStatus (
   PRINT_TABLE_ITEM (TemperatureProbeStatusTable, Status);\r
 }\r
 \r
   PRINT_TABLE_ITEM (TemperatureProbeStatusTable, Status);\r
 }\r
 \r
+/**\r
+  Display Temperature Probe  (Type 28) location information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayTemperatureProbeLoc (\r
 VOID\r
 DisplayTemperatureProbeLoc (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8       Loc;\r
   )\r
 {\r
   UINT8       Loc;\r
@@ -3699,13 +3946,17 @@ DisplayTemperatureProbeLoc (
   PRINT_INFO_OPTION (Loc, Option);\r
   PRINT_TABLE_ITEM (TemperatureProbeLocTable, Loc);\r
 }\r
   PRINT_INFO_OPTION (Loc, Option);\r
   PRINT_TABLE_ITEM (TemperatureProbeLocTable, Loc);\r
 }\r
-//\r
-// Electrical Current Probe (Type 29)\r
-//\r
+\r
+/**\r
+  Display Electrical Current Probe (Type 29)  status information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayECPStatus (\r
 VOID\r
 DisplayECPStatus (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8       Status;\r
   )\r
 {\r
   UINT8       Status;\r
@@ -3716,10 +3967,16 @@ DisplayECPStatus (
   PRINT_TABLE_ITEM (ECPStatusTable, Status);\r
 }\r
 \r
   PRINT_TABLE_ITEM (ECPStatusTable, Status);\r
 }\r
 \r
+/**\r
+  Display Type 29 information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayECPLoc (\r
 VOID\r
 DisplayECPLoc (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   UINT8       Loc;\r
   )\r
 {\r
   UINT8       Loc;\r
@@ -3729,13 +3986,17 @@ DisplayECPLoc (
   PRINT_INFO_OPTION (Loc, Option);\r
   PRINT_TABLE_ITEM (ECPLocTable, Loc);\r
 }\r
   PRINT_INFO_OPTION (Loc, Option);\r
   PRINT_TABLE_ITEM (ECPLocTable, Loc);\r
 }\r
-//\r
-// Management Device (Type 34)\r
-//\r
+\r
+/**\r
+  Display Management Device (Type 34) information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayMDType (\r
 VOID\r
 DisplayMDType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_TYPE), gShellDebug1HiiHandle);\r
@@ -3743,36 +4004,33 @@ DisplayMDType (
   PRINT_TABLE_ITEM (MDTypeTable, Key);\r
 }\r
 \r
   PRINT_TABLE_ITEM (MDTypeTable, Key);\r
 }\r
 \r
-VOID\r
-DisplayMDAddressType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
-  )\r
-{\r
-  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_ADDR_TYPE), gShellDebug1HiiHandle);\r
-  PRINT_INFO_OPTION (Key, Option);\r
-  PRINT_TABLE_ITEM (MDAddressTypeTable, Key);\r
-}\r
-//\r
-// Memory Channel (Type 37)\r
-//\r
+/**\r
+  Display Memory Channel (Type 37) information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryChannelType (\r
 VOID\r
 DisplayMemoryChannelType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CHANNEL_TYPE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Key, Option);\r
   PRINT_TABLE_ITEM (MemoryChannelTypeTable, Key);\r
 }\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CHANNEL_TYPE), gShellDebug1HiiHandle);\r
   PRINT_INFO_OPTION (Key, Option);\r
   PRINT_TABLE_ITEM (MemoryChannelTypeTable, Key);\r
 }\r
-//\r
-// IPMI Device Information (Type 38)\r
-//\r
+\r
+/**\r
+  Display IPMI Device Information (Type 38) information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayIPMIDIBMCInterfaceType (\r
 VOID\r
 DisplayIPMIDIBMCInterfaceType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_BMC_INTERFACE_TYPE), gShellDebug1HiiHandle);\r
   )\r
 {\r
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_BMC_INTERFACE_TYPE), gShellDebug1HiiHandle);\r
@@ -3780,10 +4038,16 @@ DisplayIPMIDIBMCInterfaceType (
   PRINT_TABLE_ITEM (IPMIDIBMCInterfaceTypeTable, Key);\r
 }\r
 \r
   PRINT_TABLE_ITEM (IPMIDIBMCInterfaceTypeTable, Key);\r
 }\r
 \r
+/**\r
+  Display the structure type information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayStructureTypeInfo (\r
 VOID\r
 DisplayStructureTypeInfo (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   )\r
 {\r
   //\r
   )\r
 {\r
   //\r
index 1022132f1046234fa2e79615ade8719c58378caa..6809820232c91f4d153df347074e01d1ad7416bd 100644 (file)
@@ -13,8 +13,8 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#ifndef _SMBIOS_QUERY_TABLE_H\r
-#define _SMBIOS_QUERY_TABLE_H\r
+#ifndef _SMBIOS_QUERY_TABLE_H_\r
+#define _SMBIOS_QUERY_TABLE_H_\r
 \r
 #define QUERY_TABLE_UNFOUND 0xFF\r
 \r
 \r
 #define QUERY_TABLE_UNFOUND 0xFF\r
 \r
@@ -70,386 +70,665 @@ QueryTable (
   IN  UINTN         InfoLen\r
   );\r
 \r
   IN  UINTN         InfoLen\r
   );\r
 \r
-VOID\r
-PrintBitsInfo (\r
-  IN  TABLE_ITEM    *Table,\r
-  IN  UINTN         Number,\r
-  IN  UINT32        Bits\r
-  );\r
+/**\r
+  Display the structure type information.\r
 \r
 \r
-//\r
-// Display the element detail information\r
-//\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayStructureTypeInfo (\r
 VOID\r
 DisplayStructureTypeInfo (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// System Information (Type 1)\r
-//\r
+/**\r
+  Display System Information (Type 1) Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplaySystemWakeupType (\r
 VOID\r
 DisplaySystemWakeupType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// System Enclosure (Type 3)\r
-//\r
+/**\r
+  Display System Enclosure (Type 3) Enclosure Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplaySystemEnclosureType (\r
 VOID\r
 DisplaySystemEnclosureType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Enclosure (Type 3) Enclosure Status.\r
+\r
+  @param[in] Status         The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplaySystemEnclosureStatus (\r
 VOID\r
 DisplaySystemEnclosureStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Enclosure (Type 3) Security Status.\r
+\r
+  @param[in] Status         The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplaySESecurityStatus (\r
 VOID\r
 DisplaySESecurityStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
-  );\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
+  )\r
+;\r
 \r
 \r
-//\r
-// Processor Information (Type 4)\r
-//\r
+/**\r
+  Display Processor Information (Type 4) Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayProcessorType (\r
 VOID\r
 DisplayProcessorType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Processor Information (Type 4) Upgrade.\r
+\r
+  @param[in] Upgrade        The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayProcessorUpgrade (\r
 VOID\r
 DisplayProcessorUpgrade (\r
-  UINT8 Upgrade,\r
-  UINT8 Option\r
+  IN UINT8 Upgrade,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Memory Controller Information (Type 5)\r
-//\r
+/**\r
+  Display Memory Controller Information (Type 5) method.\r
+\r
+  @param[in] Method         The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMcErrorDetectMethod (\r
 VOID\r
 DisplayMcErrorDetectMethod (\r
-  UINT8 Method,\r
-  UINT8 Option\r
+  IN UINT8 Method,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Memory Controller Information (Type 5) Capability.\r
+\r
+  @param[in] Capability     The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMcErrorCorrectCapability (\r
 VOID\r
 DisplayMcErrorCorrectCapability (\r
-  UINT8 Capability,\r
-  UINT8 Option\r
+  IN UINT8 Capability,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Memory Controller Information (Type 5) Support.\r
+\r
+  @param[in] Support        The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMcInterleaveSupport (\r
 VOID\r
 DisplayMcInterleaveSupport (\r
-  UINT8 Support,\r
-  UINT8 Option\r
+  IN UINT8 Support,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Memory Controller Information (Type 5) speeds.\r
+\r
+  @param[in] Speed          The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMcMemorySpeeds (\r
 VOID\r
 DisplayMcMemorySpeeds (\r
-  UINT16  Speed,\r
-  UINT8   Option\r
+  IN UINT16  Speed,\r
+  IN UINT8   Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Memory Controller Information (Type 5) voltage.\r
+\r
+  @param[in] Voltage        The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryModuleVoltage (\r
 VOID\r
 DisplayMemoryModuleVoltage (\r
-  UINT8 Voltage,\r
-  UINT8 Option\r
+  IN UINT8 Voltage,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Memory Module Information (Type 6)\r
-//\r
+/**\r
+  Display Memory Module Information (Type 6) type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMmMemoryType (\r
 VOID\r
 DisplayMmMemoryType (\r
-  UINT16  Type,\r
-  UINT8   Option\r
+  IN UINT16  Type,\r
+  IN UINT8   Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Memory Module Information (Type 6) status.\r
+\r
+  @param[in] Status         The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayMmErrorStatus (\r
 VOID\r
 DisplayMmErrorStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Cache Information (Type 7)\r
-//\r
+/**\r
+  Display Cache Information (Type 7) SRAM Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayCacheSRAMType (\r
 VOID\r
 DisplayCacheSRAMType (\r
-  UINT16  Type,\r
-  UINT8   Option\r
+  IN UINT16  Type,\r
+  IN UINT8   Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Cache Information (Type 7) correcting Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayCacheErrCorrectingType (\r
 VOID\r
 DisplayCacheErrCorrectingType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Cache Information (Type 7) Type.\r
+\r
+  @param[in] Type           The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayCacheSystemCacheType (\r
 VOID\r
 DisplayCacheSystemCacheType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Cache Information (Type 7) Associativity.\r
+\r
+  @param[in] Associativity  The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
 VOID\r
 DisplayCacheAssociativity (\r
 VOID\r
 DisplayCacheAssociativity (\r
-  UINT8 Associativity,\r
-  UINT8 Option\r
+  IN UINT8 Associativity,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Port Connector Information  (Type 8)\r
-//\r
+/**\r
+  Display Port Connector Information  (Type 8) type.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPortConnectorType (\r
 VOID\r
 DisplayPortConnectorType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Port Connector Information  (Type 8) port type.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPortType (\r
 VOID\r
 DisplayPortType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// System Slots (Type 9)\r
-//\r
+/**\r
+  Display System Slots (Type 9) slot type.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySystemSlotType (\r
 VOID\r
 DisplaySystemSlotType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Slots (Type 9) data bus width.\r
+\r
+  @param[in] Width      The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySystemSlotDataBusWidth (\r
 VOID\r
 DisplaySystemSlotDataBusWidth (\r
-  UINT8 Width,\r
-  UINT8 Option\r
+  IN UINT8 Width,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Slots (Type 9) usage information.\r
+\r
+  @param[in] Usage      The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySystemSlotCurrentUsage (\r
 VOID\r
 DisplaySystemSlotCurrentUsage (\r
-  UINT8 Usage,\r
-  UINT8 Option\r
+  IN UINT8 Usage,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Slots (Type 9) slot length.\r
+\r
+  @param[in] Length     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySystemSlotLength (\r
 VOID\r
 DisplaySystemSlotLength (\r
-  UINT8 Length,\r
-  UINT8 Option\r
+  IN UINT8 Length,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Slots (Type 9) characteristics.\r
+\r
+  @param[in] Chara1     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySlotCharacteristics1 (\r
 VOID\r
 DisplaySlotCharacteristics1 (\r
-  UINT8 Chara1,\r
-  UINT8 Option\r
+  IN UINT8 Chara1,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Slots (Type 9) characteristics.\r
+\r
+  @param[in] Chara2     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySlotCharacteristics2 (\r
 VOID\r
 DisplaySlotCharacteristics2 (\r
-  UINT8 Chara2,\r
-  UINT8 Option\r
+  IN UINT8 Chara2,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// On Board Devices Information (Type 10)\r
-//\r
+/**\r
+  Display On Board Devices Information (Type 10) types.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayOnboardDeviceTypes (\r
 VOID\r
 DisplayOnboardDeviceTypes (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// System Event Log (Type 15)\r
-//\r
+/**\r
+  Display System Event Log (Type 15) types.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySELTypes (\r
 VOID\r
 DisplaySELTypes (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Event Log (Type 15) format type.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySELVarDataFormatType (\r
 VOID\r
 DisplaySELVarDataFormatType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Event Log (Type 15) dw1.\r
+\r
+  @param[in] Key        The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPostResultsBitmapDw1 (\r
 VOID\r
 DisplayPostResultsBitmapDw1 (\r
-  UINT32  Key,\r
-  UINT8   Option\r
+  IN UINT32  Key,\r
+  IN UINT8   Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Event Log (Type 15) dw2.\r
+\r
+  @param[in] Key        The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPostResultsBitmapDw2 (\r
 VOID\r
 DisplayPostResultsBitmapDw2 (\r
-  UINT32  Key,\r
-  UINT8   Option\r
+  IN UINT32  Key,\r
+  IN UINT8   Option\r
   );\r
   );\r
+\r
+/**\r
+  Display System Event Log (Type 15) type.\r
+\r
+  @param[in] SMType     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplaySELSysManagementTypes (\r
 VOID\r
 DisplaySELSysManagementTypes (\r
-  UINT32  SMType,\r
-  UINT8   Option\r
+  IN UINT32  SMType,\r
+  IN UINT8   Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Physical Memory Array (Type 16)\r
-//\r
+/**\r
+  Display Physical Memory Array (Type 16) Location.\r
+\r
+  @param[in] Location   The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPMALocation (\r
 VOID\r
 DisplayPMALocation (\r
-  UINT8 Location,\r
-  UINT8 Option\r
+  IN UINT8 Location,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Physical Memory Array (Type 16) Use.\r
+\r
+  @param[in] Use        The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPMAUse (\r
 VOID\r
 DisplayPMAUse (\r
-  UINT8 Use,\r
-  UINT8 Option\r
+  IN UINT8 Use,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Physical Memory Array (Type 16) Types.\r
+\r
+  @param[in] Type       The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPMAErrorCorrectionTypes (\r
 VOID\r
 DisplayPMAErrorCorrectionTypes (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Memory Device (Type 17)\r
-//\r
+/**\r
+  Display Memory Device (Type 17) form factor.\r
+\r
+  @param[in] FormFactor The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryDeviceFormFactor (\r
 VOID\r
 DisplayMemoryDeviceFormFactor (\r
-  UINT8 FormFactor,\r
-  UINT8 Option\r
+  IN UINT8 FormFactor,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Memory Device (Type 17) type.\r
+\r
+  @param[in] Type     The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryDeviceType (\r
 VOID\r
 DisplayMemoryDeviceType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Memory Device (Type 17) details.\r
+\r
+  @param[in] Para     The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryDeviceTypeDetail (\r
 VOID\r
 DisplayMemoryDeviceTypeDetail (\r
-  UINT16  Parameter,\r
-  UINT8   Option\r
+  IN UINT16  Para,\r
+  IN UINT8   Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// 32-bit Memory Error Information (Type 18)\r
-//\r
+/**\r
+  Display 32-bit Memory Error Information (Type 18) type.\r
+\r
+  @param[in] ErrorType  The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryErrorType (\r
 VOID\r
 DisplayMemoryErrorType (\r
-  UINT8 ErrorType,\r
-  UINT8 Option\r
+  IN UINT8 ErrorType,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display 32-bit Memory Error Information (Type 18) error granularity.\r
+\r
+  @param[in] Granularity  The key of the structure.\r
+  @param[in] Option       The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryErrorGranularity (\r
 VOID\r
 DisplayMemoryErrorGranularity (\r
-  UINT8 Granularity,\r
-  UINT8 Option\r
+  IN UINT8 Granularity,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display 32-bit Memory Error Information (Type 18) error information.\r
+\r
+  @param[in] Operation  The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryErrorOperation (\r
 VOID\r
 DisplayMemoryErrorOperation (\r
-  UINT8 Operation,\r
-  UINT8 Option\r
+  IN UINT8 Operation,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Memory Array Mapped Address (Type 19)\r
-// Memory Device Mapped Address  (Type 20)\r
-//\r
-// Built-in Pointing Device  (Type 21)\r
-//\r
+/**\r
+  Display Built-in Pointing Device (Type 21) type information.\r
+\r
+  @param[in] Type     The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayPointingDeviceType (\r
 VOID\r
 DisplayPointingDeviceType (\r
-  UINT8 Type,\r
-  UINT8 Option\r
+  IN UINT8 Type,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Built-in Pointing Device (Type 21) information.\r
+\r
+  @param[in] Interface  The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
 VOID\r
 DisplayPointingDeviceInterface (\r
 VOID\r
 DisplayPointingDeviceInterface (\r
-  UINT8   Interface,\r
-  UINT8   Option\r
+  IN UINT8   Interface,\r
+  IN UINT8   Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Portable Battery  (Type 22)\r
-//\r
+/**\r
+  Display Portable Battery  (Type 22) information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayPBDeviceChemistry (\r
 VOID\r
 DisplayPBDeviceChemistry (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Voltage Probe (Type 26)\r
-//\r
+/**\r
+  Display Voltage Probe (Type 26) location information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayVPLocation (\r
 VOID\r
 DisplayVPLocation (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Voltage Probe (Type 26) status ype information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayVPStatus (\r
 VOID\r
 DisplayVPStatus (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Voltage Probe (Type 27)\r
-//\r
+/**\r
+  Display Cooling (Type 27) status information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayCoolingDeviceStatus (\r
 VOID\r
 DisplayCoolingDeviceStatus (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Cooling (Type 27) type information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayCoolingDeviceType (\r
 VOID\r
 DisplayCoolingDeviceType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Temperature Probe  (Type 28)\r
-//\r
+/**\r
+  Display Temperature Probe (Type 28) status information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayTemperatureProbeStatus (\r
 VOID\r
 DisplayTemperatureProbeStatus (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Temperature Probe  (Type 28) location information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayTemperatureProbeLoc (\r
 VOID\r
 DisplayTemperatureProbeLoc (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Electrical Current Probe (Type 29)\r
-//\r
+/**\r
+  Display Electrical Current Probe (Type 29)  status information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayECPStatus (\r
 VOID\r
 DisplayECPStatus (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
   );\r
+\r
+/**\r
+  Display Electrical Current Probe (Type 29) location information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayECPLoc (\r
 VOID\r
 DisplayECPLoc (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Management Device  (Type 34)\r
-//\r
+/**\r
+  Display Management Device (Type 34) information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayMDType (\r
 VOID\r
 DisplayMDType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
-  );\r
-VOID\r
-DisplayMDAddressType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// Memory Channel  (Type 37)\r
-//\r
+/**\r
+  Display Memory Channel (Type 37) information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayMemoryChannelType (\r
 VOID\r
 DisplayMemoryChannelType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
   );\r
 \r
-//\r
-// IPMI Device Information  (Type 38)\r
-//\r
+/**\r
+  Display IPMI Device Information (Type 38) information.\r
+\r
+  @param[in] Key      The key of the structure.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayIPMIDIBMCInterfaceType (\r
 VOID\r
 DisplayIPMIDIBMCInterfaceType (\r
-  UINT8 Key,\r
-  UINT8 Option\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index 8d21967dcc4eaacdafcaccf7e0bc690a6f354e1b..8df7c8112394733fc7a4dc2e64214a6082e76556 100644 (file)
 #include <Guid/Smbios.h>\r
 #include "LibSmbios.h"\r
 \r
 #include <Guid/Smbios.h>\r
 #include "LibSmbios.h"\r
 \r
-EFI_STATUS\r
-LibGetSmbiosSystemGuidAndSerialNumber (\r
-  IN  EFI_GUID    *SystemGuid,\r
-  OUT CHAR8       **SystemSerialNumber\r
-  )\r
-{\r
-  EFI_STATUS                Status;\r
-  SMBIOS_STRUCTURE_TABLE    *SmbiosTable;\r
-  SMBIOS_STRUCTURE_POINTER  Smbios;\r
-  SMBIOS_STRUCTURE_POINTER  SmbiosEnd;\r
-  UINT16                    Index;\r
-\r
-  Status = GetSystemConfigurationTable (&gEfiSmbiosTableGuid, (VOID **) &SmbiosTable);\r
-  if (EFI_ERROR (Status)) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  Smbios.Hdr    = (SMBIOS_HEADER *) ((UINTN) (SmbiosTable->TableAddress));\r
-\r
-  SmbiosEnd.Raw = (UINT8 *) ((UINTN) (SmbiosTable->TableAddress + SmbiosTable->TableLength));\r
-  for (Index = 0; Index < SmbiosTable->TableLength; Index++) {\r
-    if (Smbios.Hdr->Type == 1) {\r
-      if (Smbios.Hdr->Length < 0x19) {\r
-        //\r
-        // Older version did not support Guid and Serial number\r
-        //\r
-        continue;\r
-      }\r
-      //\r
-      // SMBIOS tables are byte packed so we need to do a byte copy to\r
-      //  prevend alignment faults on Itanium-based platform.\r
-      //\r
-      CopyMem (SystemGuid, &Smbios.Type1->Uuid, sizeof (EFI_GUID));\r
-      *SystemSerialNumber = LibGetSmbiosString (&Smbios, Smbios.Type1->SerialNumber);\r
-      return EFI_SUCCESS;\r
-    }\r
-    //\r
-    // Make Smbios point to the next record\r
-    //\r
-    LibGetSmbiosString (&Smbios, (UINT16) (-1));\r
-\r
-    if (Smbios.Raw >= SmbiosEnd.Raw) {\r
-      //\r
-      // SMBIOS 2.1 incorrectly stated the length of SmbiosTable as 0x1e.\r
-      // given this we must double check against the lenght of\r
-      // the structure. My home PC has this bug.ruthard\r
-      //\r
-      return EFI_SUCCESS;\r
-    }\r
-  }\r
+/**\r
+  Return SMBIOS string given the string number.\r
 \r
 \r
-  return EFI_SUCCESS;\r
-}\r
+  @param[in] Smbios         Pointer to SMBIOS structure.\r
+  @param[in] StringNumber   String number to return. -1 is used to skip all strings and\r
+                            point to the next SMBIOS structure.\r
 \r
 \r
-CHAR8 *\r
+  @return Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1\r
+**/\r
+CHAR8*\r
 LibGetSmbiosString (\r
   IN  SMBIOS_STRUCTURE_POINTER    *Smbios,\r
   IN  UINT16                      StringNumber\r
   )\r
 LibGetSmbiosString (\r
   IN  SMBIOS_STRUCTURE_POINTER    *Smbios,\r
   IN  UINT16                      StringNumber\r
   )\r
-/*++\r
-Routine Description:\r
-  Return SMBIOS string given the string number.\r
-\r
-  Arguments:\r
-      Smbios       - Pointer to SMBIOS structure\r
-      StringNumber - String number to return. -1 is used to skip all strings and\r
-                     point to the next SMBIOS structure.\r
-\r
-  Returns:\r
-      Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1\r
-**/\r
 {\r
   UINT16  Index;\r
   CHAR8   *String;\r
 {\r
   UINT16  Index;\r
   CHAR8   *String;\r
index b59109c455b2aedc755c773c4f2578c49cb56557..b280306695fcb18474bbad176bca4c7a33d892cd 100644 (file)
@@ -14,7 +14,7 @@
 \r
 #include "../UefiShellDebug1CommandsLib.h"\r
 #include "LibSmbiosView.h"\r
 \r
 #include "../UefiShellDebug1CommandsLib.h"\r
 #include "LibSmbiosView.h"\r
-#include "smbiosview.h"\r
+#include "SmbiosView.h"\r
 #include "PrintInfo.h"\r
 #include "QueryTable.h"\r
 \r
 #include "PrintInfo.h"\r
 #include "QueryTable.h"\r
 \r
@@ -32,6 +32,12 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
   {NULL, TypeMax}\r
   };\r
 \r
   {NULL, TypeMax}\r
   };\r
 \r
+/**\r
+  Function for 'smbiosview' command.\r
+\r
+  @param[in] ImageHandle  Handle to the Image (NULL if Internal).\r
+  @param[in] SystemTable  Pointer to the System Table (NULL if Internal).\r
+**/\r
 SHELL_STATUS\r
 EFIAPI\r
 ShellCommandRunSmbiosView (\r
 SHELL_STATUS\r
 EFIAPI\r
 ShellCommandRunSmbiosView (\r
@@ -197,7 +203,7 @@ SMBiosView (
   // structure table head.\r
   //\r
 \r
   // structure table head.\r
   //\r
 \r
-  SMBIOS_STRUCTURE_POINTER  pStruct;\r
+  SMBIOS_STRUCTURE_POINTER  SmbiosStruct;\r
   SMBIOS_STRUCTURE_TABLE    *SMBiosTable;\r
 \r
   SMBiosTable = NULL;\r
   SMBIOS_STRUCTURE_TABLE    *SMBiosTable;\r
 \r
   SMBiosTable = NULL;\r
@@ -269,14 +275,14 @@ SMBiosView (
         break;\r
       }\r
       Offset      = (UINT16) (Offset + Length);\r
         break;\r
       }\r
       Offset      = (UINT16) (Offset + Length);\r
-      pStruct.Raw = Buffer;\r
+      SmbiosStruct.Raw = Buffer;\r
 \r
       //\r
       // if QueryType==Random, print this structure.\r
       // if QueryType!=Random, but Hdr->Type==QueryType, also print it.\r
       // only if QueryType != Random and Hdr->Type != QueryType, skiped it.\r
       //\r
 \r
       //\r
       // if QueryType==Random, print this structure.\r
       // if QueryType!=Random, but Hdr->Type==QueryType, also print it.\r
       // only if QueryType != Random and Hdr->Type != QueryType, skiped it.\r
       //\r
-      if (QueryType != STRUCTURE_TYPE_RANDOM && pStruct.Hdr->Type != QueryType) {\r
+      if (QueryType != STRUCTURE_TYPE_RANDOM && SmbiosStruct.Hdr->Type != QueryType) {\r
         continue;\r
       }\r
 \r
         continue;\r
       }\r
 \r
@@ -284,8 +290,8 @@ SMBiosView (
       ShellPrintHiiEx(-1,-1,NULL,\r
         STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE_HANDLE_DUMP_STRUCT),\r
         gShellDebug1HiiHandle,\r
       ShellPrintHiiEx(-1,-1,NULL,\r
         STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE_HANDLE_DUMP_STRUCT),\r
         gShellDebug1HiiHandle,\r
-        pStruct.Hdr->Type,\r
-        pStruct.Hdr->Handle\r
+        SmbiosStruct.Hdr->Type,\r
+        SmbiosStruct.Hdr->Handle\r
        );\r
       ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX_LENGTH), gShellDebug1HiiHandle, Index, Length);\r
       //\r
        );\r
       ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX_LENGTH), gShellDebug1HiiHandle, Index, Length);\r
       //\r
@@ -312,12 +318,12 @@ SMBiosView (
         //\r
         // check structure legality\r
         //\r
         //\r
         // check structure legality\r
         //\r
-        SmbiosCheckStructure (&pStruct);\r
+        SmbiosCheckStructure (&SmbiosStruct);\r
 \r
         //\r
         // Print structure information\r
         //\r
 \r
         //\r
         // Print structure information\r
         //\r
-        SmbiosPrintStructure (&pStruct, gShowType);\r
+        SmbiosPrintStructure (&SmbiosStruct, gShowType);\r
         ShellPrintEx(-1,-1,L"\n");\r
 \r
 /*\r
         ShellPrintEx(-1,-1,L"\n");\r
 \r
 /*\r
@@ -363,9 +369,9 @@ InitSmbiosTableStatistics (
   UINT16                    Offset;\r
   UINT16                    Index;\r
 \r
   UINT16                    Offset;\r
   UINT16                    Index;\r
 \r
-  SMBIOS_STRUCTURE_POINTER  pStruct;\r
+  SMBIOS_STRUCTURE_POINTER  SmbiosStruct;\r
   SMBIOS_STRUCTURE_TABLE    *SMBiosTable;\r
   SMBIOS_STRUCTURE_TABLE    *SMBiosTable;\r
-  STRUCTURE_STATISTICS      *pStatistics;\r
+  STRUCTURE_STATISTICS      *StatisticsPointer;\r
 \r
   SMBiosTable = NULL;\r
   LibSmbiosGetEPS (&SMBiosTable);\r
 \r
   SMBiosTable = NULL;\r
   LibSmbiosGetEPS (&SMBiosTable);\r
@@ -394,7 +400,7 @@ InitSmbiosTableStatistics (
   }\r
 \r
   Offset      = 0;\r
   }\r
 \r
   Offset      = 0;\r
-  pStatistics = mStatisticsTable;\r
+  StatisticsPointer = mStatisticsTable;\r
 \r
   //\r
   // search from the first one\r
 \r
   //\r
   // search from the first one\r
@@ -415,19 +421,19 @@ InitSmbiosTableStatistics (
       break;\r
     }\r
 \r
       break;\r
     }\r
 \r
-    pStruct.Raw = Buffer;\r
+    SmbiosStruct.Raw = Buffer;\r
     Offset      = (UINT16) (Offset + Length);\r
 \r
     //\r
     // general statistics\r
     //\r
     Offset      = (UINT16) (Offset + Length);\r
 \r
     //\r
     // general statistics\r
     //\r
-    pStatistics->Index  = Index;\r
-    pStatistics->Type   = pStruct.Hdr->Type;\r
-    pStatistics->Handle = pStruct.Hdr->Handle;\r
-    pStatistics->Length = Length;\r
-    pStatistics->Addr   = Offset;\r
+    StatisticsPointer->Index  = Index;\r
+    StatisticsPointer->Type   = SmbiosStruct.Hdr->Type;\r
+    StatisticsPointer->Handle = SmbiosStruct.Hdr->Handle;\r
+    StatisticsPointer->Length = Length;\r
+    StatisticsPointer->Addr   = Offset;\r
 \r
 \r
-    pStatistics         = &mStatisticsTable[Index];\r
+    StatisticsPointer         = &mStatisticsTable[Index];\r
   }\r
 \r
   return EFI_SUCCESS;\r
   }\r
 \r
   return EFI_SUCCESS;\r
@@ -448,7 +454,7 @@ DisplayStatisticsTable (
 {\r
   UINTN                   Index;\r
   UINTN                   Num;\r
 {\r
   UINTN                   Index;\r
   UINTN                   Num;\r
-  STRUCTURE_STATISTICS    *pStatistics;\r
+  STRUCTURE_STATISTICS    *StatisticsPointer;\r
   SMBIOS_STRUCTURE_TABLE  *SMBiosTable;\r
 \r
   SMBiosTable = NULL;\r
   SMBIOS_STRUCTURE_TABLE  *SMBiosTable;\r
 \r
   SMBiosTable = NULL;\r
@@ -477,22 +483,22 @@ DisplayStatisticsTable (
   }\r
 \r
   ShellPrintEx(-1,-1,L"============================================================\n");\r
   }\r
 \r
   ShellPrintEx(-1,-1,L"============================================================\n");\r
-  pStatistics = &mStatisticsTable[0];\r
+  StatisticsPointer = &mStatisticsTable[0];\r
   Num         = SMBiosTable->NumberOfSmbiosStructures;\r
   //\r
   // display statistics table content\r
   //\r
   for (Index = 1; Index <= Num; Index++) {\r
   Num         = SMBiosTable->NumberOfSmbiosStructures;\r
   //\r
   // display statistics table content\r
   //\r
   for (Index = 1; Index <= Num; Index++) {\r
-    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX), gShellDebug1HiiHandle, pStatistics->Index);\r
-    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE), gShellDebug1HiiHandle, pStatistics->Type);\r
-    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HANDLE), gShellDebug1HiiHandle, pStatistics->Handle);\r
+    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX), gShellDebug1HiiHandle, StatisticsPointer->Index);\r
+    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE), gShellDebug1HiiHandle, StatisticsPointer->Type);\r
+    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HANDLE), gShellDebug1HiiHandle, StatisticsPointer->Handle);\r
     if (Option >= SHOW_DETAIL) {\r
     if (Option >= SHOW_DETAIL) {\r
-      ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OFFSET), gShellDebug1HiiHandle, pStatistics->Addr);\r
-      ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_LENGTH), gShellDebug1HiiHandle, pStatistics->Length);\r
+      ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OFFSET), gShellDebug1HiiHandle, StatisticsPointer->Addr);\r
+      ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_LENGTH), gShellDebug1HiiHandle, StatisticsPointer->Length);\r
     }\r
 \r
     ShellPrintEx(-1,-1,L"\n");\r
     }\r
 \r
     ShellPrintEx(-1,-1,L"\n");\r
-    pStatistics = &mStatisticsTable[Index];\r
+    StatisticsPointer = &mStatisticsTable[Index];\r
 /*\r
     //\r
     // Display 20 lines and wait for a page break\r
 /*\r
     //\r
     // Display 20 lines and wait for a page break\r
index 3d532b4ab114f163573ae022ef6477965c595980..22d7b241f4459f3bb02c1e3ca19273833f2d2073 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Tools of clarify the content of the smbios table.\r
 \r
 /** @file\r
   Tools of clarify the content of the smbios table.\r
 \r
-  Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   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 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#ifndef _SMBIOS_VIEW_H\r
-#define _SMBIOS_VIEW_H\r
+#ifndef _SMBIOS_VIEW_H_\r
+#define _SMBIOS_VIEW_H_\r
 \r
 #define STRUCTURE_TYPE_RANDOM     (UINT8) 0xFE\r
 #define STRUCTURE_TYPE_INVALID    (UINT8) 0xFF\r
 \r
 #define STRUCTURE_TYPE_RANDOM     (UINT8) 0xFE\r
 #define STRUCTURE_TYPE_INVALID    (UINT8) 0xFF\r
index de754e8bc76a6acc5adebcd9acc816f0d9a014cd..3967768d1ab5cd5affe52a17da68152bd6d2b9b7 100644 (file)
@@ -12,7 +12,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_SHELL_DEBUG1_COMMANDS_LIB_H_)\r
+#ifndef _UEFI_SHELL_DEBUG1_COMMANDS_LIB_H_\r
 #define _UEFI_SHELL_DEBUG1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_SHELL_DEBUG1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
index d4058905fff4f6448fbd388e2c6c7a9b65e8bcb9..f773cb600fbc0e88fd0edadedc831340612234fd 100644 (file)
@@ -53,7 +53,7 @@
   SmbiosView/LibSmbiosView.h\r
   SmbiosView/LibSmbios.h\r
   SmbiosView/QueryTable.h\r
   SmbiosView/LibSmbiosView.h\r
   SmbiosView/LibSmbios.h\r
   SmbiosView/QueryTable.h\r
-  SmbiosView/smbiosview.h\r
+  SmbiosView/SmbiosView.h\r
   UefiShellDebug1CommandsLib.c\r
   UefiShellDebug1CommandsLib.h\r
   UefiShellDebug1CommandsLib.uni\r
   UefiShellDebug1CommandsLib.c\r
   UefiShellDebug1CommandsLib.h\r
   UefiShellDebug1CommandsLib.uni\r
index 658e7df2196142542c56fd40e13386cb201687a8..a6e27e93dac620566f063a1cfc13ffdac6f048a5 100644 (file)
@@ -58,8 +58,6 @@ GetDeviceHandleInfo (
   EFI_HANDLE    *HandleBuffer;\r
   UINTN         Count;\r
 \r
   EFI_HANDLE    *HandleBuffer;\r
   UINTN         Count;\r
 \r
-  UINTN         TestHandle = 0x43;\r
-\r
   if (TheHandle == NULL \r
     || Type == NULL\r
     || Cfg == NULL\r
   if (TheHandle == NULL \r
     || Type == NULL\r
     || Cfg == NULL\r
@@ -71,10 +69,6 @@ GetDeviceHandleInfo (
     return (EFI_INVALID_PARAMETER);\r
   }\r
 \r
     return (EFI_INVALID_PARAMETER);\r
   }\r
 \r
-  if (ConvertHandleToHandleIndex(TheHandle) == TestHandle) {\r
-    TestHandle = TestHandle;\r
-  }\r
-\r
   *Cfg          = FALSE;\r
   *Diag         = FALSE;\r
   *Children     = 0;\r
   *Cfg          = FALSE;\r
   *Diag         = FALSE;\r
   *Children     = 0;\r
index 6b55d909e9df84f3870e91026b30a6df095dab94..986dc3a05625054490cd8c0a65d6fe620f0dda8e 100644 (file)
@@ -211,7 +211,7 @@ DoDiagnostics (
                 FreePool(Language);\r
               }\r
             } \r
                 FreePool(Language);\r
               }\r
             } \r
-            if (Found == FALSE && (Lang == NULL||(Lang!=NULL&&Lang[2]!='-'))){\r
+            if (!Found && (Lang == NULL||(Lang!=NULL&&(Lang[2]!='-')))){\r
               Status = gBS->OpenProtocol(\r
                 DriverHandleList[DriverHandleListLoop],\r
                 &gEfiDriverDiagnosticsProtocolGuid,\r
               Status = gBS->OpenProtocol(\r
                 DriverHandleList[DriverHandleListLoop],\r
                 &gEfiDriverDiagnosticsProtocolGuid,\r
index 656958342ed02c1fdbb23f70e85dcb8c26bdc6be..699053f2d8039cefd7383a29b84a61fbef25c4ee 100644 (file)
@@ -12,7 +12,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_SHELL_DRIVER1_COMMANDS_LIB_H_)\r
+#ifndef _UEFI_SHELL_DRIVER1_COMMANDS_LIB_H_\r
 #define _UEFI_SHELL_DRIVER1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_SHELL_DRIVER1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
index 9d3f4448131a1f250a20cc360db0577c81639700..48dcd4c2fcc1ce0750fdd8b6003575ec4fad0bf2 100644 (file)
@@ -12,7 +12,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_SHELL_INSTALL1_COMMANDS_LIB_H_)\r
+#ifndef _UEFI_SHELL_INSTALL1_COMMANDS_LIB_H_\r
 #define _UEFI_SHELL_INSTALL1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_SHELL_INSTALL1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
index eadb501e2003e8f82ecbedf803a88503d3e8c449..7b3efd2f2cb92990f8b439f5dc236569dcf310e3 100644 (file)
@@ -12,7 +12,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_)\r
+#ifndef _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_\r
 #define _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
index 68130d4db834c5b8677e14cfc4373a744a5de185..266145c08d2706233fa20a5fb4460b9d161667c0 100644 (file)
@@ -516,18 +516,19 @@ CONST CHAR16 AnyF[] = L"F*";
 /**\r
   Function to display mapping information to the user.\r
 \r
 /**\r
   Function to display mapping information to the user.\r
 \r
-  if Specific is specified then Consist and Normal will be ignored since information will\r
+  If Specific is specified then Consist and Normal will be ignored since information will\r
   be printed for the specific item only.\r
 \r
   be printed for the specific item only.\r
 \r
-  @param[in] Verbose                TRUE to display (extra) verbose information\r
-  @param[in] Consist                TRUE to display consistent mappings\r
-  @param[in] Normal                 TRUE to display normal (not consist) mappings\r
-  @param[in] TypeString             pointer to string of filter types\r
-  @param[in] SFO                    TRUE to display output in Standard Output Format\r
-  @param[in] Specific               pointer to string for specific map to display\r
+  @param[in] Verbose                TRUE to display (extra) verbose information.\r
+  @param[in] Consist                TRUE to display consistent mappings.\r
+  @param[in] Normal                 TRUE to display normal (not consist) mappings.\r
+  @param[in] TypeString             Pointer to string of filter types.\r
+  @param[in] SFO                    TRUE to display output in Standard Output Format.\r
+  @param[in] Specific               Pointer to string for specific map to display.\r
+  @param[in] Header                 TRUE to print the header block.\r
 \r
 \r
-  @retval SHELL_SUCCESS               the display was printed\r
-  @retval SHELL_INVALID_PARAMETER     one of Consist or Normal must be TRUE if no Specific\r
+  @retval SHELL_SUCCESS               The display was printed.\r
+  @retval SHELL_INVALID_PARAMETER     One of Consist or Normal must be TRUE if no Specific.\r
 \r
 **/\r
 SHELL_STATUS\r
 \r
 **/\r
 SHELL_STATUS\r
index cf862fef43c3c580d9144a2139eb57551279fc5c..49e187fc7aaeed982555304f5c618e675a9ff489 100644 (file)
@@ -20,7 +20,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_SHELL_LEVEL2_COMMANDS_LIB_H_)\r
+#ifndef _UEFI_SHELL_LEVEL2_COMMANDS_LIB_H_\r
 #define _UEFI_SHELL_LEVEL2_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_SHELL_LEVEL2_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
index 6d19d9cc6803d3fc3c954803fa904d60a0e7a360..bab34a412d01cc1692e6c9b567ccbdd5ce776903 100644 (file)
@@ -12,7 +12,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_SHELL_LEVEL3_COMMANDS_LIB_H_)\r
+#ifndef _UEFI_SHELL_LEVEL3_COMMANDS_LIB_H_\r
 #define _UEFI_SHELL_LEVEL3_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_SHELL_LEVEL3_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
index 9baa3e45bcaf8df0d2b1a2a79cd235156eaee496..32f1c6596d1d74307b8d7cb88f4148c6ddb4be86 100644 (file)
@@ -12,7 +12,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_SHELL_LIB_INTERNAL_H_)\r
+#ifndef _UEFI_SHELL_LIB_INTERNAL_H_\r
 #define _UEFI_SHELL_LIB_INTERNAL_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_SHELL_LIB_INTERNAL_H_\r
 \r
 #include <Uefi.h>\r
index d4326448f63576cb2eb3f74f5d07ba1edd60b170..13d24969f85f42876e254df4f1ee8378ed0a951d 100644 (file)
@@ -20,7 +20,7 @@
 BOOLEAN                                 mIp4ConfigExist    = FALSE;\r
 STATIC EFI_HII_CONFIG_ROUTING_PROTOCOL  *mHiiConfigRouting = NULL;\r
 \r
 BOOLEAN                                 mIp4ConfigExist    = FALSE;\r
 STATIC EFI_HII_CONFIG_ROUTING_PROTOCOL  *mHiiConfigRouting = NULL;\r
 \r
-STATIC CONST UINTN SEC_TO_NS            = 10000000;\r
+STATIC CONST UINTN SecondsToNanoSeconds = 10000000;\r
 STATIC CONST CHAR16 DhcpString[5]       = L"DHCP";\r
 STATIC CONST CHAR16 StaticString[7]     = L"STATIC";\r
 STATIC CONST CHAR16 PermanentString[10] = L"PERMANENT";\r
 STATIC CONST CHAR16 DhcpString[5]       = L"DHCP";\r
 STATIC CONST CHAR16 StaticString[7]     = L"STATIC";\r
 STATIC CONST CHAR16 PermanentString[10] = L"PERMANENT";\r
@@ -173,7 +173,7 @@ TestChildHandle (
   Get the child handle of the NIC handle.\r
 \r
   @param[in] Controller     Routing information: GUID.\r
   Get the child handle of the NIC handle.\r
 \r
   @param[in] Controller     Routing information: GUID.\r
-  @param[in] ChildHandle    Returned child handle.\r
+  @param[out] ChildHandle   Returned child handle.\r
 \r
   @retval EFI_SUCCESS         Successfully to get child handle.\r
 **/\r
 \r
   @retval EFI_SUCCESS         Successfully to get child handle.\r
 **/\r
@@ -1128,7 +1128,7 @@ IfconfigStartIp4(
     Status = gBS->SetTimer (\r
                    TimerToGetMap,\r
                    TimerRelative,\r
     Status = gBS->SetTimer (\r
                    TimerToGetMap,\r
                    TimerRelative,\r
-                   MultU64x32 (SEC_TO_NS, 5)\r
+                   MultU64x32 (SecondsToNanoSeconds, 5)\r
                    );\r
     \r
     if (EFI_ERROR (Status)) {\r
                    );\r
     \r
     if (EFI_ERROR (Status)) {\r
index 7982f99c579cb05b22e5c3299f81a0f79515ed47..ab7658c45bbc0cacd5401139b36002a9771a28cc 100644 (file)
@@ -134,29 +134,21 @@ typedef struct _PING_PRIVATE_DATA {
   PING_IPX_COMPLETION_TOKEN   RxToken;\r
 } PING_PRIVATE_DATA;\r
 \r
   PING_IPX_COMPLETION_TOKEN   RxToken;\r
 } PING_PRIVATE_DATA;\r
 \r
+/**\r
+  Calculate the internet checksum (see RFC 1071).\r
+\r
+  @param[in] Packet  Buffer which contains the data to be checksummed.\r
+  @param[in] Length  Length to be checksummed.\r
+\r
+  @retval Checksum     Returns the 16 bit ones complement of \r
+                       ones complement sum of 16 bit words\r
+**/\r
 UINT16\r
 EFIAPI\r
 NetChecksum (\r
   IN UINT8   *Buffer,\r
   IN UINT32  Length\r
   )\r
 UINT16\r
 EFIAPI\r
 NetChecksum (\r
   IN UINT8   *Buffer,\r
   IN UINT32  Length\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Calculate the internet checksum (see RFC 1071)\r
-\r
-Arguments:\r
-\r
-  Packet             - Buffer which contains the data to be checksummed\r
-  Length             - Length to be checksummed\r
-\r
-Returns:\r
-\r
-  Checksum           - Returns the 16 bit ones complement of \r
-                       ones complement sum of 16 bit words\r
-\r
---*/\r
 {\r
   UINT32  Sum;\r
   UINT8   Odd;\r
 {\r
   UINT32  Sum;\r
   UINT8   Odd;\r
@@ -167,11 +159,11 @@ Returns:
   Sum     = 0;\r
   Odd     = (UINT8) (Length & 1);\r
   Length >>= 1;\r
   Sum     = 0;\r
   Odd     = (UINT8) (Length & 1);\r
   Length >>= 1;\r
-  while (Length--) {\r
+  while ((Length--) != 0) {\r
     Sum += *Packet++;\r
   }\r
 \r
     Sum += *Packet++;\r
   }\r
 \r
-  if (Odd) {\r
+  if (Odd != 0) {\r
     Sum += *(UINT8 *) Packet;\r
   }\r
 \r
     Sum += *(UINT8 *) Packet;\r
   }\r
 \r
index 144063c615b3aa7b5f910b8e0603b586234a25b2..1093479f83d0053e837daaee7272f7d25e5bffe0 100644 (file)
@@ -13,7 +13,7 @@
 \r
 **/\r
 \r
 \r
 **/\r
 \r
-#if !defined (_UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_)\r
+#ifndef _UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_\r
 #define _UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r
 #define _UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_\r
 \r
 #include <Uefi.h>\r