]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update all files to follow doxygen style file header.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Apr 2008 05:36:17 +0000 (05:36 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Apr 2008 05:36:17 +0000 (05:36 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5018 6f19259b-4bc3-4df7-8a09-765794883524

23 files changed:
MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c
MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.c
MdeModulePkg/Library/ExtendedHiiLib/ExtendedHiiLib.inf
MdeModulePkg/Library/ExtendedIfrSupportLib/Common.c
MdeModulePkg/Library/ExtendedIfrSupportLib/ExtendedIfrSupportLib.inf
MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c
MdeModulePkg/Library/ExtendedIfrSupportLib/IfrOpCodeCreation.c
MdeModulePkg/Library/ExtendedIfrSupportLib/LibraryInternal.h
MdeModulePkg/Library/ExtendedIfrSupportLib/R8Lib.c
MdeModulePkg/Library/ExtendedIfrSupportLib/R8Lib.h
MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c
MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c
MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c
MdeModulePkg/Library/PlatformBdsLibNull/BdsPlatform.h
MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf
MdeModulePkg/Library/PlatformBdsLibNull/PlatformData.c

index 656949300e059094a09b18b6bcbc586f6eaeb828..9772f9732522e0c0608a474801434356f921b772 100644 (file)
@@ -1,6 +1,7 @@
-/*++\r
+/** @file\r
+  Support for measurement of DXE performance\r
 \r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -9,15 +10,7 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  DxeCorePerformance.c\r
-\r
-Abstract:\r
-\r
-  Support for measurement of DXE performance \r
-\r
---*/\r
+**/\r
 \r
 \r
 #include <PiDxe.h>\r
index de8aabd77e9531a40a1f6d3fa9aae96cfbb4ed06..bbd9f31bd0dc9b1d336edb2833705749795dde8b 100644 (file)
@@ -1,17 +1,18 @@
 #/** @file\r
-# Component description file for DxeCore Performance Library\r
-#\r
-# This library provides intrastructure for DxeCore to log performance.\r
-# Copyright (c) 2006, Intel Corporation.\r
-#\r
+#  \r
+#    Component description file for DxeCore Performance Library\r
+#  \r
+#   This library provides intrastructure for DxeCore to log performance.\r
+#  \r
+#  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
+#  \r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
+#  \r
 #**/\r
 \r
 [Defines]\r
index ac2ce4e12d96610b3b822a3a4c2fa2fbd7d26642..84241515372222bed9e79f2e6306e15f71cba715 100644 (file)
@@ -1,23 +1,16 @@
-/*++\r
+/** @file\r
+  Performance Library\r
 \r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-\r
-  DxePerformanceLib.c\r
-\r
-Abstract:\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Performance Library\r
-\r
---*/\r
+**/\r
 \r
 \r
 #include <PiDxe.h>\r
index 57d125b51b637515a10af158cce1ccb78bac3ef0..d6457d4ce63da3f266c68d7076e0cf08daa541eb 100644 (file)
@@ -1,17 +1,18 @@
 #/** @file\r
-# Component description file for Dxe Performance Library\r
-#\r
-# This library provides intrastructure for Dxe driver to log performance.\r
-# Copyright (c) 2006 - 2007, Intel Corporation\r
-#\r
+#  \r
+#    Component description file for Dxe Performance Library\r
+#  \r
+#   This library provides intrastructure for Dxe driver to log performance.\r
+#  \r
+#  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
+#  \r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
+#  \r
 #**/\r
 \r
 [Defines]\r
index 22b9763fad099c20bc2c745bc956015042a709c5..1b13da79378595ecbe18cdb2cb989428c33bf818 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   HII Library implementation that uses DXE protocols and services.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index f7b8e340ae28535da8cc5201ea5d48ae38cc433e..65c71baf341b35ec2b57bd290b278c55852fca2e 100644 (file)
@@ -1,17 +1,18 @@
 #/** @file\r
-# Library instance for HII common routines.\r
-#\r
-# This library instance implements the common HII routines.\r
-# Copyright (c) 2006, Intel Corporation\r
-#\r
+#  \r
+#    Library instance for HII common routines.\r
+#  \r
+#   This library instance implements the common HII routines.\r
+#  \r
+#  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
+#  \r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
+#  \r
 #**/\r
 \r
 [Defines]\r
index 36bfb0f43d2a70aeb610bdce6f632ce172be1874..6f8926b42cd1d3462f0e288f1df3dbea75f23667 100644 (file)
-/** @file
-
-Copyright (c) 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution.  The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
-  UefiIfrCommon.c
-
-Abstract:
-
-  Common Library Routines to assist handle HII elements.
-
-
-**/
-
-#include "LibraryInternal.h"
-
-
-//
-// Hii relative protocols
-//
-
-EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase;
-EFI_HII_STRING_PROTOCOL   *gIfrLibHiiString;
-
-EFI_STATUS
-EFIAPI
-ExtendedIfrSupportLibConstructor (
-  IN EFI_HANDLE           ImageHandle,
-  IN EFI_SYSTEM_TABLE     *SystemTable
-  )
-{
-  EFI_STATUS  Status;
-
-  Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gIfrLibHiiDatabase);
-  ASSERT_EFI_ERROR (Status);
-
-  Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gIfrLibHiiString);
-  ASSERT_EFI_ERROR (Status);
-  
-  return EFI_SUCCESS;
-}
-
-
-
-STATIC EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;
-
-EFI_STATUS
-EFIAPI
-IfrLibExtractClassFromHiiHandle (
-  IN      EFI_HII_HANDLE      Handle,
-  OUT     UINT16              *Class,
-  OUT     EFI_STRING_ID       *FormSetTitle,
-  OUT     EFI_STRING_ID       *FormSetHelp
-  )
-/*++
-
-Routine Description:
-  Extract formset class for given HII handle.
-
-Arguments:
-  HiiHandle       - Hii handle
-  Class           - Class of the formset
-  FormSetTitle    - Formset title string
-  FormSetHelp     - Formset help string
-
-Returns:
-  EFI_SUCCESS     - Successfully extract Class for specified Hii handle.
-
---*/
-{
-  EFI_STATUS                   Status;
-  UINTN                        BufferSize;
-  EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;
-  UINT8                        *Package;
-  UINT8                        *OpCodeData;
-  UINT32                       Offset;
-  UINT32                       Offset2;
-  UINT32                       PackageListLength;
-  EFI_HII_PACKAGE_HEADER       PackageHeader;
-
-  ASSERT (Handle != NULL);
-  ASSERT (Class != NULL);  
-  ASSERT (FormSetTitle != NULL);
-  ASSERT (FormSetHelp != NULL);
-
-  *Class = EFI_NON_DEVICE_CLASS;
-  *FormSetTitle = 0;
-  *FormSetHelp = 0;
-
-  //
-  // Get HII PackageList
-  //
-  BufferSize = 0;
-  HiiPackageList = NULL;
-  Status = gIfrLibHiiDatabase->ExportPackageLists (gIfrLibHiiDatabase, Handle, &BufferSize, HiiPackageList);
-  ASSERT (Status != EFI_NOT_FOUND);
-  
-  if (Status == EFI_BUFFER_TOO_SMALL) {
-    HiiPackageList = AllocatePool (BufferSize);
-    ASSERT (HiiPackageList != NULL);
-
-    Status = gIfrLibHiiDatabase->ExportPackageLists (gIfrLibHiiDatabase, Handle, &BufferSize, HiiPackageList);
-  }
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
-
-  //
-  // Get Form package from this HII package List
-  //
-  Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
-  Offset2 = 0;
-  CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
-
-  while (Offset < PackageListLength) {
-    Package = ((UINT8 *) HiiPackageList) + Offset;
-    CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
-
-    if (PackageHeader.Type == EFI_HII_PACKAGE_FORM) {
-      //
-      // Search Class Opcode in this Form Package
-      //
-      Offset2 = sizeof (EFI_HII_PACKAGE_HEADER);
-      while (Offset2 < PackageHeader.Length) {
-        OpCodeData = Package + Offset2;
-
-        if (((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_FORM_SET_OP) {
-          //
-          // Find FormSet OpCode
-          //
-          CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
-          CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
-        }
-
-        if ((((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_GUID_OP) &&
-             CompareGuid (&mIfrVendorGuid, (EFI_GUID *)(OpCodeData + sizeof (EFI_IFR_OP_HEADER))) &&
-            (((EFI_IFR_GUID_CLASS *) OpCodeData)->ExtendOpCode == EFI_IFR_EXTEND_OP_CLASS)
-           ) {
-          //
-          // Find GUIDed Class OpCode
-          //
-          CopyMem (Class, &((EFI_IFR_GUID_CLASS *) OpCodeData)->Class, sizeof (UINT16));
-
-          //
-          // Till now, we ought to have found the formset Opcode
-          //
-          break;
-        }
-
-        Offset2 += ((EFI_IFR_OP_HEADER *) OpCodeData)->Length;
-      }
-
-      if (Offset2 < PackageHeader.Length) {
-        //
-        // Target formset found
-        //
-        break;
-      }
-    }
-
-    Offset += PackageHeader.Length;
-  }
-
-  gBS->FreePool (HiiPackageList);
-
-  return EFI_SUCCESS;
-}
-
-
+/** @file\r
+  Common Library Routines to assist handle HII elements.\r
+\r
+Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "LibraryInternal.h"\r
+\r
+\r
+//\r
+// Hii relative protocols\r
+//\r
+\r
+EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase;\r
+EFI_HII_STRING_PROTOCOL   *gIfrLibHiiString;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+ExtendedIfrSupportLibConstructor (\r
+  IN EFI_HANDLE           ImageHandle,\r
+  IN EFI_SYSTEM_TABLE     *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS  Status;\r
+\r
+  Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gIfrLibHiiDatabase);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gIfrLibHiiString);\r
+  ASSERT_EFI_ERROR (Status);\r
+  \r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
+\r
+STATIC EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+IfrLibExtractClassFromHiiHandle (\r
+  IN      EFI_HII_HANDLE      Handle,\r
+  OUT     UINT16              *Class,\r
+  OUT     EFI_STRING_ID       *FormSetTitle,\r
+  OUT     EFI_STRING_ID       *FormSetHelp\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+  Extract formset class for given HII handle.\r
+\r
+Arguments:\r
+  HiiHandle       - Hii handle\r
+  Class           - Class of the formset\r
+  FormSetTitle    - Formset title string\r
+  FormSetHelp     - Formset help string\r
+\r
+Returns:\r
+  EFI_SUCCESS     - Successfully extract Class for specified Hii handle.\r
+\r
+--*/\r
+{\r
+  EFI_STATUS                   Status;\r
+  UINTN                        BufferSize;\r
+  EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;\r
+  UINT8                        *Package;\r
+  UINT8                        *OpCodeData;\r
+  UINT32                       Offset;\r
+  UINT32                       Offset2;\r
+  UINT32                       PackageListLength;\r
+  EFI_HII_PACKAGE_HEADER       PackageHeader;\r
+\r
+  ASSERT (Handle != NULL);\r
+  ASSERT (Class != NULL);  \r
+  ASSERT (FormSetTitle != NULL);\r
+  ASSERT (FormSetHelp != NULL);\r
+\r
+  *Class = EFI_NON_DEVICE_CLASS;\r
+  *FormSetTitle = 0;\r
+  *FormSetHelp = 0;\r
+\r
+  //\r
+  // Get HII PackageList\r
+  //\r
+  BufferSize = 0;\r
+  HiiPackageList = NULL;\r
+  Status = gIfrLibHiiDatabase->ExportPackageLists (gIfrLibHiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+  ASSERT (Status != EFI_NOT_FOUND);\r
+  \r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+    HiiPackageList = AllocatePool (BufferSize);\r
+    ASSERT (HiiPackageList != NULL);\r
+\r
+    Status = gIfrLibHiiDatabase->ExportPackageLists (gIfrLibHiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+  }\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Get Form package from this HII package List\r
+  //\r
+  Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
+  Offset2 = 0;\r
+  CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));\r
+\r
+  while (Offset < PackageListLength) {\r
+    Package = ((UINT8 *) HiiPackageList) + Offset;\r
+    CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+\r
+    if (PackageHeader.Type == EFI_HII_PACKAGE_FORM) {\r
+      //\r
+      // Search Class Opcode in this Form Package\r
+      //\r
+      Offset2 = sizeof (EFI_HII_PACKAGE_HEADER);\r
+      while (Offset2 < PackageHeader.Length) {\r
+        OpCodeData = Package + Offset2;\r
+\r
+        if (((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_FORM_SET_OP) {\r
+          //\r
+          // Find FormSet OpCode\r
+          //\r
+          CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));\r
+          CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));\r
+        }\r
+\r
+        if ((((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode == EFI_IFR_GUID_OP) &&\r
+             CompareGuid (&mIfrVendorGuid, (EFI_GUID *)(OpCodeData + sizeof (EFI_IFR_OP_HEADER))) &&\r
+            (((EFI_IFR_GUID_CLASS *) OpCodeData)->ExtendOpCode == EFI_IFR_EXTEND_OP_CLASS)\r
+           ) {\r
+          //\r
+          // Find GUIDed Class OpCode\r
+          //\r
+          CopyMem (Class, &((EFI_IFR_GUID_CLASS *) OpCodeData)->Class, sizeof (UINT16));\r
+\r
+          //\r
+          // Till now, we ought to have found the formset Opcode\r
+          //\r
+          break;\r
+        }\r
+\r
+        Offset2 += ((EFI_IFR_OP_HEADER *) OpCodeData)->Length;\r
+      }\r
+\r
+      if (Offset2 < PackageHeader.Length) {\r
+        //\r
+        // Target formset found\r
+        //\r
+        break;\r
+      }\r
+    }\r
+\r
+    Offset += PackageHeader.Length;\r
+  }\r
+\r
+  gBS->FreePool (HiiPackageList);\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
index ec157dd4ecb6591db42168736f4ae4b355fbaac5..08eb4de130c4d6a75ddd9c67f7a1d28235c675b4 100644 (file)
@@ -1,18 +1,16 @@
 #/** @file\r
-# Component name for module UefiEfiIfrSupportLib\r
-#\r
-# FIX ME!\r
-# Copyright (c) 2007, Intel Corporation. All rights reserved.\r
-#\r
+#  \r
+#    Component name for module UefiEfiIfrSupportLib\r
+#  \r
+#  Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
 #  \r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
+#  \r
 #**/\r
 \r
 [Defines]\r
index d3a0faa24835bcee0d60e0b3b4963367859f74e6..a2891de649aab788b59fb53283f9a77230570741 100644 (file)
-/** @file
-
-Copyright (c) 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution.  The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
-  UefiIfrForm.c
-
-Abstract:
-
-  Common Library Routines to assist handle HII elements.
-
-
-**/
-
-#include "LibraryInternal.h"
-
-STATIC
-EFI_STATUS
-GetPackageDataFromPackageList (
-  IN  EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList,
-  IN  UINT32                      PackageIndex,
-  OUT UINT32                      *BufferLen,
-  OUT EFI_HII_PACKAGE_HEADER      **Buffer
-  )
-{
-  UINT32                        Index;
-  EFI_HII_PACKAGE_HEADER        *Package;
-  UINT32                        Offset;
-  UINT32                        PackageListLength;
-  EFI_HII_PACKAGE_HEADER        PackageHeader = {0, 0};
-
-  ASSERT(HiiPackageList != NULL);
-
-  if ((BufferLen == NULL) || (Buffer == NULL)) {
-    return EFI_INVALID_PARAMETER;
-  }
-
-  Package = NULL;
-  Index   = 0;
-  Offset  = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
-  CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
-  while (Offset < PackageListLength) {
-    Package = (EFI_HII_PACKAGE_HEADER *) (((UINT8 *) HiiPackageList) + Offset);
-    CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
-    if (Index == PackageIndex) {
-      break;
-    }
-    Offset += PackageHeader.Length;
-    Index++;
-  }
-  if (Offset >= PackageListLength) {
-    //
-    // no package found in this Package List
-    //
-    return EFI_NOT_FOUND;
-  }
-
-  *BufferLen = PackageHeader.Length;
-  *Buffer    = Package;
-  return EFI_SUCCESS;
-}
-
-STATIC
-EFI_STATUS
-EFIAPI
-UpdateFormPackageData (
-  IN  EFI_GUID               *FormSetGuid,
-  IN  EFI_FORM_ID            FormId,
-  IN  EFI_HII_PACKAGE_HEADER *Package,
-  IN  UINT32                 PackageLength,
-  IN  UINT16                 Label,
-  IN  BOOLEAN                Insert,
-  IN  EFI_HII_UPDATE_DATA    *Data,
-  OUT UINT8                  **TempBuffer,
-  OUT UINT32                 *TempBufferSize
-  )
-{
-  UINTN                     AddSize;
-  UINT8                     *BufferPos;
-  EFI_HII_PACKAGE_HEADER    PackageHeader;
-  UINTN                     Offset;
-  EFI_IFR_OP_HEADER         *IfrOpHdr;
-  BOOLEAN                   GetFormSet;
-  BOOLEAN                   GetForm;
-  UINT8                     ExtendOpCode;
-  UINT16                    LabelNumber;
-  BOOLEAN                   Updated;
-  EFI_IFR_OP_HEADER         *AddOpCode;
-
-  if ((TempBuffer == NULL) || (TempBufferSize == NULL)) {
-    return EFI_INVALID_PARAMETER;
-  }
-
-  *TempBufferSize = PackageLength;
-  if (Data != NULL) {
-    *TempBufferSize += Data->Offset;
-  }
-  *TempBuffer = AllocateZeroPool (*TempBufferSize);
-  if (*TempBuffer == NULL) {
-    return EFI_OUT_OF_RESOURCES;
-  }
-
-  CopyMem (*TempBuffer, Package, sizeof (EFI_HII_PACKAGE_HEADER));
-  *TempBufferSize = sizeof (EFI_HII_PACKAGE_HEADER);
-  BufferPos = *TempBuffer + sizeof (EFI_HII_PACKAGE_HEADER);
-
-  CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
-  IfrOpHdr   = (EFI_IFR_OP_HEADER *)((UINT8 *) Package + sizeof (EFI_HII_PACKAGE_HEADER));
-  Offset     = sizeof (EFI_HII_PACKAGE_HEADER);
-  GetFormSet = (BOOLEAN) ((FormSetGuid == NULL) ? TRUE : FALSE);
-  GetForm    = FALSE;
-  Updated    = FALSE;
-
-  while (Offset < PackageHeader.Length) {
-    CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
-    BufferPos += IfrOpHdr->Length;
-    *TempBufferSize += IfrOpHdr->Length;
-
-    switch (IfrOpHdr->OpCode) {
-    case EFI_IFR_FORM_SET_OP :
-      if (FormSetGuid != NULL) {
-        if (CompareMem (&((EFI_IFR_FORM_SET *) IfrOpHdr)->Guid, FormSetGuid, sizeof (EFI_GUID)) == 0) {
-          GetFormSet = TRUE;
-        }
-      }
-      break;
-
-    case EFI_IFR_FORM_OP:
-      if (CompareMem (&((EFI_IFR_FORM *) IfrOpHdr)->FormId, &FormId, sizeof (EFI_FORM_ID)) == 0) {
-        GetForm = TRUE;
-      }
-      break;
-
-    case EFI_IFR_GUID_OP :
-      if (!GetFormSet || !GetForm || Updated) {
-        //
-        // Go to the next Op-Code
-        //
-        Offset   += IfrOpHdr->Length;
-        IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
-        continue;
-      }
-
-      ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;
-      CopyMem (&LabelNumber, &((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Number, sizeof (UINT16));
-      if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)) {
-        //
-        // Go to the next Op-Code
-        //
-        Offset   += IfrOpHdr->Length;
-        IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
-        continue;
-      }
-
-      if (Insert && (Data != NULL)) {
-        //
-        // insert the DataCount amount of opcodes to TempBuffer if Data is NULL remove
-        // DataCount amount of opcodes unless runing into a label.
-        //
-        AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data;
-        AddSize   = 0;
-        while (AddSize < Data->Offset) {
-          CopyMem (BufferPos, AddOpCode, AddOpCode->Length);
-          BufferPos += AddOpCode->Length;
-          *TempBufferSize += AddOpCode->Length;
-
-          AddSize += AddOpCode->Length;
-          AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length);
-        }
-      } else {
-        //
-        // Search the next Label.
-        //
-        while (TRUE) {
-          Offset   += IfrOpHdr->Length;
-          //
-          // Search the next label and Fail if not label found.
-          //
-          if (Offset >= PackageHeader.Length) {
-            goto Fail;
-          }
-          IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
-          if (IfrOpHdr->OpCode == EFI_IFR_GUID_OP) {
-            ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;
-            if (ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) {
-              break;
-            }
-          }
-        }
-
-        if (Data != NULL) {
-          AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data;
-          AddSize   = 0;
-          while (AddSize < Data->Offset) {
-            CopyMem (BufferPos, AddOpCode, AddOpCode->Length);
-            BufferPos += AddOpCode->Length;
-            *TempBufferSize += AddOpCode->Length;
-
-            AddSize   += AddOpCode->Length;
-            AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length);
-          }
-        }
-
-        //
-        // copy the next label
-        //
-        CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
-        BufferPos += IfrOpHdr->Length;
-        *TempBufferSize += IfrOpHdr->Length;
-      }
-
-      Updated = TRUE;
-      break;
-    default :
-      break;
-    }
-
-    //
-    // Go to the next Op-Code
-    //
-    Offset   += IfrOpHdr->Length;
-    IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
-  }
-
-  //
-  // Update the package length.
-  //
-  PackageHeader.Length = *TempBufferSize;
-  CopyMem (*TempBuffer, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));
-
-Fail:
-  if (!Updated) {
-    gBS->FreePool (*TempBuffer);
-    *TempBufferSize = 0;
-    return EFI_NOT_FOUND;
-  }
-
-  return EFI_SUCCESS;
-}
-
-
-/**
-  This function allows the caller to update a form that has
-  previously been registered with the EFI HII database.
-
-  @param  Handle                 Hii Handle
-  @param  FormSetGuid            The formset should be updated.
-  @param  FormId                 The form should be updated.
-  @param  Label                  Update information starting immediately after this
-                                 label in the IFR
-  @param  Insert                 If TRUE and Data is not NULL, insert data after
-                                 Label. If FALSE, replace opcodes between two
-                                 labels with Data
-  @param  Data                   The adding data; If NULL, remove opcodes between
-                                 two Label.
-
-  @retval EFI_SUCCESS            Update success.
-  @retval Other                  Update fail.
-
-**/
-EFI_STATUS
-EFIAPI
-IfrLibUpdateForm (
-  IN EFI_HII_HANDLE            Handle,
-  IN EFI_GUID                  *FormSetGuid, OPTIONAL
-  IN EFI_FORM_ID               FormId,
-  IN UINT16                    Label,
-  IN BOOLEAN                   Insert,
-  IN EFI_HII_UPDATE_DATA       *Data
-  )
-{
-  EFI_STATUS                   Status;
-  EFI_HII_DATABASE_PROTOCOL    *HiiDatabase;
-  EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;
-  UINT32                       Index;
-  EFI_HII_PACKAGE_LIST_HEADER  *UpdateBuffer;
-  UINTN                        BufferSize;
-  UINT8                        *UpdateBufferPos;
-  EFI_HII_PACKAGE_HEADER       PackageHeader;
-  EFI_HII_PACKAGE_HEADER       *Package;
-  UINT32                       PackageLength;
-  EFI_HII_PACKAGE_HEADER       *TempBuffer;
-  UINT32                       TempBufferSize;
-  BOOLEAN                      Updated;
-
-  if (Data == NULL) {
-    return EFI_INVALID_PARAMETER;
-  }
-
-  HiiDatabase = gIfrLibHiiDatabase;
-
-  //
-  // Get the orginal package list
-  //
-  BufferSize = 0;
-  HiiPackageList   = NULL;
-  Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
-  if (Status == EFI_BUFFER_TOO_SMALL) {
-    HiiPackageList = AllocatePool (BufferSize);
-    ASSERT (HiiPackageList != NULL);
-
-    Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
-    if (EFI_ERROR (Status)) {
-      gBS->FreePool (HiiPackageList);
-      return Status;
-    }
-  }
-
-  //
-  // Calculate and allocate space for retrieval of IFR data
-  //
-  BufferSize += Data->Offset;
-  UpdateBuffer = AllocateZeroPool (BufferSize);
-  if (UpdateBuffer == NULL) {
-    return EFI_OUT_OF_RESOURCES;
-  }
-
-  UpdateBufferPos = (UINT8 *) UpdateBuffer;
-
-  //
-  // copy the package list header
-  //
-  CopyMem (UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER));
-  UpdateBufferPos += sizeof (EFI_HII_PACKAGE_LIST_HEADER);
-
-  Updated = FALSE;
-  for (Index = 0; ; Index++) {
-    Status = GetPackageDataFromPackageList (HiiPackageList, Index, &PackageLength, &Package);
-    if (Status == EFI_SUCCESS) {
-      CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
-      if ((PackageHeader.Type == EFI_HII_PACKAGE_FORM) && !Updated) {
-        Status = UpdateFormPackageData (FormSetGuid, FormId, Package, PackageLength, Label, Insert, Data, (UINT8 **)&TempBuffer, &TempBufferSize);
-        if (!EFI_ERROR(Status)) {
-          if (FormSetGuid == NULL) {
-            Updated = TRUE;
-          }
-          CopyMem (UpdateBufferPos, TempBuffer, TempBufferSize);
-          UpdateBufferPos += TempBufferSize;
-          gBS->FreePool (TempBuffer);
-          continue;
-        }
-      }
-
-      CopyMem (UpdateBufferPos, Package, PackageLength);
-      UpdateBufferPos += PackageLength;
-    } else if (Status == EFI_NOT_FOUND) {
-      break;
-    } else {
-      gBS->FreePool (HiiPackageList);
-      return Status;
-    }
-  }
-
-  //
-  // Update package list length
-  //
-  BufferSize = UpdateBufferPos - (UINT8 *) UpdateBuffer;
-  CopyMem (&UpdateBuffer->PackageLength, &BufferSize, sizeof (UINT32));
-
-  gBS->FreePool (HiiPackageList);
-
-  return HiiDatabase->UpdatePackageList (HiiDatabase, Handle, UpdateBuffer);
-}
-
-
-/**
-  Configure the buffer accrording to ConfigBody strings.
-
-  @param  DefaultId              the ID of default.
-  @param  Buffer                 the start address of buffer.
-  @param  BufferSize             the size of buffer.
-  @param  Number                 the number of the strings.
-
-  @retval EFI_BUFFER_TOO_SMALL   the BufferSize is too small to operate.
-  @retval EFI_INVALID_PARAMETER  Buffer is NULL or BufferSize is 0.
-  @retval EFI_SUCCESS            Operation successful.
-
-**/
-EFI_STATUS
-EFIAPI
-IfrLibExtractDefault(
-  IN VOID                         *Buffer,
-  IN UINTN                        *BufferSize,
-  UINTN                           Number,
-  ...
-  )
-{
-  VA_LIST                         Args;
-  UINTN                           Index;
-  UINT32                          TotalLen;
-  UINT8                           *BufCfgArray;
-  UINT8                           *BufferPos;
-  UINT16                          Offset;
-  UINT16                          Width;
-  UINT8                           *Value;
-
-  if ((Buffer == NULL) || (BufferSize == NULL)) {
-    return EFI_INVALID_PARAMETER;
-  }
-
-  Offset = 0;
-  Width  = 0;
-  Value  = NULL;
-
-  VA_START (Args, Number);
-  for (Index = 0; Index < Number; Index++) {
-    BufCfgArray = (UINT8 *) VA_ARG (Args, VOID *);
-    CopyMem (&TotalLen, BufCfgArray, sizeof (UINT32));
-    BufferPos = BufCfgArray + sizeof (UINT32);
-
-    while ((UINT32)(BufferPos - BufCfgArray) < TotalLen) {
-      CopyMem (&Offset, BufferPos, sizeof (UINT16));
-      BufferPos += sizeof (UINT16);
-      CopyMem (&Width, BufferPos, sizeof (UINT16));
-      BufferPos += sizeof (UINT16);
-      Value = BufferPos;
-      BufferPos += Width;
-
-      if ((UINTN)(Offset + Width) > *BufferSize) {
-        return EFI_BUFFER_TOO_SMALL;
-      }
-
-      CopyMem ((UINT8 *)Buffer + Offset, Value, Width);
-    }
-  }
-  VA_END (Args);
-
-  *BufferSize = (UINTN)Offset;
-
-  return EFI_SUCCESS;
-}
-
-
+/** @file\r
+  Common Library Routines to assist handle HII elements.\r
+\r
+Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "LibraryInternal.h"\r
+\r
+STATIC\r
+EFI_STATUS\r
+GetPackageDataFromPackageList (\r
+  IN  EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList,\r
+  IN  UINT32                      PackageIndex,\r
+  OUT UINT32                      *BufferLen,\r
+  OUT EFI_HII_PACKAGE_HEADER      **Buffer\r
+  )\r
+{\r
+  UINT32                        Index;\r
+  EFI_HII_PACKAGE_HEADER        *Package;\r
+  UINT32                        Offset;\r
+  UINT32                        PackageListLength;\r
+  EFI_HII_PACKAGE_HEADER        PackageHeader = {0, 0};\r
+\r
+  ASSERT(HiiPackageList != NULL);\r
+\r
+  if ((BufferLen == NULL) || (Buffer == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  Package = NULL;\r
+  Index   = 0;\r
+  Offset  = sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
+  CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));\r
+  while (Offset < PackageListLength) {\r
+    Package = (EFI_HII_PACKAGE_HEADER *) (((UINT8 *) HiiPackageList) + Offset);\r
+    CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+    if (Index == PackageIndex) {\r
+      break;\r
+    }\r
+    Offset += PackageHeader.Length;\r
+    Index++;\r
+  }\r
+  if (Offset >= PackageListLength) {\r
+    //\r
+    // no package found in this Package List\r
+    //\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
+  *BufferLen = PackageHeader.Length;\r
+  *Buffer    = Package;\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+STATIC\r
+EFI_STATUS\r
+EFIAPI\r
+UpdateFormPackageData (\r
+  IN  EFI_GUID               *FormSetGuid,\r
+  IN  EFI_FORM_ID            FormId,\r
+  IN  EFI_HII_PACKAGE_HEADER *Package,\r
+  IN  UINT32                 PackageLength,\r
+  IN  UINT16                 Label,\r
+  IN  BOOLEAN                Insert,\r
+  IN  EFI_HII_UPDATE_DATA    *Data,\r
+  OUT UINT8                  **TempBuffer,\r
+  OUT UINT32                 *TempBufferSize\r
+  )\r
+{\r
+  UINTN                     AddSize;\r
+  UINT8                     *BufferPos;\r
+  EFI_HII_PACKAGE_HEADER    PackageHeader;\r
+  UINTN                     Offset;\r
+  EFI_IFR_OP_HEADER         *IfrOpHdr;\r
+  BOOLEAN                   GetFormSet;\r
+  BOOLEAN                   GetForm;\r
+  UINT8                     ExtendOpCode;\r
+  UINT16                    LabelNumber;\r
+  BOOLEAN                   Updated;\r
+  EFI_IFR_OP_HEADER         *AddOpCode;\r
+\r
+  if ((TempBuffer == NULL) || (TempBufferSize == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  *TempBufferSize = PackageLength;\r
+  if (Data != NULL) {\r
+    *TempBufferSize += Data->Offset;\r
+  }\r
+  *TempBuffer = AllocateZeroPool (*TempBufferSize);\r
+  if (*TempBuffer == NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
+  }\r
+\r
+  CopyMem (*TempBuffer, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+  *TempBufferSize = sizeof (EFI_HII_PACKAGE_HEADER);\r
+  BufferPos = *TempBuffer + sizeof (EFI_HII_PACKAGE_HEADER);\r
+\r
+  CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+  IfrOpHdr   = (EFI_IFR_OP_HEADER *)((UINT8 *) Package + sizeof (EFI_HII_PACKAGE_HEADER));\r
+  Offset     = sizeof (EFI_HII_PACKAGE_HEADER);\r
+  GetFormSet = (BOOLEAN) ((FormSetGuid == NULL) ? TRUE : FALSE);\r
+  GetForm    = FALSE;\r
+  Updated    = FALSE;\r
+\r
+  while (Offset < PackageHeader.Length) {\r
+    CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);\r
+    BufferPos += IfrOpHdr->Length;\r
+    *TempBufferSize += IfrOpHdr->Length;\r
+\r
+    switch (IfrOpHdr->OpCode) {\r
+    case EFI_IFR_FORM_SET_OP :\r
+      if (FormSetGuid != NULL) {\r
+        if (CompareMem (&((EFI_IFR_FORM_SET *) IfrOpHdr)->Guid, FormSetGuid, sizeof (EFI_GUID)) == 0) {\r
+          GetFormSet = TRUE;\r
+        }\r
+      }\r
+      break;\r
+\r
+    case EFI_IFR_FORM_OP:\r
+      if (CompareMem (&((EFI_IFR_FORM *) IfrOpHdr)->FormId, &FormId, sizeof (EFI_FORM_ID)) == 0) {\r
+        GetForm = TRUE;\r
+      }\r
+      break;\r
+\r
+    case EFI_IFR_GUID_OP :\r
+      if (!GetFormSet || !GetForm || Updated) {\r
+        //\r
+        // Go to the next Op-Code\r
+        //\r
+        Offset   += IfrOpHdr->Length;\r
+        IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);\r
+        continue;\r
+      }\r
+\r
+      ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;\r
+      CopyMem (&LabelNumber, &((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Number, sizeof (UINT16));\r
+      if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)) {\r
+        //\r
+        // Go to the next Op-Code\r
+        //\r
+        Offset   += IfrOpHdr->Length;\r
+        IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);\r
+        continue;\r
+      }\r
+\r
+      if (Insert && (Data != NULL)) {\r
+        //\r
+        // insert the DataCount amount of opcodes to TempBuffer if Data is NULL remove\r
+        // DataCount amount of opcodes unless runing into a label.\r
+        //\r
+        AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data;\r
+        AddSize   = 0;\r
+        while (AddSize < Data->Offset) {\r
+          CopyMem (BufferPos, AddOpCode, AddOpCode->Length);\r
+          BufferPos += AddOpCode->Length;\r
+          *TempBufferSize += AddOpCode->Length;\r
+\r
+          AddSize += AddOpCode->Length;\r
+          AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length);\r
+        }\r
+      } else {\r
+        //\r
+        // Search the next Label.\r
+        //\r
+        while (TRUE) {\r
+          Offset   += IfrOpHdr->Length;\r
+          //\r
+          // Search the next label and Fail if not label found.\r
+          //\r
+          if (Offset >= PackageHeader.Length) {\r
+            goto Fail;\r
+          }\r
+          IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);\r
+          if (IfrOpHdr->OpCode == EFI_IFR_GUID_OP) {\r
+            ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;\r
+            if (ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) {\r
+              break;\r
+            }\r
+          }\r
+        }\r
+\r
+        if (Data != NULL) {\r
+          AddOpCode = (EFI_IFR_OP_HEADER *)Data->Data;\r
+          AddSize   = 0;\r
+          while (AddSize < Data->Offset) {\r
+            CopyMem (BufferPos, AddOpCode, AddOpCode->Length);\r
+            BufferPos += AddOpCode->Length;\r
+            *TempBufferSize += AddOpCode->Length;\r
+\r
+            AddSize   += AddOpCode->Length;\r
+            AddOpCode = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (AddOpCode) + AddOpCode->Length);\r
+          }\r
+        }\r
+\r
+        //\r
+        // copy the next label\r
+        //\r
+        CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);\r
+        BufferPos += IfrOpHdr->Length;\r
+        *TempBufferSize += IfrOpHdr->Length;\r
+      }\r
+\r
+      Updated = TRUE;\r
+      break;\r
+    default :\r
+      break;\r
+    }\r
+\r
+    //\r
+    // Go to the next Op-Code\r
+    //\r
+    Offset   += IfrOpHdr->Length;\r
+    IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);\r
+  }\r
+\r
+  //\r
+  // Update the package length.\r
+  //\r
+  PackageHeader.Length = *TempBufferSize;\r
+  CopyMem (*TempBuffer, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));\r
+\r
+Fail:\r
+  if (!Updated) {\r
+    gBS->FreePool (*TempBuffer);\r
+    *TempBufferSize = 0;\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
+/**\r
+  This function allows the caller to update a form that has\r
+  previously been registered with the EFI HII database.\r
+\r
+  @param  Handle                 Hii Handle\r
+  @param  FormSetGuid            The formset should be updated.\r
+  @param  FormId                 The form should be updated.\r
+  @param  Label                  Update information starting immediately after this\r
+                                 label in the IFR\r
+  @param  Insert                 If TRUE and Data is not NULL, insert data after\r
+                                 Label. If FALSE, replace opcodes between two\r
+                                 labels with Data\r
+  @param  Data                   The adding data; If NULL, remove opcodes between\r
+                                 two Label.\r
+\r
+  @retval EFI_SUCCESS            Update success.\r
+  @retval Other                  Update fail.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+IfrLibUpdateForm (\r
+  IN EFI_HII_HANDLE            Handle,\r
+  IN EFI_GUID                  *FormSetGuid, OPTIONAL\r
+  IN EFI_FORM_ID               FormId,\r
+  IN UINT16                    Label,\r
+  IN BOOLEAN                   Insert,\r
+  IN EFI_HII_UPDATE_DATA       *Data\r
+  )\r
+{\r
+  EFI_STATUS                   Status;\r
+  EFI_HII_DATABASE_PROTOCOL    *HiiDatabase;\r
+  EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;\r
+  UINT32                       Index;\r
+  EFI_HII_PACKAGE_LIST_HEADER  *UpdateBuffer;\r
+  UINTN                        BufferSize;\r
+  UINT8                        *UpdateBufferPos;\r
+  EFI_HII_PACKAGE_HEADER       PackageHeader;\r
+  EFI_HII_PACKAGE_HEADER       *Package;\r
+  UINT32                       PackageLength;\r
+  EFI_HII_PACKAGE_HEADER       *TempBuffer;\r
+  UINT32                       TempBufferSize;\r
+  BOOLEAN                      Updated;\r
+\r
+  if (Data == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  HiiDatabase = gIfrLibHiiDatabase;\r
+\r
+  //\r
+  // Get the orginal package list\r
+  //\r
+  BufferSize = 0;\r
+  HiiPackageList   = NULL;\r
+  Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+  if (Status == EFI_BUFFER_TOO_SMALL) {\r
+    HiiPackageList = AllocatePool (BufferSize);\r
+    ASSERT (HiiPackageList != NULL);\r
+\r
+    Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);\r
+    if (EFI_ERROR (Status)) {\r
+      gBS->FreePool (HiiPackageList);\r
+      return Status;\r
+    }\r
+  }\r
+\r
+  //\r
+  // Calculate and allocate space for retrieval of IFR data\r
+  //\r
+  BufferSize += Data->Offset;\r
+  UpdateBuffer = AllocateZeroPool (BufferSize);\r
+  if (UpdateBuffer == NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
+  }\r
+\r
+  UpdateBufferPos = (UINT8 *) UpdateBuffer;\r
+\r
+  //\r
+  // copy the package list header\r
+  //\r
+  CopyMem (UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER));\r
+  UpdateBufferPos += sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
+\r
+  Updated = FALSE;\r
+  for (Index = 0; ; Index++) {\r
+    Status = GetPackageDataFromPackageList (HiiPackageList, Index, &PackageLength, &Package);\r
+    if (Status == EFI_SUCCESS) {\r
+      CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));\r
+      if ((PackageHeader.Type == EFI_HII_PACKAGE_FORM) && !Updated) {\r
+        Status = UpdateFormPackageData (FormSetGuid, FormId, Package, PackageLength, Label, Insert, Data, (UINT8 **)&TempBuffer, &TempBufferSize);\r
+        if (!EFI_ERROR(Status)) {\r
+          if (FormSetGuid == NULL) {\r
+            Updated = TRUE;\r
+          }\r
+          CopyMem (UpdateBufferPos, TempBuffer, TempBufferSize);\r
+          UpdateBufferPos += TempBufferSize;\r
+          gBS->FreePool (TempBuffer);\r
+          continue;\r
+        }\r
+      }\r
+\r
+      CopyMem (UpdateBufferPos, Package, PackageLength);\r
+      UpdateBufferPos += PackageLength;\r
+    } else if (Status == EFI_NOT_FOUND) {\r
+      break;\r
+    } else {\r
+      gBS->FreePool (HiiPackageList);\r
+      return Status;\r
+    }\r
+  }\r
+\r
+  //\r
+  // Update package list length\r
+  //\r
+  BufferSize = UpdateBufferPos - (UINT8 *) UpdateBuffer;\r
+  CopyMem (&UpdateBuffer->PackageLength, &BufferSize, sizeof (UINT32));\r
+\r
+  gBS->FreePool (HiiPackageList);\r
+\r
+  return HiiDatabase->UpdatePackageList (HiiDatabase, Handle, UpdateBuffer);\r
+}\r
+\r
+\r
+/**\r
+  Configure the buffer accrording to ConfigBody strings.\r
+\r
+  @param  DefaultId              the ID of default.\r
+  @param  Buffer                 the start address of buffer.\r
+  @param  BufferSize             the size of buffer.\r
+  @param  Number                 the number of the strings.\r
+\r
+  @retval EFI_BUFFER_TOO_SMALL   the BufferSize is too small to operate.\r
+  @retval EFI_INVALID_PARAMETER  Buffer is NULL or BufferSize is 0.\r
+  @retval EFI_SUCCESS            Operation successful.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+IfrLibExtractDefault(\r
+  IN VOID                         *Buffer,\r
+  IN UINTN                        *BufferSize,\r
+  UINTN                           Number,\r
+  ...\r
+  )\r
+{\r
+  VA_LIST                         Args;\r
+  UINTN                           Index;\r
+  UINT32                          TotalLen;\r
+  UINT8                           *BufCfgArray;\r
+  UINT8                           *BufferPos;\r
+  UINT16                          Offset;\r
+  UINT16                          Width;\r
+  UINT8                           *Value;\r
+\r
+  if ((Buffer == NULL) || (BufferSize == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  Offset = 0;\r
+  Width  = 0;\r
+  Value  = NULL;\r
+\r
+  VA_START (Args, Number);\r
+  for (Index = 0; Index < Number; Index++) {\r
+    BufCfgArray = (UINT8 *) VA_ARG (Args, VOID *);\r
+    CopyMem (&TotalLen, BufCfgArray, sizeof (UINT32));\r
+    BufferPos = BufCfgArray + sizeof (UINT32);\r
+\r
+    while ((UINT32)(BufferPos - BufCfgArray) < TotalLen) {\r
+      CopyMem (&Offset, BufferPos, sizeof (UINT16));\r
+      BufferPos += sizeof (UINT16);\r
+      CopyMem (&Width, BufferPos, sizeof (UINT16));\r
+      BufferPos += sizeof (UINT16);\r
+      Value = BufferPos;\r
+      BufferPos += Width;\r
+\r
+      if ((UINTN)(Offset + Width) > *BufferSize) {\r
+        return EFI_BUFFER_TOO_SMALL;\r
+      }\r
+\r
+      CopyMem ((UINT8 *)Buffer + Offset, Value, Width);\r
+    }\r
+  }\r
+  VA_END (Args);\r
+\r
+  *BufferSize = (UINTN)Offset;\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
index 5a2995c929752683ef3c8ad7cd733a4f12059521..686765b90918b0e114813e7ce16c6ec78b802348 100644 (file)
@@ -1,63 +1,53 @@
-/** @file
-
-Copyright (c) 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution.  The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
-  UefiIfrOpCodeCreation.c
-
-Abstract:
-
-  Library Routines to create IFR independent of string data - assume tokens already exist
-  Primarily to be used for exporting op-codes at a label in pre-defined forms.
-
-Revision History:
-
-
-**/
-
-#include "LibraryInternal.h"
-
-STATIC EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;
-
-EFI_STATUS
-EFIAPI
-CreateBannerOpCode (
-  IN      EFI_STRING_ID       Title,
-  IN      UINT16              LineNumber,
-  IN      UINT8               Alignment,
-  IN OUT EFI_HII_UPDATE_DATA  *Data
-  )
-{
-  EFI_IFR_GUID_BANNER         Banner;
-  UINT8                       *LocalBuffer;
-
-  ASSERT (Data != NULL && Data->Data != NULL);
-
-  if (Data->Offset + sizeof (EFI_IFR_GUID_BANNER) > Data->BufferSize) {
-    return EFI_BUFFER_TOO_SMALL;
-  }
-
-  Banner.Header.OpCode  = EFI_IFR_GUID_OP;
-  Banner.Header.Length  = sizeof (EFI_IFR_GUID_BANNER);
-  Banner.Header.Scope   = 0;
-  CopyMem (&Banner.Guid, &mIfrVendorGuid, sizeof (EFI_IFR_GUID));
-  Banner.ExtendOpCode   = EFI_IFR_EXTEND_OP_BANNER;
-  Banner.Title          = Title;
-  Banner.LineNumber     = LineNumber;
-  Banner.Alignment      = Alignment;
-
-  LocalBuffer = (UINT8 *) Data->Data + Data->Offset;
-  CopyMem (LocalBuffer, &Banner, sizeof (EFI_IFR_GUID_BANNER));
-  Data->Offset += sizeof (EFI_IFR_GUID_BANNER);
-
-  return EFI_SUCCESS;
-}
-
+/** @file\r
+  Library Routines to create IFR independent of string data - assume tokens already exist\r
+  Primarily to be used for exporting op-codes at a label in pre-defined forms.\r
+\r
+Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "LibraryInternal.h"\r
+\r
+STATIC EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+CreateBannerOpCode (\r
+  IN      EFI_STRING_ID       Title,\r
+  IN      UINT16              LineNumber,\r
+  IN      UINT8               Alignment,\r
+  IN OUT EFI_HII_UPDATE_DATA  *Data\r
+  )\r
+{\r
+  EFI_IFR_GUID_BANNER         Banner;\r
+  UINT8                       *LocalBuffer;\r
+\r
+  ASSERT (Data != NULL && Data->Data != NULL);\r
+\r
+  if (Data->Offset + sizeof (EFI_IFR_GUID_BANNER) > Data->BufferSize) {\r
+    return EFI_BUFFER_TOO_SMALL;\r
+  }\r
+\r
+  Banner.Header.OpCode  = EFI_IFR_GUID_OP;\r
+  Banner.Header.Length  = sizeof (EFI_IFR_GUID_BANNER);\r
+  Banner.Header.Scope   = 0;\r
+  CopyMem (&Banner.Guid, &mIfrVendorGuid, sizeof (EFI_IFR_GUID));\r
+  Banner.ExtendOpCode   = EFI_IFR_EXTEND_OP_BANNER;\r
+  Banner.Title          = Title;\r
+  Banner.LineNumber     = LineNumber;\r
+  Banner.Alignment      = Alignment;\r
+\r
+  LocalBuffer = (UINT8 *) Data->Data + Data->Offset;\r
+  CopyMem (LocalBuffer, &Banner, sizeof (EFI_IFR_GUID_BANNER));\r
+  Data->Offset += sizeof (EFI_IFR_GUID_BANNER);\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
index 12a3118ae11cd36138ff4949bf0a78338791f7e6..d526fb21b1b27cd0b76104caa131cfae06ca65f7 100644 (file)
@@ -1,46 +1,38 @@
-/** @file
-
-Copyright (c) 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution.  The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
-  UefiIfrLibraryInternal
-
-Abstract:
-
-  The file contain all library function for Ifr Operations.
-
-
-**/
-
-#ifndef _IFRLIBRARY_INTERNAL_H
-#define _IFRLIBRARY_INTERNAL_H
-
-
-#include <PiDxe.h>
-
-#include <Guid/GlobalVariable.h>
-#include <Protocol/DevicePath.h>
-
-#include <Library/DebugLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/BaseLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/IfrSupportLib.h>
-#include <Library/PcdLib.h>
-
-#include <MdeModuleHii.h>
-
-#include "R8Lib.h"
-
-#endif
+/** @file\r
+  The file contain all library function for Ifr Operations.\r
+\r
+Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _IFRLIBRARY_INTERNAL_H\r
+#define _IFRLIBRARY_INTERNAL_H\r
+\r
+\r
+#include <PiDxe.h>\r
+\r
+#include <Guid/GlobalVariable.h>\r
+#include <Protocol/DevicePath.h>\r
+\r
+#include <Library/DebugLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/UefiRuntimeServicesTableLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/DevicePathLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+#include <Library/IfrSupportLib.h>\r
+#include <Library/PcdLib.h>\r
+\r
+#include <MdeModuleHii.h>\r
+\r
+#include "R8Lib.h"\r
+\r
+#endif\r
index c7e82a28f9495d48848abf322b9477703e2b69e1..4cd0320e2debb7394021cf11c886e0ffdc0b2487 100644 (file)
-/**@file
-  Copyright (c) 2007, Intel Corporation
-
-  All rights reserved. This program and the accompanying materials
-  are licensed and made available under the terms and conditions of the BSD License
-  which accompanies this distribution.  The full text of the license may be found at
-  http://opensource.org/licenses/bsd-license.php
-
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-
-**/
-
-#include "LibraryInternal.h"
-
-
-CHAR16
-InternalNibbleToHexChar (
-  IN UINT8      Nibble
-  )
-/*++
-
-  Routine Description:
-    Converts the low nibble of a byte  to hex unicode character.
-
-  Arguments:
-    Nibble - lower nibble of a byte.
-
-  Returns:
-    Hex unicode character.
-
---*/
-{
-  Nibble &= 0x0F;
-  if (Nibble <= 0x9) {
-    return (CHAR16)(Nibble + L'0');
-  }
-
-  return (CHAR16)(Nibble - 0xA + L'A');
-}
-
-
-/**
-  Converts binary buffer to Unicode string.
-  At a minimum, any blob of data could be represented as a hex string.
-
-  @param  Str                    Pointer to the string.
-  @param  HexStringBufferLength  Length in bytes of buffer to hold the hex string.
-                                 Includes tailing '\0' character. If routine return
-                                 with EFI_SUCCESS, containing length of hex string
-                                 buffer. If routine return with
-                                 EFI_BUFFER_TOO_SMALL, containg length of hex
-                                 string buffer desired.
-  @param  Buf                    Buffer to be converted from.
-  @param  Len                    Length in bytes of the buffer to be converted.
-
-  @retval EFI_SUCCESS            Routine success.
-  @retval EFI_BUFFER_TOO_SMALL   The hex string buffer is too small.
-
-**/
-EFI_STATUS
-R8_BufToHexString (
-  IN OUT CHAR16                    *Str,
-  IN OUT UINTN                     *HexStringBufferLength,
-  IN     UINT8                     *Buf,
-  IN     UINTN                      Len
-  )
-{
-  //
-  // Porting Guide:
-  // This library interface is simply obsolete.
-  // Include the source code to user code.
-  //
-  UINTN       Idx;
-  UINT8       Byte;
-  UINTN       StrLen;
-
-  //
-  // Make sure string is either passed or allocate enough.
-  // It takes 2 Unicode characters (4 bytes) to represent 1 byte of the binary buffer.
-  // Plus the Unicode termination character.
-  //
-  StrLen = Len * 2;
-  if (StrLen > ((*HexStringBufferLength) - 1)) {
-    *HexStringBufferLength = StrLen + 1;
-    return EFI_BUFFER_TOO_SMALL;
-  }
-
-  *HexStringBufferLength = StrLen + 1;
-  //
-  // Ends the string.
-  //
-  Str[StrLen] = L'\0';
-
-  for (Idx = 0; Idx < Len; Idx++) {
-
-    Byte = Buf[Idx];
-    Str[StrLen - 1 - Idx * 2] = InternalNibbleToHexChar (Byte);
-    Str[StrLen - 2 - Idx * 2] = InternalNibbleToHexChar ((UINT8)(Byte >> 4));
-  }
-
-  return EFI_SUCCESS;
-}
-
-
-
-
-/**
-  Converts Unicode string to binary buffer.
-  The conversion may be partial.
-  The first character in the string that is not hex digit stops the conversion.
-  At a minimum, any blob of data could be represented as a hex string.
-
-  @param  Buf                    Pointer to buffer that receives the data.
-  @param  Len                    Length in bytes of the buffer to hold converted
-                                 data. If routine return with EFI_SUCCESS,
-                                 containing length of converted data. If routine
-                                 return with EFI_BUFFER_TOO_SMALL, containg length
-                                 of buffer desired.
-  @param  Str                    String to be converted from.
-  @param  ConvertedStrLen        Length of the Hex String consumed.
-
-  @retval EFI_SUCCESS            Routine Success.
-  @retval EFI_BUFFER_TOO_SMALL   The buffer is too small to hold converted data.
-
-**/
-EFI_STATUS
-R8_HexStringToBuf (
-  IN OUT UINT8                     *Buf,
-  IN OUT UINTN                    *Len,
-  IN     CHAR16                    *Str,
-  OUT    UINTN                     *ConvertedStrLen  OPTIONAL
-  )
-{
-  //
-  // Porting Guide:
-  // This library interface is simply obsolete.
-  // Include the source code to user code.
-  //
-
-  UINTN       HexCnt;
-  UINTN       Idx;
-  UINTN       BufferLength;
-  UINT8       Digit;
-  UINT8       Byte;
-
-  //
-  // Find out how many hex characters the string has.
-  //
-  for (Idx = 0, HexCnt = 0; R8_IsHexDigit (&Digit, Str[Idx]); Idx++, HexCnt++);
-
-  if (HexCnt == 0) {
-    *Len = 0;
-    return EFI_SUCCESS;
-  }
-  //
-  // Two Unicode characters make up 1 buffer byte. Round up.
-  //
-  BufferLength = (HexCnt + 1) / 2;
-
-  //
-  // Test if  buffer is passed enough.
-  //
-  if (BufferLength > (*Len)) {
-    *Len = BufferLength;
-    return EFI_BUFFER_TOO_SMALL;
-  }
-
-  *Len = BufferLength;
-
-  for (Idx = 0; Idx < HexCnt; Idx++) {
-
-    R8_IsHexDigit (&Digit, Str[HexCnt - 1 - Idx]);
-
-    //
-    // For odd charaters, write the lower nibble for each buffer byte,
-    // and for even characters, the upper nibble.
-    //
-    if ((Idx & 1) == 0) {
-      Byte = Digit;
-    } else {
-      Byte = Buf[Idx / 2];
-      Byte &= 0x0F;
-      Byte = (UINT8) (Byte | Digit << 4);
-    }
-
-    Buf[Idx / 2] = Byte;
-  }
-
-  if (ConvertedStrLen != NULL) {
-    *ConvertedStrLen = HexCnt;
-  }
-
-  return EFI_SUCCESS;
-}
-
-
-/**
-  Determines if a Unicode character is a hexadecimal digit.
-  The test is case insensitive.
-
-  @param  Digit                  Pointer to byte that receives the value of the hex
-                                 character.
-  @param  Char                   Unicode character to test.
-
-  @retval TRUE                   If the character is a hexadecimal digit.
-  @retval FALSE                  Otherwise.
-
-**/
-BOOLEAN
-R8_IsHexDigit (
-  OUT UINT8      *Digit,
-  IN  CHAR16      Char
-  )
-{
-  //
-  // Porting Guide:
-  // This library interface is simply obsolete.
-  // Include the source code to user code.
-  //
-
-  if ((Char >= L'0') && (Char <= L'9')) {
-    *Digit = (UINT8) (Char - L'0');
-    return TRUE;
-  }
-
-  if ((Char >= L'A') && (Char <= L'F')) {
-    *Digit = (UINT8) (Char - L'A' + 0x0A);
-    return TRUE;
-  }
-
-  if ((Char >= L'a') && (Char <= L'f')) {
-    *Digit = (UINT8) (Char - L'a' + 0x0A);
-    return TRUE;
-  }
-
-  return FALSE;
-}
-
-
+/** @file\r
+  <Todo: Add file description>\r
+\r
+Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "LibraryInternal.h"\r
+\r
+\r
+CHAR16\r
+InternalNibbleToHexChar (\r
+  IN UINT8      Nibble\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Converts the low nibble of a byte  to hex unicode character.\r
+\r
+  Arguments:\r
+    Nibble - lower nibble of a byte.\r
+\r
+  Returns:\r
+    Hex unicode character.\r
+\r
+--*/\r
+{\r
+  Nibble &= 0x0F;\r
+  if (Nibble <= 0x9) {\r
+    return (CHAR16)(Nibble + L'0');\r
+  }\r
+\r
+  return (CHAR16)(Nibble - 0xA + L'A');\r
+}\r
+\r
+\r
+/**\r
+  Converts binary buffer to Unicode string.\r
+  At a minimum, any blob of data could be represented as a hex string.\r
+\r
+  @param  Str                    Pointer to the string.\r
+  @param  HexStringBufferLength  Length in bytes of buffer to hold the hex string.\r
+                                 Includes tailing '\0' character. If routine return\r
+                                 with EFI_SUCCESS, containing length of hex string\r
+                                 buffer. If routine return with\r
+                                 EFI_BUFFER_TOO_SMALL, containg length of hex\r
+                                 string buffer desired.\r
+  @param  Buf                    Buffer to be converted from.\r
+  @param  Len                    Length in bytes of the buffer to be converted.\r
+\r
+  @retval EFI_SUCCESS            Routine success.\r
+  @retval EFI_BUFFER_TOO_SMALL   The hex string buffer is too small.\r
+\r
+**/\r
+EFI_STATUS\r
+R8_BufToHexString (\r
+  IN OUT CHAR16                    *Str,\r
+  IN OUT UINTN                     *HexStringBufferLength,\r
+  IN     UINT8                     *Buf,\r
+  IN     UINTN                      Len\r
+  )\r
+{\r
+  //\r
+  // Porting Guide:\r
+  // This library interface is simply obsolete.\r
+  // Include the source code to user code.\r
+  //\r
+  UINTN       Idx;\r
+  UINT8       Byte;\r
+  UINTN       StrLen;\r
+\r
+  //\r
+  // Make sure string is either passed or allocate enough.\r
+  // It takes 2 Unicode characters (4 bytes) to represent 1 byte of the binary buffer.\r
+  // Plus the Unicode termination character.\r
+  //\r
+  StrLen = Len * 2;\r
+  if (StrLen > ((*HexStringBufferLength) - 1)) {\r
+    *HexStringBufferLength = StrLen + 1;\r
+    return EFI_BUFFER_TOO_SMALL;\r
+  }\r
+\r
+  *HexStringBufferLength = StrLen + 1;\r
+  //\r
+  // Ends the string.\r
+  //\r
+  Str[StrLen] = L'\0';\r
+\r
+  for (Idx = 0; Idx < Len; Idx++) {\r
+\r
+    Byte = Buf[Idx];\r
+    Str[StrLen - 1 - Idx * 2] = InternalNibbleToHexChar (Byte);\r
+    Str[StrLen - 2 - Idx * 2] = InternalNibbleToHexChar ((UINT8)(Byte >> 4));\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
+\r
+\r
+/**\r
+  Converts Unicode string to binary buffer.\r
+  The conversion may be partial.\r
+  The first character in the string that is not hex digit stops the conversion.\r
+  At a minimum, any blob of data could be represented as a hex string.\r
+\r
+  @param  Buf                    Pointer to buffer that receives the data.\r
+  @param  Len                    Length in bytes of the buffer to hold converted\r
+                                 data. If routine return with EFI_SUCCESS,\r
+                                 containing length of converted data. If routine\r
+                                 return with EFI_BUFFER_TOO_SMALL, containg length\r
+                                 of buffer desired.\r
+  @param  Str                    String to be converted from.\r
+  @param  ConvertedStrLen        Length of the Hex String consumed.\r
+\r
+  @retval EFI_SUCCESS            Routine Success.\r
+  @retval EFI_BUFFER_TOO_SMALL   The buffer is too small to hold converted data.\r
+\r
+**/\r
+EFI_STATUS\r
+R8_HexStringToBuf (\r
+  IN OUT UINT8                     *Buf,\r
+  IN OUT UINTN                    *Len,\r
+  IN     CHAR16                    *Str,\r
+  OUT    UINTN                     *ConvertedStrLen  OPTIONAL\r
+  )\r
+{\r
+  //\r
+  // Porting Guide:\r
+  // This library interface is simply obsolete.\r
+  // Include the source code to user code.\r
+  //\r
+\r
+  UINTN       HexCnt;\r
+  UINTN       Idx;\r
+  UINTN       BufferLength;\r
+  UINT8       Digit;\r
+  UINT8       Byte;\r
+\r
+  //\r
+  // Find out how many hex characters the string has.\r
+  //\r
+  for (Idx = 0, HexCnt = 0; R8_IsHexDigit (&Digit, Str[Idx]); Idx++, HexCnt++);\r
+\r
+  if (HexCnt == 0) {\r
+    *Len = 0;\r
+    return EFI_SUCCESS;\r
+  }\r
+  //\r
+  // Two Unicode characters make up 1 buffer byte. Round up.\r
+  //\r
+  BufferLength = (HexCnt + 1) / 2;\r
+\r
+  //\r
+  // Test if  buffer is passed enough.\r
+  //\r
+  if (BufferLength > (*Len)) {\r
+    *Len = BufferLength;\r
+    return EFI_BUFFER_TOO_SMALL;\r
+  }\r
+\r
+  *Len = BufferLength;\r
+\r
+  for (Idx = 0; Idx < HexCnt; Idx++) {\r
+\r
+    R8_IsHexDigit (&Digit, Str[HexCnt - 1 - Idx]);\r
+\r
+    //\r
+    // For odd charaters, write the lower nibble for each buffer byte,\r
+    // and for even characters, the upper nibble.\r
+    //\r
+    if ((Idx & 1) == 0) {\r
+      Byte = Digit;\r
+    } else {\r
+      Byte = Buf[Idx / 2];\r
+      Byte &= 0x0F;\r
+      Byte = (UINT8) (Byte | Digit << 4);\r
+    }\r
+\r
+    Buf[Idx / 2] = Byte;\r
+  }\r
+\r
+  if (ConvertedStrLen != NULL) {\r
+    *ConvertedStrLen = HexCnt;\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
+/**\r
+  Determines if a Unicode character is a hexadecimal digit.\r
+  The test is case insensitive.\r
+\r
+  @param  Digit                  Pointer to byte that receives the value of the hex\r
+                                 character.\r
+  @param  Char                   Unicode character to test.\r
+\r
+  @retval TRUE                   If the character is a hexadecimal digit.\r
+  @retval FALSE                  Otherwise.\r
+\r
+**/\r
+BOOLEAN\r
+R8_IsHexDigit (\r
+  OUT UINT8      *Digit,\r
+  IN  CHAR16      Char\r
+  )\r
+{\r
+  //\r
+  // Porting Guide:\r
+  // This library interface is simply obsolete.\r
+  // Include the source code to user code.\r
+  //\r
+\r
+  if ((Char >= L'0') && (Char <= L'9')) {\r
+    *Digit = (UINT8) (Char - L'0');\r
+    return TRUE;\r
+  }\r
+\r
+  if ((Char >= L'A') && (Char <= L'F')) {\r
+    *Digit = (UINT8) (Char - L'A' + 0x0A);\r
+    return TRUE;\r
+  }\r
+\r
+  if ((Char >= L'a') && (Char <= L'f')) {\r
+    *Digit = (UINT8) (Char - L'a' + 0x0A);\r
+    return TRUE;\r
+  }\r
+\r
+  return FALSE;\r
+}\r
+\r
+\r
index ca9b93989e0893cebbdd573509098db5e6beb373..0e1ab4daee951ce52ca9319dc0453e5df19ee58f 100644 (file)
@@ -1,93 +1,93 @@
-/**@file
-  Copyright (c) 2007, Intel Corporation
-
-  All rights reserved. This program and the accompanying materials
-  are licensed and made available under the terms and conditions of the BSD License
-  which accompanies this distribution.  The full text of the license may be found at
-  http://opensource.org/licenses/bsd-license.php
-
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-
-**/
-
-
-
-/**
-  Converts binary buffer to Unicode string.
-  At a minimum, any blob of data could be represented as a hex string.
-
-  @param  Str                    Pointer to the string.
-  @param  HexStringBufferLength  Length in bytes of buffer to hold the hex string.
-                                 Includes tailing '\0' character. If routine return
-                                 with EFI_SUCCESS, containing length of hex string
-                                 buffer. If routine return with
-                                 EFI_BUFFER_TOO_SMALL, containg length of hex
-                                 string buffer desired.
-  @param  Buf                    Buffer to be converted from.
-  @param  Len                    Length in bytes of the buffer to be converted.
-
-  @retval EFI_SUCCESS            Routine success.
-  @retval EFI_BUFFER_TOO_SMALL   The hex string buffer is too small.
-
-**/
-EFI_STATUS
-R8_BufToHexString (
-  IN OUT CHAR16                    *Str,
-  IN OUT UINTN                     *HexStringBufferLength,
-  IN     UINT8                     *Buf,
-  IN     UINTN                      Len
-  )
-;
-
-
-
-
-/**
-  Converts Unicode string to binary buffer.
-  The conversion may be partial.
-  The first character in the string that is not hex digit stops the conversion.
-  At a minimum, any blob of data could be represented as a hex string.
-
-  @param  Buf                    Pointer to buffer that receives the data.
-  @param  Len                    Length in bytes of the buffer to hold converted
-                                 data. If routine return with EFI_SUCCESS,
-                                 containing length of converted data. If routine
-                                 return with EFI_BUFFER_TOO_SMALL, containg length
-                                 of buffer desired.
-  @param  Str                    String to be converted from.
-  @param  ConvertedStrLen        Length of the Hex String consumed.
-
-  @retval EFI_SUCCESS            Routine Success.
-  @retval EFI_BUFFER_TOO_SMALL   The buffer is too small to hold converted data.
-
-**/
-EFI_STATUS
-R8_HexStringToBuf (
-  IN OUT UINT8                     *Buf,
-  IN OUT UINTN                    *Len,
-  IN     CHAR16                    *Str,
-  OUT    UINTN                     *ConvertedStrLen  OPTIONAL
-  )
-;
-
-/**
-  Determines if a Unicode character is a hexadecimal digit.
-  The test is case insensitive.
-
-  @param  Digit                  Pointer to byte that receives the value of the hex
-                                 character.
-  @param  Char                   Unicode character to test.
-
-  @retval TRUE                   If the character is a hexadecimal digit.
-  @retval FALSE                  Otherwise.
-
-**/
-BOOLEAN
-R8_IsHexDigit (
-  OUT UINT8      *Digit,
-  IN  CHAR16      Char
-  )
-;
-
+/** @file\r
+  <Todo: Add file description>\r
+\r
+Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+\r
+\r
+/**\r
+  Converts binary buffer to Unicode string.\r
+  At a minimum, any blob of data could be represented as a hex string.\r
+\r
+  @param  Str                    Pointer to the string.\r
+  @param  HexStringBufferLength  Length in bytes of buffer to hold the hex string.\r
+                                 Includes tailing '\0' character. If routine return\r
+                                 with EFI_SUCCESS, containing length of hex string\r
+                                 buffer. If routine return with\r
+                                 EFI_BUFFER_TOO_SMALL, containg length of hex\r
+                                 string buffer desired.\r
+  @param  Buf                    Buffer to be converted from.\r
+  @param  Len                    Length in bytes of the buffer to be converted.\r
+\r
+  @retval EFI_SUCCESS            Routine success.\r
+  @retval EFI_BUFFER_TOO_SMALL   The hex string buffer is too small.\r
+\r
+**/\r
+EFI_STATUS\r
+R8_BufToHexString (\r
+  IN OUT CHAR16                    *Str,\r
+  IN OUT UINTN                     *HexStringBufferLength,\r
+  IN     UINT8                     *Buf,\r
+  IN     UINTN                      Len\r
+  )\r
+;\r
+\r
+\r
+\r
+\r
+/**\r
+  Converts Unicode string to binary buffer.\r
+  The conversion may be partial.\r
+  The first character in the string that is not hex digit stops the conversion.\r
+  At a minimum, any blob of data could be represented as a hex string.\r
+\r
+  @param  Buf                    Pointer to buffer that receives the data.\r
+  @param  Len                    Length in bytes of the buffer to hold converted\r
+                                 data. If routine return with EFI_SUCCESS,\r
+                                 containing length of converted data. If routine\r
+                                 return with EFI_BUFFER_TOO_SMALL, containg length\r
+                                 of buffer desired.\r
+  @param  Str                    String to be converted from.\r
+  @param  ConvertedStrLen        Length of the Hex String consumed.\r
+\r
+  @retval EFI_SUCCESS            Routine Success.\r
+  @retval EFI_BUFFER_TOO_SMALL   The buffer is too small to hold converted data.\r
+\r
+**/\r
+EFI_STATUS\r
+R8_HexStringToBuf (\r
+  IN OUT UINT8                     *Buf,\r
+  IN OUT UINTN                    *Len,\r
+  IN     CHAR16                    *Str,\r
+  OUT    UINTN                     *ConvertedStrLen  OPTIONAL\r
+  )\r
+;\r
+\r
+/**\r
+  Determines if a Unicode character is a hexadecimal digit.\r
+  The test is case insensitive.\r
+\r
+  @param  Digit                  Pointer to byte that receives the value of the hex\r
+                                 character.\r
+  @param  Char                   Unicode character to test.\r
+\r
+  @retval TRUE                   If the character is a hexadecimal digit.\r
+  @retval FALSE                  Otherwise.\r
+\r
+**/\r
+BOOLEAN\r
+R8_IsHexDigit (\r
+  OUT UINT8      *Digit,\r
+  IN  CHAR16      Char\r
+  )\r
+;\r
+\r
index 3bfd48614e83c4daf26110a661638c1b98fa24ab..a6666a9c1c08d24ceada401d4ee22bbbc96327d2 100644 (file)
@@ -1,6 +1,7 @@
-/*++\r
+/** @file\r
+  Performance Library\r
 \r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -9,15 +10,7 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  PeiPerformanceLib.c\r
-\r
-Abstract:\r
-\r
-  Performance Library\r
-\r
---*/\r
+**/\r
 \r
 \r
 #include <PiPei.h>\r
index dccf0aba5f363e1782dba2c4ba25155ce0f8fe7e..d7e0c8d66658c8e9c3b9ce1f5165df126647cf02 100644 (file)
@@ -1,17 +1,18 @@
 #/** @file\r
-# Memory-only library functions with no library constructor/destructor\r
-#\r
-# This module provides the performance measurement interfaces in PEI phase, it is one instance of Performance Libarary.\r
-# Copyright (c) 2006, Intel Corporation\r
-#\r
+#  \r
+#    Memory-only library functions with no library constructor/destructor\r
+#  \r
+#   This module provides the performance measurement interfaces in PEI phase, it is one instance of Performance Libarary.\r
+#  \r
+#  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
+#  \r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
+#  \r
 #**/\r
 \r
 [Defines]\r
index 00dbc85eaa0dbb69abbe8d3d80a8261e571a0244..5e63e1ede9a4aa2f275c95eac0b308611b569dc4 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   Recovery Library. This library class defines a set of methods related do recovery.\r
 \r
-Copyright (c) 2006 - 2007 Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
index 51a7e20112200867c8b5ea683d71901baa771e57..404eadd6768e5c5122e00e2054d94629065aeac3 100644 (file)
@@ -1,16 +1,16 @@
 #/** @file\r
-# Recovery for PEIM\r
-#\r
-# Copyright (c) 2006 - 2007, Intel Corporation.\r
-#\r
+#  \r
+#    Recovery for PEIM\r
+#  \r
+#  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
+#  \r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
+#  \r
 #**/\r
 \r
 [Defines]\r
index b8ea626322eef301495d408797d379592b8af990..6cceceab086b5be6d68bf0eed29d138b921a43ae 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   S3 Library. This library class defines a set of methods related do S3 mode\r
 \r
-Copyright (c) 2006 - 2007 Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
index 9b7166f39620e69b7942308f8046347b0263b661..3dfb63b1d8cfb25750da79bae8539c5783d6dd74 100644 (file)
@@ -1,17 +1,18 @@
 #/** @file\r
-# Graphics Library for UEFI drivers\r
-#\r
-# This library provides supports for basic graphic functions.\r
-# Copyright (c) 2006 - 2007, Intel Corporation.\r
-#\r
+#  \r
+#    Graphics Library for UEFI drivers\r
+#  \r
+#   This library provides supports for basic graphic functions.\r
+#  \r
+#  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
+#  \r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
+#  \r
 #**/\r
 \r
 [Defines]\r
index 85633a9dc9f50cd2e2c4c5abbd61c221a99fa3b8..5aaa72ab4d0ceddb17567aa852bef784fa3b29b9 100644 (file)
@@ -1,24 +1,17 @@
-/*++\r
-\r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-\r
-  BdsPlatform.c\r
-\r
-Abstract:\r
-\r
+/** @file\r
   This file include all platform action which can be customized\r
   by IBV/OEM.\r
 \r
---*/\r
+Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
 \r
 #include "BdsPlatform.h"\r
 \r
index 8332f6cc9041caf4e51e4ae9da0722bd03b08dd5..cc90974ee80475bd49ad70bf5dc1e3f8b854a78b 100644 (file)
@@ -1,23 +1,16 @@
-/*++\r
-\r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name: \r
-\r
-  BdsPlatform.h\r
+/** @file\r
+  Head file for BDS Platform specific code\r
 \r
-Abstract:\r
+Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
 \r
-  Head file for BDS Platform specific code\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
---*/\r
+**/\r
 \r
 #ifndef _BDS_PLATFORM_H\r
 #define _BDS_PLATFORM_H\r
index cca4a32647cf12c7f4e3e37b385b79f080e3dfea..86bc5322964541cb7fa715c8653a55548028ae0c 100644 (file)
@@ -1,18 +1,16 @@
 #/** @file\r
-# Component name for module GenericBdsLib\r
-#\r
-# FIX ME!\r
-# Copyright (c) 2007, Intel Corporation. All rights reserved.\r
-#\r
-#  All rights reserved. This program and the accompanying materials       \r
-#  are licensed and made available under the terms and conditions of the BSD License   \r
-#  which accompanies this distribution. The full text of the license may be found at  \r
-#  http://opensource.org/licenses/bsd-license.php           \r
 #  \r
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,      \r
+#    Component name for module GenericBdsLib\r
+#  \r
+#  Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  \r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
+#  \r
 #**/\r
 \r
 [Defines]\r
index 0b19277046932bafeb2463eca46680936bf888b0..7e4adc0007154c54a21db5e3ee6dc836cd00bc70 100644 (file)
@@ -1,24 +1,17 @@
-/*++\r
-\r
-Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name: \r
-\r
-  PlatformData.c\r
-\r
-Abstract:\r
-  \r
+/** @file\r
   Defined the platform specific device path which will be used by\r
   platform Bbd to perform the platform policy connect.\r
 \r
---*/\r
+Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
 \r
 #include "BdsPlatform.h"\r
 \r