]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update code to match EDKII coding style.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Mar 2010 03:26:19 +0000 (03:26 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Mar 2010 03:26:19 +0000 (03:26 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10130 6f19259b-4bc3-4df7-8a09-765794883524

48 files changed:
EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.c
EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.h
EdkCompatibilityPkg/Compatibility/CpuIo2OnCpuIoThunk/CpuIo2OnCpuIoThunk.c
EdkCompatibilityPkg/Compatibility/CpuIo2OnCpuIoThunk/CpuIo2OnCpuIoThunk.h
EdkCompatibilityPkg/Compatibility/DeviceIoOnPciRootBridgeIoThunk/DeviceIoOnPciRootBridgeIoThunk.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.h
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Fonts.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Forms.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/FrameworkHiiOnUefiHiiThunk.inf
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiHandle.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiHandle.h
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Keyboard.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/OpcodeCreation.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/SetupBrowser.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/SetupBrowser.h
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Strings.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrDefault.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrDefault.h
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.h
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParserExpression.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParserExpression.h
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.h
EdkCompatibilityPkg/Compatibility/Fv2OnFvThunk/Fv2OnFvThunk.c
EdkCompatibilityPkg/Compatibility/FvFileLoaderOnLoadFileThunk/FvFileLoaderOnLoadFileThunk.c
EdkCompatibilityPkg/Compatibility/FvOnFv2Thunk/FvOnFv2Thunk.c
EdkCompatibilityPkg/Compatibility/Include/Guid/SmmBaseThunkCommunication.h
EdkCompatibilityPkg/Compatibility/Library/UefiLanguageLib/UefiLanguageLib.c
EdkCompatibilityPkg/Compatibility/PciCfg2OnPciCfgThunk/PciCfg2OnPciCfgThunk.c
EdkCompatibilityPkg/Compatibility/PciCfgOnPciCfg2Thunk/PciCfgOnPciCfg2Thunk.c
EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/ConvTable.c
EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Thunk.h
EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Translate.c
EdkCompatibilityPkg/Compatibility/ReadOnlyVariable2OnReadOnlyVariableThunk/ReadOnlyVariable2OnReadOnlyVariableThunk.c
EdkCompatibilityPkg/Compatibility/ReadOnlyVariableOnReadOnlyVariable2Thunk/ReadOnlyVariableOnReadOnlyVariable2Thunk.c
EdkCompatibilityPkg/Compatibility/SmmAccess2OnSmmAccessThunk/SmmAccess2OnSmmAccessThunk.c
EdkCompatibilityPkg/Compatibility/SmmAccess2OnSmmAccessThunk/SmmAccess2OnSmmAccessThunk.h
EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c
EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c
EdkCompatibilityPkg/Compatibility/SmmControl2OnSmmControlThunk/SmmControl2OnSmmControlThunk.c
EdkCompatibilityPkg/Compatibility/SmmControl2OnSmmControlThunk/SmmControl2OnSmmControlThunk.h
EdkCompatibilityPkg/Compatibility/Uc2OnUcThunk/Uc2OnUcThunk.c
EdkCompatibilityPkg/Compatibility/UcOnUc2Thunk/UcOnUc2Thunk.c

index dbd3c3d0dfba2cb845f87178ce03cd6672a567bb..de4f38ff6cafbabcb4c4f0ea914125f132584d5c 100644 (file)
@@ -516,6 +516,7 @@ BootScriptInformation (
   @param  TableName             Name of the script table. Currently, the only meaningful value is\r
                                 EFI_ACPI_S3_RESUME_SCRIPT_TABLE.\r
   @param  OpCode                The operation code (opcode) number.\r
+  @param  ...                   Argument list that is specific to each opcode. \r
 \r
   @retval EFI_SUCCESS           The operation succeeded. A record was added into the\r
                                 specified script table.\r
@@ -689,7 +690,7 @@ BootScriptCloseTable (
 /**\r
   This routine is entry point of ScriptSave driver.\r
 \r
-  @param  Imagehandle           Handle for this drivers loaded image protocol.\r
+  @param  ImageHandle           Handle for this drivers loaded image protocol.\r
   @param  SystemTable           EFI system table.\r
 \r
   @retval EFI_OUT_OF_RESOURCES  No enough resource\r
index daf84c14e1ccfc376c8e95a677fd4ca8410f918e..3eaaafcfc1c32f14be7c8d4ac5ec0669e23d499f 100644 (file)
@@ -45,6 +45,7 @@
   @param  TableName             Name of the script table. Currently, the only meaningful value is\r
                                 EFI_ACPI_S3_RESUME_SCRIPT_TABLE.\r
   @param  OpCode                The operation code (opcode) number.\r
+  @param  ...                   Argument list that is specific to each opcode. \r
 \r
   @retval EFI_SUCCESS           The operation succeeded. A record was added into the\r
                                 specified script table.\r
index 261d6cd97afd8727196418575a1455ac8b360c78..3ac6555c89aafe4cee807f81078dfe87dbad3819 100644 (file)
@@ -4,7 +4,7 @@
   Intel's Framework CPU I/O Protocol is replaced by CPU I/O 2 Protocol in PI.\r
   This module produces PI CPU I/O 2 Protocol on top of Framework CPU I/O Protocol.\r
 \r
-Copyright (c) 2009, Intel Corporation\r
+Copyright (c) 2009 - 2010, 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
@@ -38,7 +38,7 @@ EFI_CPU_IO2_PROTOCOL mCpuIo2 = {
   @param[in]       Address      The base address of the memory operation.\r
   @param[in]       Count        The number of memory operations to perform. The number of bytes moved\r
                                 is Width size * Count, starting at Address.\r
-  @param[out]      Buffer       The destination buffer to store the results.\r
+  @param[in, out]   Buffer       The destination buffer to store the results.\r
 \r
   @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
   @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
@@ -53,7 +53,7 @@ CpuMemoryServiceRead (
   IN     EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
   IN     UINT64                            Address,\r
   IN     UINTN                             Count,\r
-  OUT    VOID                              *Buffer\r
+  IN OUT VOID                              *Buffer\r
   )\r
 {\r
   return mCpuIo->Mem.Read (\r
@@ -73,7 +73,7 @@ CpuMemoryServiceRead (
   @param[in]       Address      The base address of the memory operation.\r
   @param[in]       Count        The number of memory operations to perform. The number of bytes moved\r
                                 is Width size * Count, starting at Address.\r
-  @param[in]       Buffer       The source buffer from which to write data.\r
+  @param[in, out]   Buffer       The source buffer from which to write data.\r
 \r
   @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
   @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
@@ -88,7 +88,7 @@ CpuMemoryServiceWrite (
   IN     EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
   IN     UINT64                            Address,\r
   IN     UINTN                             Count,\r
-  IN     VOID                              *Buffer\r
+  IN OUT VOID                              *Buffer\r
   )\r
 {\r
   return mCpuIo->Mem.Write (\r
@@ -109,7 +109,7 @@ CpuMemoryServiceWrite (
                                 for aligning the Address if required. \r
   @param[in]       Count        The number of I/O operations to perform. The number of bytes moved\r
                                 is Width size * Count, starting at Address.\r
-  @param[out]      Buffer       The destination buffer to store the results.\r
+  @param[in, out]   Buffer       The destination buffer to store the results.\r
 \r
   @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
   @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
@@ -124,7 +124,7 @@ CpuIoServiceRead (
   IN     EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
   IN     UINT64                            Address,\r
   IN     UINTN                             Count,\r
-  OUT    VOID                              *Buffer\r
+  IN OUT VOID                              *Buffer\r
   )\r
 {\r
   return mCpuIo->Io.Read (\r
@@ -145,7 +145,7 @@ CpuIoServiceRead (
                                 for aligning the Address if required. \r
   @param[in]       Count        The number of I/O operations to perform. The number of bytes moved\r
                                 is Width size * Count, starting at Address.\r
-  @param[in]       Buffer       The source buffer from which to write data.\r
+  @param[in, out]   Buffer       The source buffer from which to write data.\r
 \r
   @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
   @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
@@ -160,7 +160,7 @@ CpuIoServiceWrite (
   IN     EFI_CPU_IO_PROTOCOL_WIDTH         Width,\r
   IN     UINT64                            Address,\r
   IN     UINTN                             Count,\r
-  IN     VOID                              *Buffer\r
+  IN OUT VOID                              *Buffer\r
   )\r
 {\r
   return mCpuIo->Io.Write (\r
index 5c8760e9fa795b9926d1ea1a7dd02c4e530a7539..823bd80c7cf5d16d1a204b87c0c06bb9fe2247d7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal include file for the CPU I/O 2 Protocol thunk driver.\r
 \r
-Copyright (c) 2009, Intel Corporation\r
+Copyright (c) 2009 - 2010, 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
@@ -29,7 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @param[in]       Address      The base address of the memory operation.\r
   @param[in]       Count        The number of memory operations to perform. The number of bytes moved\r
                                 is Width size * Count, starting at Address.\r
-  @param[out]      Buffer       The destination buffer to store the results.\r
+  @param[in, out]      Buffer       The destination buffer to store the results.\r
 \r
   @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
   @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
@@ -55,7 +55,7 @@ CpuMemoryServiceRead (
   @param[in]       Address      The base address of the memory operation.\r
   @param[in]       Count        The number of memory operations to perform. The number of bytes moved\r
                                 is Width size * Count, starting at Address.\r
-  @param[in]       Buffer       The source buffer from which to write data.\r
+  @param[in, out]       Buffer       The source buffer from which to write data.\r
 \r
   @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
   @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
@@ -82,7 +82,7 @@ CpuMemoryServiceWrite (
                                 for aligning the Address if required. \r
   @param[in]       Count        The number of I/O operations to perform. The number of bytes moved\r
                                 is Width size * Count, starting at Address.\r
-  @param[out]      Buffer       The destination buffer to store the results.\r
+  @param[in, out]      Buffer       The destination buffer to store the results.\r
 \r
   @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
   @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
@@ -109,7 +109,7 @@ CpuIoServiceRead (
                                 for aligning the Address if required. \r
   @param[in]       Count        The number of I/O operations to perform. The number of bytes moved\r
                                 is Width size * Count, starting at Address.\r
-  @param[in]       Buffer       The source buffer from which to write data.\r
+  @param[in, out]       Buffer       The source buffer from which to write data.\r
 \r
   @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
   @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
index 91e6d23eadd0148ffb8aefaea04c13a2809a5176..b5ce020458cc81df86dee0e5a975a9b16e14013c 100644 (file)
@@ -12,7 +12,7 @@ This module module layers Device I/O on top of PCI Root Bridge I/O (Segment 0)
    Platform required to support EFI drivers that consume Device I/O\r
    Platform required to support EFI applications that consume Device I/O\r
 \r
-Copyright (c) 2008 Intel Corporation. <BR>\r
+Copyright (c) 2008 - 2010, 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
@@ -389,6 +389,15 @@ DEVICE_IO_PRIVATE_DATA gDeviceIoPrivateDataTemplate = {
   255   // SubordinateBus\r
 };\r
 \r
+/**\r
+  This notification function is invoked when an instance of the\r
+  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL is produced. It installs another instance of the\r
+  EFI_DEVICE_IO_PROTOCOL on the same handle.\r
+\r
+  @param  Event                 The event that occured\r
+  @param  Context               Context of event. Not used in this nofication function.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PciRootBridgeIoNotificationEvent (\r
index 4701a31457a14acdb81c99673401165eebce192f..c49ffe66c6c6e825f1bcd6f1ee47de37cea1666f 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
   This file implements functions related to Config Access Protocols installed by\r
   by HII Thunk Modules. These Config access Protocols are used to thunk UEFI Config \r
   Access Callback to Framework HII Callback and EFI Variable Set/Get operations.\r
@@ -127,38 +127,6 @@ GetStorageFromQuestionId (
   return NULL;\r
 }\r
 \r
-/**\r
-  Get the EFI_IFR_VARSTORE based the ID.\r
-    \r
-  @param FormSet                  The Form Set.\r
-   \r
-  @retval FORMSET_STORAGE *       The EFI_IFR_VARSTORE with the ID.\r
-  @retval NULL                    If the Form Set does not have EFI_IFR_VARSTORE with such ID.\r
-**/\r
-FORMSET_STORAGE *\r
-GetStorageFromVarStoreId (\r
-  IN CONST FORM_BROWSER_FORMSET * FormSet,\r
-  IN       EFI_VARSTORE_ID        VarStoreId\r
-  )\r
-{\r
-  LIST_ENTRY             *StorageList;\r
-  FORMSET_STORAGE        *Storage;\r
-\r
-  StorageList = GetFirstNode (&FormSet->StorageListHead);\r
-\r
-  while (!IsNull (&FormSet->StorageListHead, StorageList)) {\r
-    Storage = FORMSET_STORAGE_FROM_LINK (StorageList);\r
-\r
-    if (VarStoreId == Storage->VarStoreId) {\r
-      return Storage;\r
-    }\r
-\r
-    StorageList = GetNextNode (&FormSet->StorageListHead, StorageList);\r
-  }\r
-  \r
-  return NULL;\r
-}\r
-\r
 /**\r
   Get the EFI_IFR_VARSTORE based the <ConfigHdr> string in a <ConfigRequest>\r
   or a <ConfigResp> string.\r
@@ -377,7 +345,6 @@ CallFormCallBack (
    @retval EFI_INVALID_PARAMETER   If the UEFI Variable Get Service return the size information of the data\r
                                    does not match what has been recorded early in he BUFFER_STORAGE_ENTRY.\r
  **/\r
-\r
 EFI_STATUS\r
 GetUefiVariable (\r
   IN       FORMSET_STORAGE                            *BufferStorage,\r
@@ -651,7 +618,7 @@ Done:
 \r
   ASSERT if the Question Type is not EFI_IFR_TYPE_NUM_SIZE_* or EFI_IFR_TYPE_STRING.\r
   \r
-   @param This             Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL\r
+   @param ConfigAccess     Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL\r
    @param QuestionId       The Question ID.\r
    @param Type             The Question Type.\r
    @param Value            The Question Value.\r
index c26f456620095f71a78e025a9e8ccdc3bcc0d6ab..27f17eb984d9d58dfc18cc707711423d60c02270 100644 (file)
@@ -1,9 +1,9 @@
-/**@file\r
+/** @file\r
   This file contains functions related to Config Access Protocols installed by\r
   by HII Thunk Modules which is used to thunk UEFI Config Access Callback to \r
   Framework HII Callback.\r
   \r
-Copyright (c) 2008, Intel Corporation\r
+Copyright (c) 2008 - 2010, 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
@@ -14,29 +14,38 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _HII_THUNK_CONFIG_ACCESS_H\r
-#define _HII_THUNK_CONFIG_ACCESS_H\r
+#ifndef _HII_THUNK_CONFIG_ACCESS_H_\r
+#define _HII_THUNK_CONFIG_ACCESS_H_\r
 \r
 /**\r
   This function installs a EFI_CONFIG_ACCESS_PROTOCOL instance for a form package registered\r
   by a module using Framework HII Protocol Interfaces.\r
 \r
-   UEFI HII require EFI_HII_CONFIG_ACCESS_PROTOCOL to be installed on a EFI_HANDLE, so\r
-   that Setup Utility can load the Buffer Storage using this protocol.\r
+  UEFI HII require EFI_HII_CONFIG_ACCESS_PROTOCOL to be installed on a EFI_HANDLE, so\r
+  that Setup Utility can load the Buffer Storage using this protocol.\r
    \r
-   @param Packages          The framework package list.\r
-   @param ThunkContext          The Thunk Layer Handle Mapping Database Entry.\r
+  @param Packages             The Package List.\r
+  @param ThunkContext         The Thunk Context.\r
    \r
-   @retval  EFI_SUCCESS         The Config Access Protocol is installed successfully.\r
-   @retval  EFI_OUT_RESOURCE    There is not enough memory.\r
+  @retval  EFI_SUCCESS        The Config Access Protocol is installed successfully.\r
+  @retval  EFI_OUT_RESOURCE   There is not enough memory.\r
    \r
 **/\r
 EFI_STATUS\r
 InstallDefaultConfigAccessProtocol (\r
-  IN  CONST EFI_HII_PACKAGES                         *Packages,\r
-  IN  OUT   HII_THUNK_CONTEXT *ThunkContext\r
+  IN  CONST EFI_HII_PACKAGES                    *Packages,\r
+  IN  OUT   HII_THUNK_CONTEXT                   *ThunkContext\r
   );\r
 \r
+/**\r
+  This function un-installs the EFI_CONFIG_ACCESS_PROTOCOL instance for a form package registered\r
+  by a module using Framework HII Protocol Interfaces.\r
+\r
+  ASSERT if no Config Access is found for such pakcage list or failed to uninstall the protocol.\r
+\r
+  @param ThunkContext         The Thunk Context.\r
+   \r
+**/\r
 VOID\r
 UninstallDefaultConfigAccessProtocol (\r
   IN  HII_THUNK_CONTEXT                   *ThunkContext\r
@@ -76,21 +85,20 @@ ThunkExtractConfig (
 \r
 \r
 /**\r
-\r
   This function implement the EFI_HII_CONFIG_ACCESS_PROTOCOL.RouteConfig\r
   so that data can be written to the data storage such as UEFI Variable or module's\r
   customized storage exposed by EFI_FRAMEWORK_CALLBACK.\r
    \r
-   @param This              Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL\r
-   @param Configuration     A null-terminated Unicode string in <ConfigResp> format.\r
-   @param Progress          A pointer to a string filled in with the offset of the most recent '&' before the first\r
-                            failing name / value pair (or the beginning of the string if the failure is in the first\r
-                            name / value pair) or the terminating NULL if all was successful.\r
+   @param This             Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL\r
+   @param Configuration    A null-terminated Unicode string in <ConfigResp> format.\r
+   @param Progress         A pointer to a string filled in with the offset of the most recent '&' before the first\r
+                           failing name / value pair (or the beginning of the string if the failure is in the first\r
+                           name / value pair) or the terminating NULL if all was successful.\r
    \r
    @retval EFI_INVALID_PARAMETER   If there is no Buffer Storage for this Config Access instance.\r
    @retval EFI_SUCCESS             The setting is saved successfully.\r
    @retval !EFI_SUCCESS            The error returned by UEFI Set Variable or Framework Form Callback Nvwrite.\r
-**/  \r
+**/   \r
 EFI_STATUS\r
 EFIAPI\r
 ThunkRouteConfig (\r
@@ -101,27 +109,26 @@ ThunkRouteConfig (
 \r
 /**\r
   Wrap the EFI_HII_CONFIG_ACCESS_PROTOCOL.CallBack to EFI_FORM_CALLBACK_PROTOCOL.Callback. Therefor,\r
-  the framework HII module willl do no porting (except some porting works needed for callback for EFI_ONE_OF_OPTION opcode)\r
-  and still work with a UEFI HII SetupBrowser.\r
+  the framework HII module willl do no porting and work with a UEFI HII SetupBrowser.\r
    \r
-   @param This                  Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
-   @param Action                Specifies the type of action taken by the browser. See EFI_BROWSER_ACTION_x.\r
-   @param QuestionId            A unique value which is sent to the original exporting driver so that it can identify the\r
-                                type of data to expect. The format of the data tends to vary based on the opcode that\r
-                                generated the callback.\r
-   @param Type                  The type of value for the question. See EFI_IFR_TYPE_x in\r
-                                EFI_IFR_ONE_OF_OPTION.\r
-   @param Value                 A pointer to the data being sent to the original exporting driver. The type is specified\r
-                                by Type. Type EFI_IFR_TYPE_VALUE is defined in\r
-                                EFI_IFR_ONE_OF_OPTION.\r
-   @param ActionRequest         On return, points to the action requested by the callback function. Type\r
-                                EFI_BROWSER_ACTION_REQUEST is specified in SendForm() in the Form\r
-                                Browser Protocol.\r
+   @param This                      Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+   @param Action                    Specifies the type of action taken by the browser. See EFI_BROWSER_ACTION_x.\r
+   @param QuestionId                A unique value which is sent to the original exporting driver so that it can identify the\r
+                                    type of data to expect. The format of the data tends to vary based on the opcode that\r
+                                    generated the callback.\r
+   @param Type                      The type of value for the question. See EFI_IFR_TYPE_x in\r
+                                    EFI_IFR_ONE_OF_OPTION.\r
+   @param Value                     A pointer to the data being sent to the original exporting driver. The type is specified\r
+                                    by Type. Type EFI_IFR_TYPE_VALUE is defined in\r
+                                    EFI_IFR_ONE_OF_OPTION.\r
+   @param ActionRequest             On return, points to the action requested by the callback function. Type\r
+                                    EFI_BROWSER_ACTION_REQUEST is specified in SendForm() in the Form\r
+                                    Browser Protocol.\r
    \r
-   @retval EFI_UNSUPPORTED      If the Framework HII module does not register Callback although it specify the opcode under\r
-                                focuse to be INTERRACTIVE.\r
-   @retval EFI_SUCCESS          The callback complete successfully.\r
-   @retval !EFI_SUCCESS         The error code returned by EFI_FORM_CALLBACK_PROTOCOL.Callback.\r
+   @retval EFI_UNSUPPORTED        If the Framework HII module does not register Callback although it specify the opcode under\r
+                                  focuse to be INTERRACTIVE.\r
+   @retval EFI_SUCCESS            The callback complete successfully.\r
+   @retval !EFI_SUCCESS           The error code returned by EFI_FORM_CALLBACK_PROTOCOL.Callback.\r
    \r
  **/\r
 EFI_STATUS\r
index 27b5d95fbd798123938d432b94f9cbe3e8b39957..808b1e970502c11e8cde20865d85245fae9bbe1f 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   This file contains the Glyph related function.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2010, 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
@@ -167,18 +167,18 @@ HiiGlyphToBlt (
   IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer\r
   )\r
 {\r
-  UINTN X;\r
-  UINTN Y;\r
+  UINTN Xpos;\r
+  UINTN Ypos;\r
 \r
   //\r
   // Convert Monochrome bitmap of the Glyph to BltBuffer structure\r
   //\r
-  for (Y = 0; Y < Height; Y++) {\r
-    for (X = 0; X < Width; X++) {\r
-      if ((((EFI_NARROW_GLYPH *) GlyphBuffer)->GlyphCol1[Y] & (1 << X)) != 0) {\r
-        BltBuffer[Y * Width * Count + (Width - X - 1)] = Foreground;\r
+  for (Ypos = 0; Ypos < Height; Ypos++) {\r
+    for (Xpos = 0; Xpos < Width; Xpos++) {\r
+      if ((((EFI_NARROW_GLYPH *) GlyphBuffer)->GlyphCol1[Ypos] & (1 << Xpos)) != 0) {\r
+        BltBuffer[Ypos * Width * Count + (Width - Xpos - 1)] = Foreground;\r
       } else {\r
-        BltBuffer[Y * Width * Count + (Width - X - 1)] = Background;\r
+        BltBuffer[Ypos * Width * Count + (Width - Xpos - 1)] = Background;\r
       }\r
     }\r
   }\r
index 3ee4dd4f76b41463acb9a057a410d7af69c69e63..bf0585264752f79538a0e31e58da413da063f343 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   This file contains the form processing code to the HII database.\r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -289,7 +289,7 @@ GetPackageData (
   EFI_HII_PACKAGE_HEADER        *Package;\r
   UINT32                        Offset;\r
   UINT32                        PackageListLength;\r
-  EFI_HII_PACKAGE_HEADER        PackageHeader = {0, 0};\r
+  EFI_HII_PACKAGE_HEADER        PackageHeader;\r
 \r
   ASSERT(HiiPackageList != NULL);\r
 \r
@@ -297,6 +297,7 @@ GetPackageData (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  ZeroMem (&PackageHeader, sizeof (PackageHeader));\r
   Package = NULL;\r
   Index   = 0;\r
   Offset  = sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
@@ -407,13 +408,15 @@ LocateLabel (
   with value as the same as the input Label in the Formset registered with UefiHiiHandle. The FormSet GUID \r
   and Form ID is returned if such Label is found.\r
 \r
+  @param Handle       Uefi Hii Handle to be searched.\r
+  @param Label        The first Label ID to be found.\r
+  @param FormsetGuid  The matched FormSet GUID.\r
+  @param FormId       The matched Form ID.\r
   \r
   @retval EFI_INVALID_PARAMETER If UefiHiiHandle is not a valid handle.\r
-  @retval EFI_NOT_FOUND   The package list identified by UefiHiiHandle deos not contain FormSet or\r
-                                         There is no Form ID with value Label found in all Form Sets in the pacakge\r
-                                         list.\r
-                                         \r
-  @retval EFI_SUCCESS       The first found Form ID is returned in FormId.\r
+  @retval EFI_NOT_FOUND         The package list identified by UefiHiiHandle deos not contain FormSet or\r
+                                Form ID with value Label found in all Form Sets in the pacakge list.\r
+  @retval EFI_SUCCESS           The first found Form ID is returned in FormId.\r
 **/\r
 EFI_STATUS\r
 LocateFormId (\r
index 7113d6f154a5c180bc16578bc8039a15b11361f1..3b3a54a104767866a0de1db5ff386f7528025588 100644 (file)
@@ -36,6 +36,7 @@
 \r
 [Sources]\r
   SetupBrowser.c\r
+  SetupBrowser.h\r
   HiiHandle.c\r
   HiiHandle.h\r
   ConfigAccess.c\r
index 48f2ff29bdc0183b03468750869f0c650afbb8b8..6f547fa2c3132687d28f87011474df0225b8b4e0 100644 (file)
@@ -1,8 +1,8 @@
-/**@file\r
+/** @file\r
 Framework to UEFI 2.1 HII Thunk. The driver consume UEFI HII protocols\r
 to produce a Framework HII protocol.\r
 \r
-Copyright (c) 2008, Intel Corporation\r
+Copyright (c) 2008 - 2010, 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
@@ -318,9 +318,9 @@ HiiFindHandles (
                         registered on the handle. The routine will not return the three-spaces language identifier used in \r
                         other functions to indicate non-language-specific strings.\r
 \r
-  @reval EFI_SUCCESS            LanguageString was correctly returned.\r
+  @retval EFI_SUCCESS            LanguageString was correctly returned.\r
  \r
-  @reval EFI_INVALID_PARAMETER The Handle was unknown.\r
+  @retval EFI_INVALID_PARAMETER  The Handle was unknown.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -451,8 +451,8 @@ HiiGetSupportedSecondaryLanguages (
                          but returns a NULL LanguageString if there are no secondary languages associated with the input Handle and \r
                          PrimaryLanguage pair. Type EFI_STRING is defined in String.\r
   \r
-  @reval EFI_SUCCESS            LanguageString was correctly returned.\r
-  @reval EFI_INVALID_PARAMETER  The Handle was unknown.\r
+  @retval EFI_SUCCESS            LanguageString was correctly returned.\r
+  @retval EFI_INVALID_PARAMETER  The Handle was unknown.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 7a905c0dd34020bd62da1ca99c2443901ba4dd98..7d780298082f095f419445f1f587cde04501c89e 100644 (file)
@@ -1,9 +1,9 @@
-/**@file\r
+/** @file\r
 \r
   This file contains global defines and prototype definitions\r
   for the Framework HII to Uefi HII Thunk Module.\r
   \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2010, 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
@@ -14,8 +14,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _HIIDATABASE_H\r
-#define _HIIDATABASE_H\r
+#ifndef _HIIDATABASE_H_\r
+#define _HIIDATABASE_H_\r
 \r
 \r
 #include <FrameworkDxe.h>\r
@@ -239,14 +239,37 @@ extern HII_THUNK_PRIVATE_DATA                     *mHiiThunkPrivateData;
 extern BOOLEAN                                    mInFrameworkUpdatePakcage;\r
 \r
 \r
+/**\r
+\r
+  Registers the various packages that are passed in a Package List.\r
+\r
+  @param This      Pointer of Frameowk HII protocol instance.\r
+  @param Packages  Pointer of HII packages.\r
+  @param Handle    Handle value to be returned.\r
+\r
+  @retval EFI_SUCCESS           Pacakges has added to HII database successfully.\r
+  @retval EFI_INVALID_PARAMETER If Handle or Packages is NULL.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiNewPack (\r
-  IN  EFI_HII_PROTOCOL              *This,\r
-  IN  EFI_HII_PACKAGES              *PackageList,\r
-  OUT FRAMEWORK_EFI_HII_HANDLE      *Handle\r
+  IN  EFI_HII_PROTOCOL               *This,\r
+  IN  EFI_HII_PACKAGES               *Packages,\r
+  OUT FRAMEWORK_EFI_HII_HANDLE       *Handle\r
   );\r
 \r
+/**\r
+\r
+  Remove a package from the HII database.\r
+\r
+  @param This      Pointer of Frameowk HII protocol instance.\r
+  @param Handle    Handle value to be removed.\r
+\r
+  @retval EFI_SUCCESS           Pacakges has added to HII database successfully.\r
+  @retval EFI_INVALID_PARAMETER If Handle or Packages is NULL.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiRemovePack (\r
@@ -254,34 +277,119 @@ HiiRemovePack (
   IN FRAMEWORK_EFI_HII_HANDLE       Handle\r
   );\r
 \r
+/**\r
+  Determines the handles that are currently active in the database.\r
+\r
+  This function determines the handles that are currently active in the database. \r
+  For example, a program wishing to create a Setup-like configuration utility would use this call \r
+  to determine the handles that are available. It would then use calls defined in the forms section \r
+  below to extract forms and then interpret them.\r
+\r
+  @param This                 A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param HandleBufferLength   On input, a pointer to the length of the handle buffer. \r
+                              On output, the length of the handle buffer that is required for the handles found.\r
+  @param Handle               Pointer to an array of EFI_HII_HANDLE instances returned. \r
+                              Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() in the Packages section.\r
+\r
+  @retval EFI_SUCCESS         Handle was updated successfully.\r
\r
+  @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates that Handle is too small \r
+                               to support the number of handles. HandleBufferLength is updated with a value that \r
+                               will enable the data to fit.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiFindHandles (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN OUT UINT16                     *HandleBufferLength,\r
-  OUT    FRAMEWORK_EFI_HII_HANDLE   *Handle\r
+  IN     EFI_HII_PROTOCOL *This,\r
+  IN OUT UINT16           *HandleBufferLength,\r
+  OUT    FRAMEWORK_EFI_HII_HANDLE    *Handle\r
   );\r
 \r
+/**\r
+\r
+  This thunk module only handles UEFI HII packages. The caller of this function \r
+  won't be able to parse the content. Therefore, it is not supported.\r
+  \r
+  This function will ASSERT and return EFI_UNSUPPORTED.\r
+\r
+  @param This            N.A.\r
+  @param Handle          N.A.\r
+  @param BufferSize      N.A.\r
+  @param Buffer          N.A.\r
+\r
+  @retval EFI_UNSUPPORTED\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiExportDatabase (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE   Handle,\r
-  IN OUT UINTN                      *BufferSize,\r
-  OUT    VOID                       *Buffer\r
+  IN     EFI_HII_PROTOCOL *This,\r
+  IN     FRAMEWORK_EFI_HII_HANDLE    Handle,\r
+  IN OUT UINTN            *BufferSize,\r
+  OUT    VOID             *Buffer\r
   );\r
 \r
+/**\r
+  Translates a Unicode character into the corresponding font glyph.\r
+  \r
+  Notes:\r
+    This function is only called by Graphics Console module and GraphicsLib. \r
+    Wrap the Framework HII GetGlyph function to UEFI Font Protocol.\r
+    \r
+    EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib \r
+    complying to UEFI HII.\r
+  \r
+  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Source          A pointer to a Unicode string.\r
+  @param Index           On input, the offset into the string from which to fetch the character. On successful completion, the \r
+                         index is updated to the first character past the character(s) making up the just extracted glyph. \r
+  @param GlyphBuffer     Pointer to an array where the glyphs corresponding to the characters in the source may be stored. \r
+                         GlyphBuffer is assumed to be wide enough to accept a wide glyph character.\r
+  @param BitWidth        If EFI_SUCCESS was returned, the UINT16 pointed to by this value is filled with the length of the glyph in pixels. \r
+                         It is unchanged if the call was unsuccessful.\r
+  @param InternalStatus  To save the time required to read the string from the beginning on each glyph extraction \r
+                         (for example, to ensure that the narrow versus wide glyph mode is correct), this value is \r
+                         updated each time the function is called with the status that is local to the call. The cell pointed \r
+                         to by this parameter must be initialized to zero prior to invoking the call the first time for any string.\r
+\r
+  @retval EFI_SUCCESS     It worked.\r
+  @retval EFI_NOT_FOUND   A glyph for a character was not found.\r
\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiGetGlyph (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN     CHAR16                     *Source,\r
-  IN OUT UINT16                     *Index,\r
-  OUT    UINT8                      **GlyphBuffer,\r
-  OUT    UINT16                     *BitWidth,\r
-  IN OUT UINT32                     *InternalStatus\r
+  IN     EFI_HII_PROTOCOL   *This,\r
+  IN     CHAR16             *Source,\r
+  IN OUT UINT16             *Index,\r
+  OUT    UINT8              **GlyphBuffer,\r
+  OUT    UINT16             *BitWidth,\r
+  IN OUT UINT32             *InternalStatus\r
   );\r
 \r
+/**\r
+  Translates a glyph into the format required for input to the Universal Graphics Adapter (UGA) Block Transfer (BLT) routines.\r
+  \r
+  Notes:\r
+  This function is only called by Graphics Console module and GraphicsLib. \r
+  EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib \r
+  complying to UEFI HII.\r
+  \r
+  @param This         A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param GlyphBuffer  A pointer to the buffer that contains glyph data. \r
+  @param Foreground   The foreground setting requested to be used for the generated BltBuffer data. Type EFI_UGA_PIXEL is defined in "Related Definitions" below.\r
+  @param Background   The background setting requested to be used for the generated BltBuffer data. \r
+  @param Count        The entry in the BltBuffer upon which to act.\r
+  @param Width        The width in bits of the glyph being converted.\r
+  @param Height       The height in bits of the glyph being converted\r
+  @param BltBuffer    A pointer to the buffer that contains the data that is ready to be used by the UGA BLT routines. \r
+\r
+  @retval EFI_SUCCESS  It worked.\r
+  @retval EFI_NOT_FOUND A glyph for a character was not found.\r
\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiGlyphToBlt (\r
@@ -295,16 +403,56 @@ HiiGlyphToBlt (
   IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer\r
   );\r
 \r
+/**\r
+  Create or update a String Token in a String Package.\r
+\r
+  If *Reference == 0, a new String Token is created.\r
+\r
+  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Language        Pointer to a NULL-terminated string containing a single ISO 639-2 language\r
+                         identifier, indicating the language to print. A string consisting of\r
+                         all spaces indicates that the string is applicable to all languages.\r
+  @param Handle          The handle of the language pack to which the string is to be added.\r
+  @param Reference       The string token assigned to the string.\r
+  @param NewString       The string to be added.\r
+\r
+\r
+  @retval EFI_SUCCESS             The string was effectively registered.\r
+  @retval EFI_INVALID_PARAMETER   The Handle was unknown. The string is not created or updated in the\r
+                                  the string package.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiNewString (\r
-  IN     EFI_HII_PROTOCOL        *This,\r
-  IN     CHAR16                  *Language,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE Handle,\r
-  IN OUT STRING_REF              *Reference,\r
-  IN     CHAR16                  *NewString\r
+  IN     EFI_HII_PROTOCOL           *This,\r
+  IN     CHAR16                     *Language,\r
+  IN     FRAMEWORK_EFI_HII_HANDLE   Handle,\r
+  IN OUT STRING_REF                 *Reference,\r
+  IN     CHAR16                     *NewString\r
   );\r
 \r
+/**\r
+ This function extracts a string from a package already registered with the EFI HII database.\r
+\r
+  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Handle          The HII handle on which the string resides.\r
+  @param Token           The string token assigned to the string.\r
+  @param Raw             If TRUE, the string is returned unedited in the internal storage format described\r
+                         above. If false, the string returned is edited by replacing <cr> with <space>\r
+                         and by removing special characters such as the <wide> prefix.\r
+  @param LanguageString  Pointer to a NULL-terminated string containing a single ISO 639-2 language\r
+                         identifier, indicating the language to print. If the LanguageString is empty (starts\r
+                         with a NULL), the default system language will be used to determine the language.\r
+  @param BufferLength    Length of the StringBuffer. If the status reports that the buffer width is too\r
+                         small, this parameter is filled with the length of the buffer needed.\r
+  @param StringBuffer    The buffer designed to receive the characters in the string. Type EFI_STRING is\r
+                         defined in String.\r
+\r
+  @retval EFI_INVALID_PARAMETER If input parameter is invalid.\r
+  @retval EFI_BUFFER_TOO_SMALL  If the *BufferLength is too small.\r
+  @retval EFI_SUCCESS           Operation is successful.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiThunkGetString (\r
@@ -317,103 +465,312 @@ HiiThunkGetString (
   OUT    EFI_STRING                 StringBuffer\r
   );\r
 \r
+/**\r
+  This function removes any new strings that were added after the initial string export for this handle.\r
+  UEFI HII String Protocol does not have Reset String function. This function perform nothing.\r
+\r
+  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Handle          The HII handle on which the string resides.\r
+\r
+  @retval EFI_SUCCESS    This function is a NOP and always return EFI_SUCCESS.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiResetStrings (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE   Handle\r
+  IN     EFI_HII_PROTOCOL   *This,\r
+  IN     FRAMEWORK_EFI_HII_HANDLE      Handle\r
   );\r
 \r
+/**\r
+  Test if all of the characters in a string have corresponding font characters.\r
+\r
+  This is a deprecated API. No Framework HII module is calling it. This function will ASSERT and\r
+  return EFI_UNSUPPORTED.\r
+\r
+  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param StringToTest    A pointer to a Unicode string.\r
+  @param FirstMissing    A pointer to an index into the string. On input, the index of \r
+                         the first character in the StringToTest to examine. On exit, the index \r
+                         of the first character encountered for which a glyph is unavailable. \r
+                         If all glyphs in the string are available, the index is the index of the terminator \r
+                         of the string. \r
+  @param GlyphBufferSize A pointer to a value. On output, if the function returns EFI_SUCCESS, \r
+                         it contains the amount of memory that is required to store the string? glyph equivalent.\r
+\r
+  @retval EFI_UNSUPPORTED  The function performs nothing and return EFI_UNSUPPORTED.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiTestString (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN     CHAR16                     *StringToTest,\r
-  IN OUT UINT32                     *FirstMissing,\r
-  OUT    UINT32                     *GlyphBufferSize\r
+  IN     EFI_HII_PROTOCOL   *This,\r
+  IN     CHAR16             *StringToTest,\r
+  IN OUT UINT32             *FirstMissing,\r
+  OUT    UINT32             *GlyphBufferSize\r
   );\r
 \r
+/**\r
+  Allows a program to determine the primary languages that are supported on a given handle.\r
+\r
+  This routine is intended to be used by drivers to query the interface database for supported languages. \r
+  This routine returns a string of concatenated 3-byte language identifiers, one per string package associated with the handle.\r
+\r
+  @param This           A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Handle         The handle on which the strings reside. Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() \r
+                        in the Packages section.\r
+  @param LanguageString A string allocated by GetPrimaryLanguages() that contains a list of all primary languages \r
+                        registered on the handle. The routine will not return the three-spaces language identifier used in \r
+                        other functions to indicate non-language-specific strings.\r
+\r
+  @retval EFI_SUCCESS            LanguageString was correctly returned.\r
\r
+  @retval EFI_INVALID_PARAMETER  The Handle was unknown.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiGetPrimaryLanguages (\r
-  IN  EFI_HII_PROTOCOL              *This,\r
-  IN  FRAMEWORK_EFI_HII_HANDLE      Handle,\r
-  OUT EFI_STRING                    *LanguageString\r
+  IN  EFI_HII_PROTOCOL            *This,\r
+  IN  FRAMEWORK_EFI_HII_HANDLE    Handle,\r
+  OUT EFI_STRING                  *LanguageString\r
   );\r
 \r
+/**\r
+  Allows a program to determine which secondary languages are supported on a given handle for a given primary language\r
+\r
+  This routine is intended to be used by drivers to query the interface database for supported languages. \r
+  This routine returns a string of concatenated 3-byte language identifiers, one per string package associated with the handle.\r
+\r
+  @param This           A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Handle         The handle on which the strings reside. Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() \r
+                        in the Packages section.\r
+  @param PrimaryLanguage Pointer to a NULL-terminated string containing a single ISO 639-2 language identifier, indicating \r
+                         the primary language.\r
+  @param LanguageString  A string allocated by GetSecondaryLanguages() containing a list of all secondary languages registered \r
+                         on the handle. The routine will not return the three-spaces language identifier used in other functions \r
+                         to indicate non-language-specific strings, nor will it return the primary language. This function succeeds \r
+                         but returns a NULL LanguageString if there are no secondary languages associated with the input Handle and \r
+                         PrimaryLanguage pair. Type EFI_STRING is defined in String.\r
+  \r
+  @retval EFI_SUCCESS            LanguageString was correctly returned.\r
+  @retval EFI_INVALID_PARAMETER  The Handle was unknown.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiGetSecondaryLanguages (\r
-  IN  EFI_HII_PROTOCOL                *This,\r
-  IN  FRAMEWORK_EFI_HII_HANDLE        Handle,\r
-  IN  CHAR16                          *PrimaryLanguage,\r
-  OUT EFI_STRING                      *LanguageString\r
+  IN  EFI_HII_PROTOCOL              *This,\r
+  IN  FRAMEWORK_EFI_HII_HANDLE      Handle,\r
+  IN  CHAR16                        *PrimaryLanguage,\r
+  OUT EFI_STRING                    *LanguageString\r
   );\r
 \r
+/**\r
+\r
+  This function allows a program to extract a part of a string of not more than a given width.\r
+  With repeated calls, this allows a calling program to extract "lines" of text that fit inside\r
+  columns.  The effort of measuring the fit of strings inside columns is localized to this call.\r
+\r
+  This is a deprecated API. No Framework HII module is calling it. This function will ASSERT and\r
+  return EFI_UNSUPPORTED.\r
+\r
+  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Handle          The HII handle on which the string resides.\r
+  @param Token           The string token assigned to the string.\r
+  @param Index           On input, the offset into the string where the line is to start.\r
+                         On output, the index is updated to point to beyond the last character returned\r
+                         in the call.\r
+  @param LineWidth       The maximum width of the line in units of narrow glyphs.\r
+  @param LanguageString  Pointer to a NULL-terminated string containing a single ISO 639-2 language\r
+                         identifier, indicating the language to print. If the LanguageString is empty (starts\r
+                         with a NULL), the default system language will be used to determine the language.\r
+  @param BufferLength    Length of the StringBuffer. If the status reports that the buffer width is too\r
+                         small, this parameter is filled with the length of the buffer needed.\r
+  @param StringBuffer    The buffer designed to receive the characters in the string. Type EFI_STRING is\r
+                         defined in String.\r
+\r
+  @retval EFI_UNSUPPORTED.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiGetLine (\r
-  IN     EFI_HII_PROTOCOL               *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE       Handle,\r
-  IN     STRING_REF                     Token,\r
-  IN OUT UINT16                         *Index,\r
-  IN     UINT16                         LineWidth,\r
-  IN     CHAR16                         *LanguageString,\r
-  IN OUT UINT16                         *BufferLength,\r
-  OUT    EFI_STRING                     StringBuffer\r
+  IN     EFI_HII_PROTOCOL           *This,\r
+  IN     FRAMEWORK_EFI_HII_HANDLE   Handle,\r
+  IN     STRING_REF                 Token,\r
+  IN OUT UINT16                     *Index,\r
+  IN     UINT16                     LineWidth,\r
+  IN     CHAR16                     *LanguageString,\r
+  IN OUT UINT16                     *BufferLength,\r
+  OUT    EFI_STRING                 StringBuffer\r
   );\r
 \r
+/**\r
+  This function allows a program to extract a form or form package that has\r
+  previously been registered with the EFI HII database.\r
+\r
+  In this thunk module, this function will create a IFR Package with only \r
+  one Formset. Effectively, only the GUID of the Formset is updated and return\r
+  in this IFR package to caller. This is enable the Framework modules which call \r
+  a API named GetStringFromToken. GetStringFromToken retieves a String based on\r
+  a String Token from a Package List known only by the Formset GUID.\r
+  \r
+\r
+\r
+  @param This             A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Handle           Handle on which the form resides. Type FRAMEWORK_EFI_HII_HANDLE  is defined in\r
+                          EFI_HII_PROTOCOL.NewPack() in the Packages section.\r
+  @param FormId           Ignored by this implementation.\r
+  @param BufferLengthTemp On input, the size of input buffer. On output, it\r
+                          is the size of FW_HII_FORMSET_TEMPLATE.\r
+  @param Buffer           The buffer designed to receive the form(s).\r
+\r
+  @retval  EFI_SUCCESS            Buffer filled with the requested forms. BufferLength\r
+                                  was updated.\r
+  @retval  EFI_INVALID_PARAMETER  The handle is unknown.\r
+  @retval  EFI_NOT_FOUND          A form on the requested handle cannot be found with the\r
+                                  requested FormId.\r
+  @retval  EFI_BUFFER_TOO_SMALL   The buffer provided was not large enough to allow the form to be stored.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiGetForms (\r
-  IN     EFI_HII_PROTOCOL               *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE       Handle,\r
-  IN     EFI_FORM_ID                    FormId,\r
-  IN OUT UINTN                          *BufferLength,\r
-  OUT    UINT8                          *Buffer\r
+  IN     EFI_HII_PROTOCOL             *This,\r
+  IN     FRAMEWORK_EFI_HII_HANDLE     Handle,\r
+  IN     EFI_FORM_ID                  FormId,\r
+  IN OUT UINTN                        *BufferLengthTemp,\r
+  OUT    UINT8                        *Buffer\r
   );\r
 \r
+/**\r
+\r
+  This function allows a program to extract the NV Image\r
+  that represents the default storage image\r
+\r
+\r
+  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Handle          The HII handle from which will have default data retrieved.\r
+                         UINTN            - Mask used to retrieve the default image.\r
+  @param DefaultMask     EDES_TODO: Add parameter description\r
+  @param VariablePackList Callee allocated, tightly-packed, link list data\r
+                         structure that contain all default varaible packs\r
+                         from the Hii Database.\r
+\r
+  @retval  EFI_NOT_FOUND          If Hii database does not contain any default images.\r
+  @retval  EFI_INVALID_PARAMETER  Invalid input parameter.\r
+  @retval  EFI_SUCCESS            Operation successful.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiGetDefaultImage (\r
-  IN     EFI_HII_PROTOCOL               *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE       Handle,\r
-  IN     UINTN                          DefaultMask,\r
-  OUT    EFI_HII_VARIABLE_PACK_LIST     **VariablePackList\r
+  IN     EFI_HII_PROTOCOL            *This,\r
+  IN     FRAMEWORK_EFI_HII_HANDLE    Handle,\r
+  IN     UINTN                       DefaultMask,\r
+  OUT    EFI_HII_VARIABLE_PACK_LIST  **VariablePackList\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
+\r
+  @param This            EDES_TODO: Add parameter description\r
+  @param Handle          Hii Handle associated with the Formset to modify\r
+  @param Label           Update information starting immediately after this label in the IFR\r
+  @param AddData         If TRUE, add data.  If FALSE, remove data\r
+  @param Data            If adding data, this is the pointer to the data to add\r
+\r
+  @retval  EFI_SUCCESS  Update success.\r
+  @retval  Other        Update fail.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiThunkUpdateForm (\r
-  IN EFI_HII_PROTOCOL          *This,\r
-  IN FRAMEWORK_EFI_HII_HANDLE  Handle,\r
-  IN EFI_FORM_LABEL            Label,\r
-  IN BOOLEAN                   AddData,\r
-  IN EFI_HII_UPDATE_DATA       *Data\r
+  IN EFI_HII_PROTOCOL                  *This,\r
+  IN FRAMEWORK_EFI_HII_HANDLE          Handle,\r
+  IN EFI_FORM_LABEL                    Label,\r
+  IN BOOLEAN                           AddData,\r
+  IN EFI_HII_UPDATE_DATA               *Data\r
   );\r
 \r
+/**\r
+  Retrieves the current keyboard layout. \r
+  This function is not implemented by HII Thunk Module.\r
+\r
+  @param This             A pointer to the EFI_HII_PROTOCOL instance. \r
+  @param DescriptorCount  A pointer to the number of Descriptor entries being described in the keyboard layout being retrieved.\r
+  @param Descriptor       A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries. Each entry will reflect the \r
+                          definition of a specific physical key. Type EFI_KEY_DESCRIPTOR is defined in "Related Definitions" below.\r
+\r
+  @retval  EFI_SUCCESS   The keyboard layout was retrieved successfully.\r
\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiGetKeyboardLayout (\r
-  IN     EFI_HII_PROTOCOL               *This,\r
-  OUT    UINT16                         *DescriptorCount,\r
-  OUT    FRAMEWORK_EFI_KEY_DESCRIPTOR   *Descriptor\r
+  IN     EFI_HII_PROTOCOL   *This,\r
+  OUT    UINT16             *DescriptorCount,\r
+  OUT    FRAMEWORK_EFI_KEY_DESCRIPTOR *Descriptor\r
   );\r
 \r
+/**\r
+  This is the Framework Setup Browser interface which displays a FormSet.\r
+\r
+  @param This           The EFI_FORM_BROWSER_PROTOCOL context.\r
+  @param UseDatabase    TRUE if the FormSet is from HII database. The Thunk implementation\r
+                        only support UseDatabase is TRUE.\r
+  @param Handle         The Handle buffer.\r
+  @param HandleCount    The number of Handle in the Handle Buffer. It must be 1 for this implementation.\r
+  @param Packet         The pointer to data buffer containing IFR and String package. Not supported.\r
+  @param CallbackHandle Not supported.\r
+  @param NvMapOverride  The buffer is used only when there is no NV variable to define the \r
+                        current settings and the caller needs to provide to the browser the\r
+                        current settings for the the "fake" NV variable. If used, no saving of\r
+                        an NV variable is possbile. This parameter is also ignored if Handle is NULL.\r
+  @param ScreenDimensions \r
+                        Allows the browser to be called so that it occupies a portion of the physical \r
+                        screen instead of dynamically determining the screen dimensions.\r
+  @param ResetRequired  This BOOLEAN value denotes whether a reset is required based on the data that \r
+                        might have been changed. The ResetRequired parameter is primarily applicable \r
+                        for configuration applications, and is an optional parameter.\r
+\r
+  @retval EFI_SUCCESS             If the Formset is displayed correctly.\r
+  @retval EFI_UNSUPPORTED         If UseDatabase is FALSE or HandleCount is not 1.\r
+  @retval EFI_INVALID_PARAMETER   If the *Handle passed in is not found in the database.\r
+**/\r
 EFI_STATUS\r
 EFIAPI \r
 ThunkSendForm (\r
-  IN  EFI_FORM_BROWSER_PROTOCOL       *This,\r
-  IN  BOOLEAN                         UseDatabase,\r
-  IN  FRAMEWORK_EFI_HII_HANDLE        *Handle,\r
-  IN  UINTN                           HandleCount,\r
-  IN  EFI_IFR_PACKET                  *Packet, OPTIONAL\r
-  IN  EFI_HANDLE                      CallbackHandle, OPTIONAL\r
-  IN  UINT8                           *NvMapOverride, OPTIONAL\r
-  IN  FRAMEWORK_EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r
-  OUT BOOLEAN                         *ResetRequired OPTIONAL\r
+  IN  EFI_FORM_BROWSER_PROTOCOL         *This,\r
+  IN  BOOLEAN                           UseDatabase,\r
+  IN  FRAMEWORK_EFI_HII_HANDLE          *Handle,\r
+  IN  UINTN                             HandleCount,\r
+  IN  EFI_IFR_PACKET                    *Packet, OPTIONAL\r
+  IN  EFI_HANDLE                        CallbackHandle, OPTIONAL\r
+  IN  UINT8                             *NvMapOverride, OPTIONAL\r
+  IN  FRAMEWORK_EFI_SCREEN_DESCRIPTOR   *ScreenDimensions, OPTIONAL\r
+  OUT BOOLEAN                           *ResetRequired OPTIONAL\r
   );\r
 \r
+/** \r
+\r
+  Rountine used to display a generic dialog interface and return \r
+  the Key or Input from user input.\r
+\r
+  @param LinesNumber   The number of lines for the dialog box.\r
+  @param HotKey        Defines if a single character is parsed (TRUE) and returned in KeyValue\r
+                       or if a string is returned in StringBuffer.\r
+  @param MaximumStringSize The maximum size in bytes of a typed-in string.\r
+  @param StringBuffer  On return contains the typed-in string if HotKey is FALSE.\r
+  @param Key           The EFI_INPUT_KEY value returned if HotKey is TRUE.\r
+  @param FirstString   The pointer to the first string in the list of strings\r
+                       that comprise the dialog box.\r
+  @param ...           A series of NumberOfLines text strings that will be used\r
+                       to construct the dialog box.\r
+  @retval EFI_SUCCESS  The dialog is created successfully and user interaction was received.\r
+  @retval EFI_DEVICE_ERROR The user typed in an ESC.\r
+  @retval EFI_INVALID_PARAMETER One of the parameters was invalid.(StringBuffer == NULL && HotKey == FALSE).\r
+**/\r
 EFI_STATUS\r
 EFIAPI \r
 ThunkCreatePopUp (\r
@@ -426,6 +783,24 @@ ThunkCreatePopUp (
   ...\r
   );\r
 \r
+/**\r
+  This notification function will be called when a Package List is removed\r
+  using UEFI HII interface. The Package List removed need to be removed from\r
+  Framework Thunk module too.\r
+\r
+  If the Package List registered is not Sting Package, \r
+  then ASSERT. If the NotifyType is not REMOVE_PACK, then ASSERT.\r
+  Both cases means UEFI HII Database itself is buggy. \r
+\r
+  @param PackageType The Package Type.\r
+  @param PackageGuid The Package GUID.\r
+  @param Package     The Package Header.\r
+  @param Handle      The HII Handle of this Package List.\r
+  @param NotifyType  The reason of the notification. \r
+\r
+  @retval EFI_SUCCESS The notification function is successful.\r
+  \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RemovePackNotify (\r
@@ -436,6 +811,25 @@ RemovePackNotify (
   IN EFI_HII_DATABASE_NOTIFY_TYPE       NotifyType\r
   );\r
 \r
+/**\r
+  This notification function will be called when a Package List is registered\r
+  using UEFI HII interface. The Package List registered need to be recorded in\r
+  Framework Thunk module as Thunk Module may need to look for String Package in\r
+  the package registered.\r
+\r
+  If the Package List registered is not either Sting Package or IFR package, \r
+  then ASSERT. If the NotifyType is not ADD_PACK or NEW_PACK, then ASSERT.\r
+  Both cases means UEFI HII Database itself is buggy. \r
+\r
+  @param PackageType The Package Type.\r
+  @param PackageGuid The Package GUID.\r
+  @param Package     The Package Header.\r
+  @param Handle      The HII Handle of this Package List.\r
+  @param NotifyType  The reason of the notification. \r
+\r
+  @retval EFI_SUCCESS The notification function is successful.\r
+  \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 NewOrAddPackNotify (\r
index 35db52932a05efd7fd35c40b5f0c06a7810269ea..d666002ec03a14941b23f159a3de827ee1b6ccc0 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   This file is for functins related to assign and free Framework HII handle number.\r
   \r
-Copyright (c) 2008, Intel Corporation\r
+Copyright (c) 2008 - 2010, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
index ed2b186b7dbd4bb5d07a84c84aa04f64cef685ff..6f4be2feb6b31050ee94ef733ee58aed6bab0f61 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   This file is for functins related to assign and free Framework HII handle number.\r
   \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2010, 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
@@ -12,28 +12,48 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _HII_HANDLE_H\r
-#define _HII_HANDLE_H\r
+#ifndef _HII_HANDLE_H_\r
+#define _HII_HANDLE_H_\r
 \r
 #include <FrameworkDxe.h>\r
 #include <Protocol/FrameworkHii.h>\r
 #include <Library/DebugLib.h>\r
 \r
+/**\r
+\r
+  Initialize the Framework Hii Handle database.\r
+\r
+**/\r
 VOID\r
 InitHiiHandleDatabase (\r
   VOID\r
   );\r
 \r
+/**\r
+  Allocate a new Framework HII handle. \r
+\r
+  @param  Handle Returns the new Framework HII Handle assigned.\r
+\r
+  @retval EFI_SUCCESS         A new Framework HII Handle is assigned.\r
+  @retval EFI_OUT_OF_RESOURCE The Framework HII Handle database is depleted.\r
+\r
+**/\r
 EFI_STATUS\r
 AllocateHiiHandle (\r
-  FRAMEWORK_EFI_HII_HANDLE *Handle\r
-);\r
+  OUT FRAMEWORK_EFI_HII_HANDLE *Handle\r
+  );\r
   \r
 \r
+/**\r
+  Free Framework HII handle. \r
+\r
+  @param  Handle The Framework HII Handle to be freed.\r
+\r
+**/\r
 VOID\r
 FreeHiiHandle (\r
-  FRAMEWORK_EFI_HII_HANDLE Handle\r
-);\r
+  IN FRAMEWORK_EFI_HII_HANDLE Handle\r
+  );\r
 \r
 \r
 #endif\r
index 32e4f93345e2b501ed077c8ad87baab926a2a4df..dad25cc425464c6e15ceefe181d6e56e8e470a54 100644 (file)
@@ -1,8 +1,8 @@
-/**@file\r
+/** @file\r
 \r
   This file contains the keyboard processing code to the HII database.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2010, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
index 7a14b9c68ae9dbbcd0192e39863c61371f1efafe..1f3e61e47577cc666c3f1172c8df874a9402dd90 100644 (file)
@@ -2,7 +2,7 @@
 Implement Functions to convert IFR Opcode in format defined in Framework HII specification to\r
 format defined in UEFI HII Specification.\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2010, 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
@@ -26,7 +26,7 @@ typedef struct {
   UINT8 UefiIfrOp;\r
 } IFR_OPCODE_MAP;\r
   \r
-IFR_OPCODE_MAP mQuestionOpcodeMap [] = {\r
+IFR_OPCODE_MAP QuestionOpcodeMap[] = {\r
   { FRAMEWORK_EFI_IFR_ONE_OF_OP,        EFI_IFR_ONE_OF_OP},\r
   { FRAMEWORK_EFI_IFR_CHECKBOX_OP,      EFI_IFR_CHECKBOX_OP},\r
   { FRAMEWORK_EFI_IFR_NUMERIC_OP,       EFI_IFR_NUMERIC_OP},\r
@@ -51,9 +51,9 @@ QuestionOpFwToUefi (
 {\r
   UINTN       Index;\r
 \r
-  for (Index = 0; Index < sizeof (mQuestionOpcodeMap) / sizeof (mQuestionOpcodeMap[0]); Index++) {\r
-    if (FwOp == mQuestionOpcodeMap[Index].FrameworkIfrOp) {\r
-      *UefiOp = mQuestionOpcodeMap[Index].UefiIfrOp;\r
+  for (Index = 0; Index < sizeof (QuestionOpcodeMap) / sizeof (QuestionOpcodeMap[0]); Index++) {\r
+    if (FwOp == QuestionOpcodeMap[Index].FrameworkIfrOp) {\r
+      *UefiOp = QuestionOpcodeMap[Index].UefiIfrOp;\r
       return EFI_SUCCESS;\r
     }\r
   }\r
@@ -63,13 +63,15 @@ QuestionOpFwToUefi (
 }\r
 \r
 /**\r
-  Translate a Framework Question Opcode to UEFI Question Opcode.\r
+  Translate a Framework Question ID to UEFI Question ID.\r
 \r
-  @param FwOp     Framework Opcode.\r
-  @param UefiOp   UEFI Opcode.\r
+  @param FormSet   FormSet context\r
+  @param FwOpCode  Framework Opcode\r
+  @param FwQId     Framework Question Id\r
+  @param UefiQId   UEFI Question ID.\r
 \r
-  @retval     EFI_SUCCESS     The UEFI opcode is found and returned.\r
-  @retval     EFI_NOT_FOUND   The UEFI opcode is not found.\r
+  @retval     EFI_SUCCESS     The UEFI Question Id is found and returned.\r
+  @retval     EFI_NOT_FOUND   The UEFI Question Id is not found.\r
 **/\r
 EFI_STATUS\r
 FwQIdToUefiQId (\r
@@ -150,6 +152,9 @@ FwQIdToUefiQId (
 \r
   If FwQuestionId is not 0, then it is used as the Framework Question ID.\r
 \r
+  @param FwQuestionId \r
+  @param FormSet      \r
+\r
   @return The Framework Question ID.\r
 **/\r
 EFI_QUESTION_ID\r
@@ -169,8 +174,8 @@ AssignQuestionId (
 /**\r
   Create UEFI HII Text Opcode from a Framework HII Text Opcode.\r
 \r
-  @param FwOpcode              The input Framework Opcode.\r
   @param UefiUpdateDataHandle  The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
+  @param FwOpcode              The input Framework Opcode.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -207,8 +212,8 @@ F2UCreateTextOpCode (
 /**\r
   Create UEFI HII Reference Opcode from a Framework HII Reference Opcode.\r
 \r
-  @param FwOpcode              The input Framework Opcode.\r
   @param UefiUpdateDataHandle  The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
+  @param FwOpcode              The input Framework Opcode.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -245,9 +250,9 @@ F2UCreateReferenceOpCode (
 /**\r
   Create UEFI HII "One Of Option" Opcode from a Framework HII "One Of Option" Opcode.\r
 \r
+  @param UefiUpdateDataHandle  The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
   @param FwOpcode              The input Framework Opcode.\r
   @param Width                 The size of the One Of Option. 1 bytes or 2 bytes.\r
-  @param UefiUpdateDataHandle  The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -300,10 +305,10 @@ F2UCreateOneOfOptionOpCode (
   to a UEFI Question ID. This information is used to invoke the Framework HII Browser Callback\r
   function. The opcode is appened to UefiUpdateDataHandle.\r
 \r
+  @param    UefiUpdateDataHandle  The UEFI Update Data buffer.\r
   @param    QuestionId            The UEFI Question ID.\r
   @param    OptionValue           The value of the "One Of Option".\r
   @param    KeyValue              The Framework "One Of Option" callback key.\r
-  @param    UefiUpdateDataHandle  The UEFI Update Data buffer.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -336,9 +341,9 @@ CreateGuidOptionKeyOpCode (
 /**\r
   Create UEFI HII "One Of" Opcode from a Framework HII "One Of" Opcode.\r
 \r
+  @param UefiUpdateDataHandle     The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
   @param ThunkContext             The HII Thunk Context.\r
   @param FwOpcode                 The input Framework Opcode.\r
-  @param UefiUpdateDataHandle     The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
   @param NextFwOpcode             Returns the position of the next Framework Opcode after EFI_IFR_END_ONE_OF_OP of\r
                                   the "One Of Option".\r
   @param OpcodeCount              The number of Opcode for the complete Framework "One Of" Opcode.\r
@@ -456,9 +461,9 @@ F2UCreateOneOfOpCode (
 /**\r
   Create UEFI HII "Ordered List" Opcode from a Framework HII "Ordered List" Opcode.\r
 \r
+  @param UefiUpdateDataHandle The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
   @param ThunkContext         The HII Thunk Context.\r
   @param FwOpcode             The input Framework Opcode.\r
-  @param UefiUpdateDataHandle The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
   @param NextFwOpcode         Returns the position of the next Framework Opcode after EFI_IFR_END_ONE_OF_OP of\r
                               the "Ordered List".\r
   @param OpcodeCount          The number of Opcode for the complete Framework "Ordered List" Opcode.\r
@@ -562,9 +567,9 @@ F2UCreateOrderedListOpCode (
 /**\r
   Create UEFI HII CheckBox Opcode from a Framework HII Checkbox Opcode.\r
 \r
+  @param UefiUpdateDataHandle  The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
   @param ThunkContext          The HII Thunk Context.\r
   @param FwOpcode              The input Framework Opcode.\r
-  @param UefiUpdateDataHandle  The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -627,9 +632,9 @@ F2UCreateCheckBoxOpCode (
 /**\r
   Create UEFI HII Numeric Opcode from a Framework HII Numeric Opcode.\r
 \r
+  @param UefiUpdateDataHandle    The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
   @param ThunkContext            The HII Thunk Context.\r
   @param FwOpcode                The input Framework Opcode.\r
-  @param UefiUpdateDataHandle    The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -749,9 +754,9 @@ F2UCreateNumericOpCode (
 /**\r
   Create UEFI HII String Opcode from a Framework HII String Opcode.\r
 \r
+  @param UefiUpdateDataHandle     The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
   @param ThunkContext             The HII Thunk Context.\r
   @param FwOpcode                 The input Framework Opcode.\r
-  @param UefiUpdateDataHandle     The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -802,8 +807,8 @@ F2UCreateStringOpCode (
 /**\r
   Create UEFI HII Banner Opcode from a Framework HII Banner Opcode.\r
 \r
-  @param FwOpcode                 The input Framework Opcode.\r
   @param UefiUpdateDataHandle     The newly created UEFI HII opcode is appended to UefiUpdateDataHandle.\r
+  @param FwOpcode                 The input Framework Opcode.\r
 \r
   @retval NULL   There is not enough space left in Buffer to add the opcode.\r
   @retval Other  A pointer to the created opcode.\r
@@ -837,7 +842,7 @@ F2UCreateBannerOpCode (
 \r
   @param ThunkContext         The HII Thunk Context.\r
   @param FwUpdateData         The Framework Update Data.\r
-  @param UefiUpdateData       The UEFI Update Data.\r
+  @param UefiOpCodeHandle     The UEFI opcode hanlde.\r
 \r
   @retval EFI_SUCCESS       The UEFI Update Data is created successfully.\r
   @retval EFI_UNSUPPORTED   There is unsupported opcode in FwUpdateData.\r
index fb664a292812068051fc035f120bc93c6f6bd17b..8891dcf39c322fcd68cf3de82de4403d5f323caf 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   Implement protocol interface related to package registrations.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2010, 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
@@ -27,15 +27,16 @@ EFI_GUID mGuidBase = { 0x14f95e01, 0xd562, 0x432e, { 0x84, 0x4a, 0x95, 0xa4, 0x3
 \r
 \r
 /**\r
-  Get the number of package IFR and STRING packages in the package list passed in.\r
+  Get the number of Form, STRING and Font packages in the package list passed in.\r
 \r
   @param Packages             Package List.\r
   @param IfrPackageCount      Number of IFR Packages.\r
   @param StringPackageCount   Number of String Packages.\r
+  @param FontPackageCount     Number of Font Packages.\r
 \r
   @retval EFI_INVALID_PARAMETER If the Package List has package with type of \r
                                 EFI_HII_PACKAGE_KEYBOARD_LAYOUT, EFI_HII_PACKAGE_FONTS, EFI_HII_PACKAGE_IMAGES.\r
-  @reval  EFI_SUCCESS           Successfully get the number of IFR and STRING package.\r
+  @retval EFI_SUCCESS           Successfully get the number of IFR and STRING package.\r
                                  \r
 \r
 **/\r
@@ -159,7 +160,7 @@ UpdatePackListWithOnlyIfrPack (
 \r
   If the Package Header is not of EFI_HII_FONT type, then ASSERT.\r
 \r
-  @param   The Package header of the Framework Font Package.\r
+  @param   PackHeader Pointer to Framework Font Package.\r
   \r
   @return  The size of the UEFI Simple Font Package.\r
   \r
@@ -191,9 +192,9 @@ GetUefiSimpleFontPackSize (
 \r
   If memory allocation fails, then ASSERT.\r
 \r
-  @param FwFontPack        Framework Font Package.\r
+  @param PackHeader        Pointer to Framework Font Package header.\r
 \r
-  @reture UEFI Simple Font Package.\r
+  @return UEFI Simple Font Package.\r
 **/\r
 EFI_HII_SIMPLE_FONT_PACKAGE_HDR *\r
 FrameworkFontPackToUefiSimpliedFont (\r
@@ -450,7 +451,7 @@ FindStringPackAndUpdatePackListWithOnlyIfrPack (
   @param This                         The EFI_HII_PROTOCOL context data. Only used\r
                                       to call HiiRemovePack.\r
   @param Private                      The HII THUNK driver context data.\r
-  @param Package                      Package List.\r
+  @param Packages                     Package List.\r
   @param Handle                       On output, a FRAMEWORK_EFI_HII_HANDLE number is\r
                                       returned.\r
 \r
index 3503bc07159f4efe6b68d2f911180800dbee20bb..3e5875f40199f16ee12106f907977fa1989b8bac 100644 (file)
@@ -1,8 +1,8 @@
-/**@file\r
+/** @file\r
 Framework to UEFI 2.1 Setup Browser Thunk. The file consume EFI_FORM_BROWSER2_PROTOCOL\r
 to produce a EFI_FORM_BROWSER_PROTOCOL.\r
 \r
-Copyright (c) 2008, Intel Corporation\r
+Copyright (c) 2008 - 2010, 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
@@ -399,12 +399,17 @@ GetTimeout (
                         current settings and the caller needs to provide to the browser the\r
                         current settings for the the "fake" NV variable. If used, no saving of\r
                         an NV variable is possbile. This parameter is also ignored if Handle is NULL.\r
+  @param ScreenDimensions \r
+                        Allows the browser to be called so that it occupies a portion of the physical \r
+                        screen instead of dynamically determining the screen dimensions.\r
+  @param ResetRequired  This BOOLEAN value denotes whether a reset is required based on the data that \r
+                        might have been changed. The ResetRequired parameter is primarily applicable \r
+                        for configuration applications, and is an optional parameter.\r
 \r
   @retval EFI_SUCCESS             If the Formset is displayed correctly.\r
   @retval EFI_UNSUPPORTED         If UseDatabase is FALSE or HandleCount is not 1.\r
   @retval EFI_INVALID_PARAMETER   If the *Handle passed in is not found in the database.\r
 **/\r
-\r
 EFI_STATUS\r
 EFIAPI \r
 ThunkSendForm (\r
index 9fd033878e86d96877d73af982e560bf30d1bdd9..68100ded546df8552ccdf6254b03df3e015b9a57 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   This file contains macros to be included by SetupBrowser.c.\r
   \r
-Copyright (c) 2008, Intel Corporation\r
+Copyright (c) 2008 - 2010, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
index 3165f62676a5076a6d9bcc3e26f54e90dcbed144..6995be05b85cc473bd41c2bc71e7648e1c062e54 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
+/** @file\r
   This file implements the protocol functions related to string package.\r
   \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2010, 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
@@ -135,7 +135,7 @@ UpdateString (
                          identifier, indicating the language to print. A string consisting of\r
                          all spaces indicates that the string is applicable to all languages.\r
   @param Handle          The handle of the language pack to which the string is to be added.\r
-  @param Token           The string token assigned to the string.\r
+  @param Reference       The string token assigned to the string.\r
   @param NewString       The string to be added.\r
 \r
 \r
@@ -143,7 +143,6 @@ UpdateString (
   @retval EFI_INVALID_PARAMETER   The Handle was unknown. The string is not created or updated in the\r
                                   the string package.\r
 **/\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 HiiNewString (\r
@@ -292,7 +291,7 @@ HiiThunkGetString (
   IN     STRING_REF                 Token,\r
   IN     BOOLEAN                    Raw,\r
   IN     CHAR16                     *LanguageString,\r
-  IN OUT UINTN                      *BufferLengthTemp,\r
+  IN OUT UINTN                      *BufferLength,\r
   OUT    EFI_STRING                 StringBuffer\r
   )\r
 {\r
@@ -370,7 +369,7 @@ HiiThunkGetString (
                                  UefiHiiHandle,\r
                                  Token,\r
                                  StringBuffer,\r
-                                 BufferLengthTemp,\r
+                                 BufferLength,\r
                                  NULL\r
                                  );\r
     FreePool (BestLanguage);\r
@@ -405,9 +404,10 @@ Done:
   @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
   @param Handle          The HII handle on which the string resides.\r
   @param Token           The string token assigned to the string.\r
-  @param Raw             If TRUE, the string is returned unedited in the internal storage format described\r
-                         above. If false, the string returned is edited by replacing <cr> with <space>\r
-                         and by removing special characters such as the <wide> prefix.\r
+  @param Index           On input, the offset into the string where the line is to start.\r
+                         On output, the index is updated to point to beyond the last character returned\r
+                         in the call.\r
+  @param LineWidth       The maximum width of the line in units of narrow glyphs.\r
   @param LanguageString  Pointer to a NULL-terminated string containing a single ISO 639-2 language\r
                          identifier, indicating the language to print. If the LanguageString is empty (starts\r
                          with a NULL), the default system language will be used to determine the language.\r
index 9dc7d2eb6d3f9b2624f8bc51f0cbbd9969334b3c..b82b02e018f0509a990f40c5a749644a7020c470 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Function and Macro defintions for to extract default values from UEFI Form package.\r
 \r
-  Copyright (c) 2008, Intel Corporation\r
+  Copyright (c) 2008 - 2010, 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
@@ -32,8 +32,6 @@ extern CONST EFI_HII_CONFIG_ROUTING_PROTOCOL      *mHiiConfigRoutingProtocol;
   @param Value                    The input value.\r
   @param Offset                   The offset in Node->Buffer for the update.\r
   @param Width                    The length of the Value.\r
-  \r
-  @retval VOID\r
 \r
 **/\r
 VOID\r
@@ -52,27 +50,27 @@ SetNodeBuffer (
 \r
 \r
 /**\r
-  Reset Question to its default value.\r
+  Get question default value, and set it into the match var storage.\r
 \r
   Note Framework 0.92's HII Implementation does not support for default value for these opcodes:\r
   EFI_IFR_ORDERED_LIST_OP:\r
   EFI_IFR_PASSWORD_OP:\r
   EFI_IFR_STRING_OP:\r
 \r
-  @param  FormSet                FormSet data structure.\r
+  @param  Question               Question to be set to its default value.\r
   @param  DefaultId              The Class of the default.\r
+  @param  VarStoreId             Id of var storage. \r
+  @param  Node                   Var storage buffer to store the got default value.\r
 \r
   @retval EFI_SUCCESS            Question is reset to default value.\r
 \r
 **/\r
 EFI_STATUS\r
 GetQuestionDefault (\r
-  IN FORM_BROWSER_FORMSET             *FormSet,\r
-  IN FORM_BROWSER_FORM                *Form,\r
   IN FORM_BROWSER_STATEMENT           *Question,\r
   IN UINT16                           DefaultId,\r
   IN UINT16                           VarStoreId,\r
-  OUT UEFI_IFR_BUFFER_STORAGE_NODE        *Node\r
+  OUT UEFI_IFR_BUFFER_STORAGE_NODE    *Node\r
   )\r
 {\r
   EFI_STATUS              Status;\r
@@ -138,8 +136,8 @@ GetQuestionDefault (
       while (!IsNull (&Question->OptionListHead, Link)) {\r
         Option = QUESTION_OPTION_FROM_LINK (Link);\r
 \r
-        if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && (Option->Flags & EFI_IFR_OPTION_DEFAULT)) ||\r
-            ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && (Option->Flags & EFI_IFR_OPTION_DEFAULT_MFG))\r
+        if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Option->Flags & EFI_IFR_OPTION_DEFAULT) == EFI_IFR_OPTION_DEFAULT)) ||\r
+            ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Option->Flags & EFI_IFR_OPTION_DEFAULT_MFG) == EFI_IFR_OPTION_DEFAULT_MFG))\r
            ) {\r
           CopyMem (HiiValue, &Option->Value, sizeof (EFI_HII_VALUE));\r
 \r
@@ -160,8 +158,8 @@ GetQuestionDefault (
       //\r
       // Checkbox could only provide Standard and Manufacturing default\r
       //\r
-      if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && (Question->Flags & EFI_IFR_CHECKBOX_DEFAULT)) ||\r
-          ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && (Question->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG))\r
+      if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT) == EFI_IFR_CHECKBOX_DEFAULT)) ||\r
+          ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) == EFI_IFR_CHECKBOX_DEFAULT_MFG))\r
          ) {\r
         HiiValue->Value.b = TRUE;\r
       } else {\r
@@ -178,22 +176,23 @@ GetQuestionDefault (
 \r
 \r
 /**\r
-  Reset Questions in a Form to their default value.\r
+  Extract the default values from all questions in the input Form, \r
+  and set default value into the matched var storage.\r
 \r
-  @param  FormSet                FormSet data structure.\r
   @param  Form                   The Form which to be reset.\r
   @param  DefaultId              The Class of the default.\r
+  @param  VarStoreId             Id of var storage. \r
+  @param  Node                   Var storage buffer to store the got default value.\r
 \r
   @retval EFI_SUCCESS            The function completed successfully.\r
 \r
 **/\r
 EFI_STATUS\r
 ExtractFormDefault (\r
-  IN FORM_BROWSER_FORMSET             *FormSet,\r
   IN FORM_BROWSER_FORM                *Form,\r
   IN UINT16                           DefaultId,\r
   IN UINT16                           VarStoreId,\r
-  OUT UEFI_IFR_BUFFER_STORAGE_NODE        *Node\r
+  OUT UEFI_IFR_BUFFER_STORAGE_NODE    *Node\r
   )\r
 {\r
   EFI_STATUS              Status;\r
@@ -206,7 +205,7 @@ ExtractFormDefault (
     //\r
     // Reset Question to its default value\r
     //\r
-    Status = GetQuestionDefault (FormSet, Form, Question, DefaultId, VarStoreId, Node);\r
+    Status = GetQuestionDefault (Question, DefaultId, VarStoreId, Node);\r
     if (EFI_ERROR (Status)) {\r
       continue;\r
     }\r
@@ -222,10 +221,7 @@ ExtractFormDefault (
   UEFI_IFR_BUFFER_STORAGE_NODE. The Node itself\r
   will be freed too.\r
 \r
-  @param  FormSet                FormSet data structure.\r
-  @param  DefaultId              The Class of the default.\r
-\r
-  @retval   VOID\r
+  @param  Node                Var storage buffer.\r
 \r
 **/\r
 VOID\r
@@ -245,10 +241,10 @@ DestroyDefaultNode (
   The result is in the a instance of UEFI_IFR_BUFFER_STORAGE_NODE\r
   allocated by this function. It is inserted to the link list.\r
   \r
-  @param  DefaultStore            The Default Store.\r
-  @param  Storage                   The Storage.\r
-  @param  FormSet                  The Form Set.\r
-  @param  UefiDefaultsListHead The head of link list for the output.\r
+  @param  DefaultStore           The Default Store.\r
+  @param  Storage                The Storage.\r
+  @param  FormSet                The Form Set.\r
+  @param  UefiDefaultsListHead   The head of link list for the output.\r
 \r
   @retval   EFI_SUCCESS          Successful.\r
   \r
@@ -283,7 +279,7 @@ GetBufferTypeDefaultIdAndStorageId (
   while (!IsNull (&FormSet->FormListHead, Link)) {\r
     Form = FORM_BROWSER_FORM_FROM_LINK (Link);\r
 \r
-    Status = ExtractFormDefault (FormSet, Form, DefaultStore->DefaultId, Storage->VarStoreId, Node);\r
+    Status = ExtractFormDefault (Form, DefaultStore->DefaultId, Storage->VarStoreId, Node);\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     Link = GetNextNode (&FormSet->FormListHead, Link);\r
@@ -338,14 +334,13 @@ GetBufferTypeDefaultId (
 \r
 \r
 /**\r
-  Get the default value for Buffer Type storage from the first FormSet\r
-  in the Package List specified by a EFI_HII_HANDLE.\r
+  Get the default value for Buffer Type storage from the FormSet in ThunkContext.\r
   \r
   The results can be multiple instances of UEFI_IFR_BUFFER_STORAGE_NODE. \r
   They are inserted to the link list.\r
   \r
-  @param  UefiHiiHandle           The handle for the package list.\r
-  @param  UefiDefaultsListHead The head of link list for the output.\r
+  @param  ThunkContext  Hii thunk context.\r
+  @param  UefiDefaults  The head of link list for the output.\r
 \r
   @retval   EFI_SUCCESS          Successful.\r
   \r
@@ -384,20 +379,19 @@ UefiIfrGetBufferTypeDefaults (
   Convert the UEFI Buffer Type default values to a Framework HII default\r
   values specified by a EFI_HII_VARIABLE_PACK_LIST structure.\r
   \r
-  @param  ListHead                  The link list of UEFI_IFR_BUFFER_STORAGE_NODE\r
-                                              which contains the default values retrived from\r
-                                              a UEFI form set.\r
-  @param  DefaultMask            The default mask.\r
-                                             The valid values are EFI_IFR_FLAG_DEFAULT\r
-                                             and EFI_IFR_FLAG_MANUFACTURING.\r
-                                            UEFI spec only map EFI_IFR_FLAG_DEFAULT and EFI_IFR_FLAG_MANUFACTURING \r
-                                            from specification to valid default class.\r
+  @param  ListHead             The link list of UEFI_IFR_BUFFER_STORAGE_NODE\r
+                               which contains the default values retrived from a UEFI form set.\r
+  @param  DefaultMask          The default mask.\r
+                               The valid values are EFI_IFR_FLAG_DEFAULT and EFI_IFR_FLAG_MANUFACTURING.\r
+                               UEFI spec only map EFI_IFR_FLAG_DEFAULT and EFI_IFR_FLAG_MANUFACTURING \r
+                               from specification to valid default class.\r
+  @param  UefiFormSetDefaultVarStoreId\r
+                               ID of the default varstore in FormSet.\r
   @param  VariablePackList     The output default value in a format defined in Framework.\r
-                                             \r
 \r
-  @retval   EFI_SUCCESS                       Successful.\r
+  @retval   EFI_SUCCESS                Successful.\r
   @retval   EFI_INVALID_PARAMETER      The default mask is not EFI_IFR_FLAG_DEFAULT or \r
-                                                           EFI_IFR_FLAG_MANUFACTURING.\r
+                                       EFI_IFR_FLAG_MANUFACTURING.\r
 **/\r
 EFI_STATUS\r
 UefiDefaultsToFwDefaults (\r
@@ -522,11 +516,9 @@ UefiDefaultsToFwDefaults (
   Free up all buffer allocated for the link list of UEFI_IFR_BUFFER_STORAGE_NODE.\r
     \r
   @param  ListHead                  The link list of UEFI_IFR_BUFFER_STORAGE_NODE\r
-                                              which contains the default values retrived from\r
-                                              a UEFI form set.\r
-                                             \r
+                                    which contains the default values retrived from\r
+                                    a UEFI form set.\r
 \r
-  @retval   VOID\r
 **/\r
 VOID\r
 FreeDefaultList (\r
index e06b2829c3a923042f442598059eb8ea5fa175ee..ae55ece846d60920249fe4630bdbb6ae072d45b2 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for Function and Macro defintions for to extract default values from UEFI Form package.\r
 \r
-  Copyright (c) 2008, Intel Corporation\r
+  Copyright (c) 2008 - 2010, 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
@@ -31,14 +31,13 @@ typedef struct {
 } UEFI_IFR_BUFFER_STORAGE_NODE;\r
 \r
 /**\r
-  Get the default value for Buffer Type storage from the first FormSet\r
-  in the Package List specified by a EFI_HII_HANDLE.\r
+  Get the default value for Buffer Type storage from the FormSet in ThunkContext.\r
   \r
   The results can be multiple instances of UEFI_IFR_BUFFER_STORAGE_NODE. \r
   They are inserted to the link list.\r
   \r
-  @param  UefiHiiHandle           The handle for the package list.\r
-  @param  UefiDefaultsListHead The head of link list for the output.\r
+  @param  ThunkContext  Hii thunk context.\r
+  @param  UefiDefaults  The head of link list for the output.\r
 \r
   @retval   EFI_SUCCESS          Successful.\r
   \r
@@ -47,31 +46,29 @@ EFI_STATUS
 UefiIfrGetBufferTypeDefaults (\r
   IN  HII_THUNK_CONTEXT   *ThunkContext,\r
   OUT LIST_ENTRY          **UefiDefaults\r
-);\r
+  );\r
 \r
 /**\r
   Convert the UEFI Buffer Type default values to a Framework HII default\r
   values specified by a EFI_HII_VARIABLE_PACK_LIST structure.\r
   \r
-  @param  ListHead                  The link list of UEFI_IFR_BUFFER_STORAGE_NODE\r
-                                              which contains the default values retrived from\r
-                                              a UEFI form set.\r
-  @param  DefaultMask            The default mask.\r
-                                             The valid values are FRAMEWORK_EFI_IFR_FLAG_DEFAULT\r
-                                             and FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.\r
-                                            UEFI spec only map FRAMEWORK_EFI_IFR_FLAG_DEFAULT and FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING \r
-                                            from specification to valid default class.\r
+  @param  ListHead             The link list of UEFI_IFR_BUFFER_STORAGE_NODE\r
+                               which contains the default values retrived from a UEFI form set.\r
+  @param  DefaultMask          The default mask.\r
+                               The valid values are EFI_IFR_FLAG_DEFAULT and EFI_IFR_FLAG_MANUFACTURING.\r
+                               UEFI spec only map EFI_IFR_FLAG_DEFAULT and EFI_IFR_FLAG_MANUFACTURING \r
+                               from specification to valid default class.\r
+  @param  UefiFormSetDefaultVarStoreId\r
+                               ID of the default varstore in FormSet.\r
   @param  VariablePackList     The output default value in a format defined in Framework.\r
-                                             \r
 \r
-  @retval   EFI_SUCCESS                       Successful.\r
-  @retval   EFI_INVALID_PARAMETER      The default mask is not FRAMEWORK_EFI_IFR_FLAG_DEFAULT or \r
-                                                           FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.\r
+  @retval   EFI_SUCCESS                Successful.\r
+  @retval   EFI_INVALID_PARAMETER      The default mask is not EFI_IFR_FLAG_DEFAULT or \r
+                                       EFI_IFR_FLAG_MANUFACTURING.\r
 **/\r
-\r
 EFI_STATUS\r
 UefiDefaultsToFwDefaults (\r
-  IN     LIST_ENTRY                  *UefiIfrDefaults,\r
+  IN     LIST_ENTRY                  *ListHead,\r
   IN     UINTN                       DefaultMask,\r
   IN     EFI_VARSTORE_ID             UefiFormSetDefaultVarStoreId,\r
   OUT    EFI_HII_VARIABLE_PACK_LIST  **VariablePackList\r
@@ -81,17 +78,13 @@ UefiDefaultsToFwDefaults (
   Free up all buffer allocated for the link list of UEFI_IFR_BUFFER_STORAGE_NODE.\r
     \r
   @param  ListHead                  The link list of UEFI_IFR_BUFFER_STORAGE_NODE\r
-                                              which contains the default values retrived from\r
-                                              a UEFI form set.\r
-                                             \r
+                                    which contains the default values retrived from\r
+                                    a UEFI form set.\r
 \r
-  @retval   EFI_SUCCESS                       Successful.\r
-  @retval   EFI_INVALID_PARAMETER      The default mask is not FRAMEWORK_EFI_IFR_FLAG_DEFAULT or \r
-                                                           FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.\r
 **/\r
 VOID\r
 FreeDefaultList (\r
-  IN     LIST_ENTRY                  *UefiIfrDefaults\r
+  IN     LIST_ENTRY                  *ListHead\r
   );\r
 \r
 #endif\r
index f5480d2cb6b85d131489735c57312fc7d686bf55..a25854377e9b5d3af9cfef049284c55129e5cdda 100644 (file)
@@ -25,6 +25,15 @@ BOOLEAN          mInScopeGrayOut;
 EFI_GUID  mFrameworkHiiCompatibilityGuid = EFI_IFR_FRAMEWORK_GUID;\r
 extern EFI_GUID mTianoHiiIfrGuid;\r
 \r
+/**\r
+  Find the question's OneOfOptionMap list in FormSet \r
+  based on the input question Id. \r
+  \r
+  @param FormSet     FormSet context.\r
+  @param QuestionId  Unique ID to specicy the question in FormSet.\r
+  \r
+  @return the found OneOfOptionMap list. If not found, NULL will return.\r
+**/\r
 LIST_ENTRY *\r
 GetOneOfOptionMapEntryListHead (\r
   IN CONST FORM_BROWSER_FORMSET  *FormSet,\r
@@ -47,6 +56,12 @@ GetOneOfOptionMapEntryListHead (
   return NULL;\r
 }\r
 \r
+/**\r
+  Free OneOfOption map list.\r
+  \r
+  @param OneOfOptionMapListHead Pointer to list header of OneOfOptionMap list.\r
+\r
+**/\r
 VOID\r
 DestoryOneOfOptionMap (\r
   IN LIST_ENTRY     *OneOfOptionMapListHead\r
index 327101be7ddabe6802a069cc35631daf05ff435c..edcc6b028c14efb2e0f14c7b57d670b9ff08a645 100644 (file)
@@ -8,7 +8,7 @@
   2) Ignore the IFR opcode which is invalid for Form Package\r
      generated using Framework VFR file.\r
 \r
-  Copyright (c) 2008 - 2009, Intel Corporation\r
+  Copyright (c) 2008 - 2010, 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
@@ -170,13 +170,15 @@ typedef struct {
   EFI_HII_VALUE       Value;\r
   EFI_IMAGE_ID        ImageId;\r
 \r
-#if 0\r
-  FORM_EXPRESSION     *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf\r
-#endif\r
 } QUESTION_OPTION;\r
 \r
 #define QUESTION_OPTION_FROM_LINK(a)  CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)\r
 \r
+typedef union {\r
+  EFI_STRING_ID       VarName;\r
+  UINT16              VarOffset;\r
+} VAR_STORE_INFO;\r
+\r
 #define FORM_BROWSER_STATEMENT_SIGNATURE  SIGNATURE_32 ('F', 'S', 'T', 'A')\r
 typedef struct {\r
   UINTN                 Signature;\r
@@ -197,22 +199,11 @@ typedef struct {
   EFI_QUESTION_ID       QuestionId;       // The value of zero is reserved\r
   EFI_VARSTORE_ID       VarStoreId;       // A value of zero indicates no variable storage\r
   FORMSET_STORAGE       *Storage;\r
-  union {\r
-    EFI_STRING_ID       VarName;\r
-    UINT16              VarOffset;\r
-  }  VarStoreInfo;\r
-#if 0\r
-  CHAR16                *UnicodeVarName;\r
-#endif\r
+  VAR_STORE_INFO        VarStoreInfo;\r
   \r
   UINT16                StorageWidth;\r
   UINT8                 QuestionFlags;\r
 \r
-#if 0\r
-  CHAR16                *VariableName;    // Name/Value or EFI Variable name\r
-  CHAR16                *BlockName;       // Buffer storage block name: "OFFSET=...WIDTH=..."\r
-#endif\r
-\r
   EFI_HII_VALUE         HiiValue;         // Edit copy for checkbox, numberic, oneof\r
   UINT8                 *BufferValue;     // Edit copy for string, password, orderedlist\r
 \r
@@ -239,9 +230,6 @@ typedef struct {
   //\r
   // Get from IFR parsing\r
   //\r
-#if 0\r
-  FORM_EXPRESSION       *ValueExpression;    // nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly\r
-#endif\r
   LIST_ENTRY            DefaultListHead;     // nested EFI_IFR_DEFAULT list (QUESTION_DEFAULT), provide default values\r
   LIST_ENTRY            OptionListHead;      // nested EFI_IFR_ONE_OF_OPTION list (QUESTION_OPTION)\r
 \r
@@ -249,13 +237,6 @@ typedef struct {
   UINT8                 RefreshInterval;     // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh\r
   BOOLEAN               InSubtitle;          // nesting inside of EFI_IFR_SUBTITLE\r
 \r
-#if 0\r
-  LIST_ENTRY            InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)\r
-  LIST_ENTRY            NoSubmitListHead;    // nested nosubmit expression list (FORM_EXPRESSION)\r
-  FORM_EXPRESSION       *GrayOutExpression;  // nesting inside of GrayOutIf\r
-  FORM_EXPRESSION       *SuppressExpression; // nesting inside of SuppressIf\r
-#endif\r
-\r
 } FORM_BROWSER_STATEMENT;\r
 \r
 #define FORM_BROWSER_STATEMENT_FROM_LINK(a)  CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)\r
@@ -330,11 +311,28 @@ typedef struct {
 } FORM_BROWSER_FORMSET;\r
 \r
 \r
+/**\r
+  Parse opcodes in the formset IFR binary.\r
+\r
+  @param  FormSet                Pointer of the FormSet data structure.\r
+\r
+  @retval EFI_SUCCESS            Opcode parse success.\r
+  @retval Other                  Opcode parse fail.\r
+\r
+**/\r
 EFI_STATUS\r
 ParseOpCodes (\r
   IN FORM_BROWSER_FORMSET              *FormSet\r
   );\r
 \r
+/**\r
+  Free resources allocated for a FormSet\r
+\r
+  @param  FormSet                Pointer of the FormSet\r
+\r
+  @return None.\r
+\r
+**/\r
 VOID\r
 DestroyFormSet (\r
   IN OUT FORM_BROWSER_FORMSET  *FormSet\r
index 9d2cab5595d12323c15cdc0ab7f821702ce067a1..a9a0bd6ed576619465812f5ca1217340ca9030b7 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2010, 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
@@ -50,13 +50,12 @@ EFI_HII_VALUE *mExpressionEvaluationStackPointer = NULL;
   @param  Stack                  On input: old stack; On output: new stack\r
   @param  StackPtr               On input: old stack pointer; On output: new stack\r
                                  pointer\r
-  @param  StackPtr               On input: old stack end; On output: new stack end\r
+  @param  StackEnd               On input: old stack end; On output: new stack end\r
 \r
   @retval EFI_SUCCESS            Grow stack success.\r
   @retval EFI_OUT_OF_RESOURCES   No enough memory for stack space.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 GrowStack (\r
   IN OUT EFI_HII_VALUE  **Stack,\r
@@ -110,7 +109,7 @@ GrowStack (
   @param  Stack                  On input: old stack; On output: new stack\r
   @param  StackPtr               On input: old stack pointer; On output: new stack\r
                                  pointer\r
-  @param  StackPtr               On input: old stack end; On output: new stack end\r
+  @param  StackEnd               On input: old stack end; On output: new stack end\r
   @param  Data                   Data to push.\r
 \r
   @retval EFI_SUCCESS            Push stack success.\r
@@ -155,7 +154,7 @@ PushStack (
   @param  Stack                  On input: old stack; On output: new stack\r
   @param  StackPtr               On input: old stack pointer; On output: new stack\r
                                  pointer\r
-  @param  StackPtr               On input: old stack end; On output: new stack end\r
+  @param  StackEnd               On input: old stack end; On output: new stack end\r
   @param  Data                   Data to pop.\r
 \r
   @retval EFI_SUCCESS            The value was popped onto the stack.\r
@@ -188,10 +187,6 @@ PopStack (
 /**\r
   Reset stack pointer to begin of the stack.\r
 \r
-  None.\r
-\r
-  @return None.\r
-\r
 **/\r
 VOID\r
 ResetScopeStack (\r
@@ -265,10 +260,6 @@ PopScope (
 /**\r
   Reset stack pointer to begin of the stack.\r
 \r
-  None.\r
-\r
-  @return None.\r
-\r
 **/\r
 VOID\r
 ResetExpressionStack (\r
index c55277ff1310296a9581edae51a6edb2617045e7..7444f407921fd45388f8575b46f32d6f0144e247 100644 (file)
@@ -2,7 +2,7 @@
   Internal Function and Macro defintions for IFR Expression evaluation used in Ifr Parsing. This header file should only\r
   be included by UefiIfrParserExpression.c and UefiIfrParser.c\r
 \r
-  Copyright (c) 2008, Intel Corporation\r
+  Copyright (c) 2008 - 2010, 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
 /**\r
   Reset stack pointer to begin of the stack.\r
 \r
-  None.\r
-\r
-  @return None.\r
-\r
 **/\r
 VOID\r
 ResetScopeStack (\r
index d1d5d4d3981d016ef3bdc8331bb48e590c418fc4..5eac46da2a3cb1d7a9a22fea26e0fc36ca92344a 100644 (file)
@@ -1,8 +1,8 @@
-/**@file\r
+/** @file\r
 \r
   This file contains the keyboard processing code to the HII database.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2010, 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
@@ -303,8 +303,8 @@ FwHiiHandleToThunkContext (
 /**\r
   Find the corressponding HII Thunk Context from a UEFI HII Handle given.\r
 \r
-  @param Private      The HII Thunk Module Private context.\r
-  @param UEFIHiiHandle  The UEFI HII Handle.\r
+  @param Private        The HII Thunk Module Private context.\r
+  @param UefiHiiHandle  The UEFI HII Handle.\r
 \r
   @return NULL        If UEFI HII Handle is invalid.\r
   @return The corresponding HII Thunk Context.\r
@@ -369,15 +369,15 @@ TagGuidToIfrPackThunkContext (
 /**\r
   Clean up the HII Thunk Context for a UEFI HII Handle.\r
 \r
-  @param Private      The HII Thunk Module Private context.\r
-  @param UEFIHiiHandle  The UEFI HII Handle.\r
+  @param Private        The HII Thunk Module Private context.\r
+  @param UefiHiiHandle  The UEFI HII Handle.\r
 \r
 **/\r
 VOID\r
 DestroyThunkContextForUefiHiiHandle (\r
   IN HII_THUNK_PRIVATE_DATA     *Private,\r
   IN EFI_HII_HANDLE             UefiHiiHandle\r
- )\r
 )\r
 {\r
   HII_THUNK_CONTEXT     *ThunkContext;\r
 \r
@@ -389,16 +389,21 @@ DestroyThunkContextForUefiHiiHandle (
 \r
 \r
 /**\r
-  This function create a HII_THUNK_CONTEXT for a package list registered\r
-  by a module calling EFI_HII_DATABASE_PROTOCOL.NewPackageList. It records\r
-  the PackageListGuid in EFI_HII_PACKAGE_LIST_HEADER in the TagGuid in \r
-  HII_THUNK_CONTEXT created. This TagGuid will be used as a key to s\r
+  This function create a HII_THUNK_CONTEXT for the input UEFI HiiHandle\r
+  that is created when a package list registered by a module calling \r
+  EFI_HII_DATABASE_PROTOCOL.NewPackageList. \r
+  This function records the PackageListGuid of EFI_HII_PACKAGE_LIST_HEADER \r
+  into the TagGuid of the created HII_THUNK_CONTEXT.\r
+\r
+  @param UefiHiiHandle  The UEFI HII Handle.\r
+  \r
+  @return the new created Hii thunk context.\r
 \r
 **/\r
 HII_THUNK_CONTEXT *\r
 CreateThunkContextForUefiHiiHandle (\r
   IN  EFI_HII_HANDLE             UefiHiiHandle\r
- )\r
 )\r
 {\r
   EFI_STATUS            Status;\r
   EFI_GUID              PackageGuid;\r
@@ -551,7 +556,7 @@ GetFormSetGuid (
 \r
   @param Private             The HII Thunk Private Context.\r
   @param StringPackageCount  The String package count.\r
-  @param FormSetGuid         The IFR Package count.\r
+  @param IfrPackageCount     The IFR Package count.\r
 \r
   @return  A newly created Thunk Context.\r
   @retval  NULL  No resource to create a new Thunk Context.\r
index 087eafaaa8efb870e8b2665a0f9df6b59a25b934..ebf44126f111d98bc0a2859bc6148e260862efc6 100644 (file)
@@ -1,8 +1,8 @@
-/**@file\r
+/** @file\r
 \r
   This file contains utility functions by HII Thunk Modules.\r
   \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2010, 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
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _HII_THUNK_UTILITY_H\r
-#define _HII_THUNK_UTILITY_H\r
+#ifndef _HII_THUNK_UTILITY_H_\r
+#define _HII_THUNK_UTILITY_H_\r
 \r
 /**\r
   \r
@@ -111,73 +111,121 @@ ExtractGuidFromHiiHandle (
 ;\r
 \r
 /**\r
-  Find the UefiHiiHandle based on a Framework HII Handle returned by\r
-  the HII Thunk to Framework HII code.\r
+  Find the corressponding UEFI HII Handle from a Framework HII Handle given.\r
 \r
-  @param Private                        The pointer to the private data of Hii Thunk.\r
-  @param FwHiiHandle     Framework HII Handle returned by  the HII Thunk to Framework HII code.\r
+  @param Private      The HII Thunk Module Private context.\r
+  @param FwHiiHandle  The Framemwork HII Handle.\r
 \r
-  @retval  NULL                           If Framework HII Handle passed in does not have matching UEFI HII handle.\r
-  @retval  !NULL                         If the match is found.\r
-  \r
+  @return NULL        If Framework HII Handle is invalid.\r
+  @return The corresponding UEFI HII Handle.\r
 **/\r
 EFI_HII_HANDLE\r
 FwHiiHandleToUefiHiiHandle (\r
-  IN CONST HII_THUNK_PRIVATE_DATA *Private,\r
+  IN CONST HII_THUNK_PRIVATE_DATA      *Private,\r
   IN FRAMEWORK_EFI_HII_HANDLE          FwHiiHandle\r
   );\r
 \r
+/**\r
+  Find the corressponding HII Thunk Context from a Framework HII Handle given.\r
+\r
+  @param Private      The HII Thunk Module Private context.\r
+  @param FwHiiHandle  The Framemwork HII Handle.\r
+\r
+  @return NULL        If Framework HII Handle is invalid.\r
+  @return The corresponding HII Thunk Context.\r
+**/\r
 HII_THUNK_CONTEXT *\r
 FwHiiHandleToThunkContext (\r
-  IN CONST HII_THUNK_PRIVATE_DATA *Private,\r
+  IN CONST HII_THUNK_PRIVATE_DATA      *Private,\r
   IN FRAMEWORK_EFI_HII_HANDLE          FwHiiHandle\r
   );\r
 \r
+/**\r
+  Find the corressponding HII Thunk Context from a UEFI HII Handle given.\r
+\r
+  @param Private        The HII Thunk Module Private context.\r
+  @param UefiHiiHandle  The UEFI HII Handle.\r
+\r
+  @return NULL        If UEFI HII Handle is invalid.\r
+  @return The corresponding HII Thunk Context.\r
+**/\r
 HII_THUNK_CONTEXT *\r
 UefiHiiHandleToThunkContext (\r
-  IN CONST HII_THUNK_PRIVATE_DATA *Private,\r
+  IN CONST HII_THUNK_PRIVATE_DATA     *Private,\r
   IN EFI_HII_HANDLE                   UefiHiiHandle\r
   );\r
 \r
+/**\r
+  Find the corressponding HII Thunk Context from a Tag GUID.\r
+\r
+  @param Private      The HII Thunk Module Private context.\r
+  @param Guid         The Tag GUID.\r
+\r
+  @return NULL        No HII Thunk Context matched the Tag GUID.\r
+  @return The corresponding HII Thunk Context.\r
+**/\r
 HII_THUNK_CONTEXT *\r
 TagGuidToIfrPackThunkContext (\r
   IN CONST HII_THUNK_PRIVATE_DATA *Private,\r
   IN CONST EFI_GUID                   *Guid\r
   );\r
 \r
+/**\r
+  This function create a HII_THUNK_CONTEXT for the input UEFI HiiHandle\r
+  that is created when a package list registered by a module calling \r
+  EFI_HII_DATABASE_PROTOCOL.NewPackageList. \r
+  This function records the PackageListGuid of EFI_HII_PACKAGE_LIST_HEADER \r
+  into the TagGuid of the created HII_THUNK_CONTEXT.\r
+\r
+  @param UefiHiiHandle  The UEFI HII Handle.\r
+  \r
+  @return the new created Hii thunk context.\r
+\r
+**/\r
 HII_THUNK_CONTEXT *\r
 CreateThunkContextForUefiHiiHandle (\r
   IN  EFI_HII_HANDLE             UefiHiiHandle\r
- );\r
+  );\r
+\r
+/**\r
+  Clean up the HII Thunk Context for a UEFI HII Handle.\r
+\r
+  @param Private        The HII Thunk Module Private context.\r
+  @param UefiHiiHandle  The UEFI HII Handle.\r
 \r
+**/\r
 VOID\r
 DestroyThunkContextForUefiHiiHandle (\r
   IN HII_THUNK_PRIVATE_DATA     *Private,\r
   IN EFI_HII_HANDLE             UefiHiiHandle\r
- );\r
+  );\r
+\r
+/**\r
+  Get the number of HII Package for a Package type.\r
 \r
+  @param PackageListHeader      The Package List.\r
+  @param PackageType            The Package Type.\r
+\r
+  @return The number of Package for given type.\r
+**/\r
 UINTN\r
 GetPackageCountByType (\r
   IN CONST EFI_HII_PACKAGE_LIST_HEADER     *PackageListHeader,\r
   IN       UINT8                           PackageType\r
   );\r
 \r
-EFI_STATUS\r
-CreateQuestionIdMap (\r
-  IN    OUT HII_THUNK_CONTEXT  *ThunkContext\r
-  );\r
+/**\r
+  Creat a Thunk Context.\r
 \r
-VOID\r
-GetAttributesOfFirstFormSet (\r
-  IN    OUT HII_THUNK_CONTEXT  *ThunkContext\r
-  );\r
+  ASSERT if no FormSet Opcode is found.\r
 \r
-LIST_ENTRY *\r
-GetMapEntryListHead (\r
-  IN CONST HII_THUNK_CONTEXT  *ThunkContext,\r
-  IN       UINT16             VarStoreId\r
-  );\r
+  @param Private             The HII Thunk Private Context.\r
+  @param StringPackageCount  The String package count.\r
+  @param IfrPackageCount     The IFR Package count.\r
 \r
+  @return  A newly created Thunk Context.\r
+  @retval  NULL  No resource to create a new Thunk Context.\r
+**/\r
 HII_THUNK_CONTEXT *\r
 CreateThunkContext (\r
   IN  HII_THUNK_PRIVATE_DATA      *Private,\r
@@ -185,33 +233,55 @@ CreateThunkContext (
   IN  UINTN                       IfrPackageCount\r
   );\r
 \r
+/**\r
+  Destroy the Thunk Context and free up all resource.\r
+\r
+  @param ThunkContext        The HII Thunk Private Context to be freed.\r
+\r
+**/\r
 VOID\r
 DestroyThunkContext (\r
   IN HII_THUNK_CONTEXT          *ThunkContext\r
   );\r
 \r
-VOID\r
-DestoryOneOfOptionMap (\r
-  IN LIST_ENTRY     *OneOfOptionMapListHead\r
-  );\r
+/**\r
+  Get FormSet GUID.\r
+\r
+  ASSERT if no FormSet Opcode is found.\r
 \r
+  @param Packages             Form Framework Package.\r
+  @param FormSetGuid          Return the FormSet Guid.\r
+\r
+**/\r
 VOID\r
 GetFormSetGuid (\r
   IN  EFI_HII_PACKAGE_HEADER  *Package,\r
   OUT EFI_GUID                *FormSetGuid\r
-  )\r
-;\r
+  );\r
+\r
+/**\r
+  Get the Form Package from a Framework Package List.\r
+\r
+  @param Packages               Framework Package List.\r
 \r
+  @return The Form Package Header found.\r
+**/\r
 EFI_HII_PACKAGE_HEADER *\r
 GetIfrPackage (\r
   IN CONST EFI_HII_PACKAGES               *Packages\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Parse the Form Package and build a FORM_BROWSER_FORMSET structure.\r
+\r
+  @param  UefiHiiHandle          PackageList Handle\r
+\r
+  @return A pointer to FORM_BROWSER_FORMSET.\r
+\r
+**/\r
 FORM_BROWSER_FORMSET *\r
 ParseFormSet (\r
   IN EFI_HII_HANDLE   UefiHiiHandle\r
-  )\r
-;\r
+  );\r
 \r
 #endif\r
index 5c6fd2a9e70f7f0d4fd3847b064ce9ccff54bd51..ff109bf4237b2c929585669f5c06a07eab319ebf 100644 (file)
@@ -1,4 +1,4 @@
-/**\r
+/** @file\r
 Module produce FV2 on top of FV.\r
 \r
 UEFI PI specification supersedes Inte's Framework Specification.\r
@@ -9,7 +9,7 @@ these two conditions are true:
 1) Framework module producing FV is present\r
 2) And the rest of modules on the platform consume FV2\r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -164,8 +164,8 @@ Fv2SetVolumeAttributes (
   ReadFile() is used to retrieve any file from a firmware volume\r
   during the DXE phase. The actual binary encoding of the file in\r
   the firmware volume media may be in any arbitrary format as long\r
-  as it does the following: ?It is accessed using the Firmware\r
-  Volume Protocol. ?The image that is returned follows the image\r
+  as it does the following: It is accessed using the Firmware\r
+  Volume Protocol. The image that is returned follows the image\r
   format defined in Code Definitions: PI Firmware File Format.\r
   If the input value of Buffer==NULL, it indicates the caller is\r
   requesting only that the type, attributes, and size of the\r
@@ -238,7 +238,7 @@ Fv2SetVolumeAttributes (
 \r
   @retval EFI_OUT_OF_RESOURCES  An allocation failure occurred.\r
 \r
-  @retavl EFI_NOT_FOUND   Name was not found in the firmware\r
+  @retval EFI_NOT_FOUND   Name was not found in the firmware\r
                           volume.\r
 \r
   @retval EFI_DEVICE_ERROR  A hardware error occurred when\r
@@ -265,11 +265,10 @@ Fv2ReadFile (
   ReadSection() is used to retrieve a specific section from a file\r
   within a firmware volume. The section returned is determined\r
   using a depth-first, left-to-right search algorithm through all\r
-  sections found in the specified file. See\r
-   ????Firmware File Sections???? on page 9 for more details about\r
-  sections. The output buffer is specified by a double indirection\r
-  of the Buffer parameter. The input value of Buffer is used to\r
-  determine if the output buffer is caller allocated or is\r
+  sections found in the specified file. The output buffer is \r
+  specified by a double indirection of the Buffer parameter. \r
+  The input value of Buffer is used to determine \r
+  if the output buffer is caller allocated or is\r
   dynamically allocated by ReadSection(). If the input value of\r
   Buffer!=NULL, it indicates that the output buffer is caller\r
   allocated. In this case, the input value of *BufferSize\r
@@ -392,10 +391,10 @@ Fv2ReadSection (
   undefined. Type EFI_TPL is defined in RaiseTPL() in the UEFI 2.0\r
   specification.\r
 \r
-  @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
-              instance. NumberOfFiles Indicates the number of\r
-              elements in the array pointed to by FileData.\r
+  @param This           Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance. \r
 \r
+  @param NumberOfFiles  Indicates the number of elements in the \r
+                        array pointed to by FileData.\r
 \r
   @param WritePolicy  Indicates the level of reliability for the\r
                       write in the event of a power failure or\r
@@ -467,7 +466,9 @@ Fv2WriteFile (
 \r
 \r
   @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
-              instance. Key Pointer to a caller-allocated buffer\r
+              instance. \r
+\r
+  @param Key  Pointer to a caller-allocated buffer\r
               that contains implementation-specific data that is\r
               used to track where to begin the search for the\r
               next file. The size of the buffer must be at least\r
@@ -674,7 +675,15 @@ FIRMWARE_VOLUME2_PRIVATE_DATA gFirmwareVolume2PrivateDataTemplate = {
 //\r
 // Module globals\r
 //\r
+/**\r
+  This notification function is invoked when an instance of the\r
+  EFI_FIRMWARE_VOLUME_PROTOCOL is produced. It installs another instance of the\r
+  EFI_FIRMWARE_VOLUME2_PROTOCOL on the same handle.\r
+\r
+  @param  Event                 The event that occured\r
+  @param  Context               Context of event. Not used in this nofication function.\r
 \r
+**/\r
 VOID\r
 EFIAPI\r
 Fv2NotificationEvent (\r
@@ -958,7 +967,7 @@ Fv2SetVolumeAttributes (
   EFI_STATUS                     Status;\r
   UINTN                          Shift;\r
 \r
-  if (*FvAttributes & (EFI_FV2_READ_LOCK_STATUS | EFI_FV2_WRITE_LOCK_STATUS)) {\r
+  if ((*FvAttributes & (EFI_FV2_READ_LOCK_STATUS | EFI_FV2_WRITE_LOCK_STATUS)) != 0) {\r
     //\r
     // Framework FV protocol does not support EFI_FV2_READ_LOCK_* | EFI_FV2_WRITE_LOCK_*\r
     //\r
@@ -990,8 +999,8 @@ Fv2SetVolumeAttributes (
   ReadFile() is used to retrieve any file from a firmware volume\r
   during the DXE phase. The actual binary encoding of the file in\r
   the firmware volume media may be in any arbitrary format as long\r
-  as it does the following: ?It is accessed using the Firmware\r
-  Volume Protocol. ?The image that is returned follows the image\r
+  as it does the following: It is accessed using the Firmware\r
+  Volume Protocol. The image that is returned follows the image\r
   format defined in Code Definitions: PI Firmware File Format.\r
   If the input value of Buffer==NULL, it indicates the caller is\r
   requesting only that the type, attributes, and size of the\r
@@ -1064,7 +1073,7 @@ Fv2SetVolumeAttributes (
 \r
   @retval EFI_OUT_OF_RESOURCES  An allocation failure occurred.\r
 \r
-  @retavl EFI_NOT_FOUND   Name was not found in the firmware\r
+  @retval EFI_NOT_FOUND   Name was not found in the firmware\r
                           volume.\r
 \r
   @retval EFI_DEVICE_ERROR  A hardware error occurred when\r
@@ -1108,11 +1117,9 @@ Fv2ReadFile (
   ReadSection() is used to retrieve a specific section from a file\r
   within a firmware volume. The section returned is determined\r
   using a depth-first, left-to-right search algorithm through all\r
-  sections found in the specified file. See\r
-   ????Firmware File Sections???? on page 9 for more details about\r
-  sections. The output buffer is specified by a double indirection\r
-  of the Buffer parameter. The input value of Buffer is used to\r
-  determine if the output buffer is caller allocated or is\r
+  sections found in the specified file.The output buffer is specified \r
+  by a double indirection of the Buffer parameter. The input value of Buffer \r
+  is used to determine if the output buffer is caller allocated or is\r
   dynamically allocated by ReadSection(). If the input value of\r
   Buffer!=NULL, it indicates that the output buffer is caller\r
   allocated. In this case, the input value of *BufferSize\r
@@ -1252,9 +1259,10 @@ Fv2ReadSection (
   undefined. Type EFI_TPL is defined in RaiseTPL() in the UEFI 2.0\r
   specification.\r
 \r
-  @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
-              instance. NumberOfFiles Indicates the number of\r
-              elements in the array pointed to by FileData.\r
+  @param This           Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance. \r
+\r
+  @param NumberOfFiles  Indicates the number of\r
+                        elements in the array pointed to by FileData.\r
 \r
 \r
   @param WritePolicy  Indicates the level of reliability for the\r
@@ -1341,7 +1349,9 @@ Fv2WriteFile (
 \r
 \r
   @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
-              instance. Key Pointer to a caller-allocated buffer\r
+              instance. \r
+\r
+  @param Key  Pointer to a caller-allocated buffer\r
               that contains implementation-specific data that is\r
               used to track where to begin the search for the\r
               next file. The size of the buffer must be at least\r
index bc6eb2b8cb49fe7cfc4aef8b695e94380240cf10..db837927cc3ababbb2129c019392f32a32f1948f 100644 (file)
@@ -9,7 +9,7 @@ This module is used on platform when both of these two conditions are true:
 1) Framework module consumes EFI_PEI_FV_FILE_LOADER_PPI is present.\r
 2) The platform has PI modules that produce EFI_PEI_LOAD_FILE_PPI.\r
 \r
-Copyright (c) 2008, Intel Corporation\r
+Copyright (c) 2008 - 2010, Intel Corporation\r
 \r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -32,16 +32,16 @@ Module Name:
 \r
   Wrap the call to PI's EFI_PEI_LOAD_FILE_PPI.\r
 \r
-  @param This                  A pointer to EFI_PEI_FV_FILE_LOADER_PPI.\r
-  @param FileHeader         The pointer to the file header to be loaded by the Pe/Coff loader.\r
+  @param This           A pointer to EFI_PEI_FV_FILE_LOADER_PPI.\r
+  @param FfsHeader      Pointer to the FFS header of the file to load.\r
   @param ImageAddress   The loaded address of the Image.\r
-  @param ImageSize         Pointer to the size of the loaded image.\r
-  @param EntryPoint          Pointer to the entry point of the image.\r
+  @param ImageSize      Pointer to the size of the loaded image.\r
+  @param EntryPoint     Pointer to the entry point of the image.\r
 \r
-  @retval  EFI_SUCCESS                  The image was loaded successfully.\r
+  @retval  EFI_SUCCESS           The image was loaded successfully.\r
   @retval  EFI_OUT_OF_RESOURCE   There was not enought memory.\r
   @retval  EFI_INVALID_PARAMETER The contents of the FFS file did not contain a valid PE/COFF image that could be loaded.\r
---*/  \r
+**/  \r
 EFI_STATUS\r
 EFIAPI\r
 FrameworkLoadFile (\r
@@ -65,12 +65,12 @@ EFI_PEI_PPI_DESCRIPTOR     mPpiFrameworkLoadFile = {
 /**\r
   Standard entry point of a PEIM.\r
 \r
-  @param FfsHeadher  The FFS file header\r
+  @param FfsHeader    The FFS file header\r
   @param PeiServices  General purpose services available to every PEIM.\r
 \r
   @retval EFI_SUCCESS If the gEfiPeiReadOnlyVariablePpiGuid interface could be successfully installed.\r
 \r
---*/\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InitPeim (\r
@@ -92,16 +92,16 @@ InitPeim (
 \r
   Wrap the call to PI's EFI_PEI_LOAD_FILE_PPI.\r
 \r
-  @param This                  A pointer to EFI_PEI_FV_FILE_LOADER_PPI.\r
-  @param FileHeader         The pointer to the file header to be loaded by the Pe/Coff loader.\r
+  @param This           A pointer to EFI_PEI_FV_FILE_LOADER_PPI.\r
+  @param FfsHeader      The pointer to the file header to be loaded by the Pe/Coff loader.\r
   @param ImageAddress   The loaded address of the Image.\r
-  @param ImageSize         Pointer to the size of the loaded image.\r
-  @param EntryPoint          Pointer to the entry point of the image.\r
+  @param ImageSize      Pointer to the size of the loaded image.\r
+  @param EntryPoint     Pointer to the entry point of the image.\r
 \r
-  @retval  EFI_SUCCESS                  The image was loaded successfully.\r
+  @retval  EFI_SUCCESS           The image was loaded successfully.\r
   @retval  EFI_OUT_OF_RESOURCE   There was not enought memory.\r
   @retval  EFI_INVALID_PARAMETER The contents of the FFS file did not contain a valid PE/COFF image that could be loaded.\r
---*/  \r
+**/  \r
 EFI_STATUS\r
 EFIAPI\r
 FrameworkLoadFile (\r
index ef64cc84f16acc8041c9200d503b2a2ebb0237c3..4625698c47a21425a1c640ee4040b3548f176f14 100644 (file)
@@ -7,7 +7,7 @@ these two conditions are true:
 1) Framework module consuming FV is present\r
 2) And the platform only produces FV2\r
 \r
-Copyright (c) 2006 - 2010 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -29,180 +29,6 @@ Module Name:
 #include <Library/UefiLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 \r
-/**\r
-  Retrieves attributes, insures positive polarity of attribute bits, returns\r
-  resulting attributes in output parameter\r
-\r
-  @param  This                  Calling context\r
-  @param  Attributes            output buffer which contains attributes\r
-\r
-  @retval EFI_INVALID_PARAMETER\r
-  @retval EFI_SUCCESS\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-FvGetVolumeAttributes (\r
-  IN  EFI_FIRMWARE_VOLUME_PROTOCOL  *This,\r
-  OUT FRAMEWORK_EFI_FV_ATTRIBUTES   *Attributes\r
-  );\r
-\r
-/**\r
-  Sets volume attributes\r
-\r
-  @param  This                  Calling context\r
-  @param  Attributes            Buffer which contains attributes\r
-\r
-  @retval EFI_INVALID_PARAMETER\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_SUCCESS\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-FvSetVolumeAttributes (\r
-  IN EFI_FIRMWARE_VOLUME_PROTOCOL     *This,\r
-  IN OUT FRAMEWORK_EFI_FV_ATTRIBUTES  *Attributes\r
-  );\r
-\r
-/**\r
-  Read the requested file (NameGuid) and returns data in Buffer.\r
-\r
-  @param  This                  Calling context\r
-  @param  NameGuid              Filename identifying which file to read\r
-  @param  Buffer                Pointer to pointer to buffer in which contents of file are returned.\r
-                                <br>\r
-                                If Buffer is NULL, only type, attributes, and size are returned as\r
-                                there is no output buffer.\r
-                                <br>\r
-                                If Buffer != NULL and *Buffer == NULL, the output buffer is allocated\r
-                                from BS pool by ReadFile\r
-                                <br>\r
-                                If Buffer != NULL and *Buffer != NULL, the output buffer has been\r
-                                allocated by the caller and is being passed in.\r
-  @param  BufferSize            Indicates the buffer size passed in, and on output the size\r
-                                required to complete the read\r
-  @param  FoundType             Indicates the type of the file who's data is returned\r
-  @param  FileAttributes        Indicates the attributes of the file who's data is resturned\r
-  @param  AuthenticationStatus  Indicates the authentication status of the data\r
-\r
-  @retval EFI_SUCCESS\r
-  @retval EFI_WARN_BUFFER_TOO_SMALL\r
-  @retval EFI_NOT_FOUND\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_ACCESS_DENIED\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-FvReadFile (\r
-  IN EFI_FIRMWARE_VOLUME_PROTOCOL   *This,\r
-  IN EFI_GUID                       *NameGuid,\r
-  IN OUT VOID                       **Buffer,\r
-  IN OUT UINTN                      *BufferSize,\r
-  OUT EFI_FV_FILETYPE               *FoundType,\r
-  OUT EFI_FV_FILE_ATTRIBUTES        *FileAttributes,\r
-  OUT UINT32                        *AuthenticationStatus\r
-  );\r
-\r
-/**\r
-  Read the requested section from the specified file and returns data in Buffer.\r
-\r
-  @param  This                  Calling context\r
-  @param  NameGuid              Filename identifying the file from which to read\r
-  @param  SectionType           Indicates what section type to retrieve\r
-  @param  SectionInstance       Indicates which instance of SectionType to retrieve\r
-  @param  Buffer                Pointer to pointer to buffer in which contents of file are returned.\r
-                                <br>\r
-                                If Buffer is NULL, only type, attributes, and size are returned as\r
-                                there is no output buffer.\r
-                                <br>\r
-                                If Buffer != NULL and *Buffer == NULL, the output buffer is allocated\r
-                                from BS pool by ReadFile\r
-                                <br>\r
-                                If Buffer != NULL and *Buffer != NULL, the output buffer has been\r
-                                allocated by the caller and is being passed in.\r
-  @param  BufferSize            Indicates the buffer size passed in, and on output the size\r
-                                required to complete the read\r
-  @param  AuthenticationStatus  Indicates the authentication status of the data\r
-\r
-  @retval EFI_SUCCESS\r
-  @retval EFI_WARN_BUFFER_TOO_SMALL\r
-  @retval EFI_OUT_OF_RESOURCES\r
-  @retval EFI_NOT_FOUND\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_ACCESS_DENIED\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI \r
-FvReadSection (\r
-  IN EFI_FIRMWARE_VOLUME_PROTOCOL   *This,\r
-  IN EFI_GUID                       *NameGuid,\r
-  IN EFI_SECTION_TYPE               SectionType,\r
-  IN UINTN                          SectionInstance,\r
-  IN OUT VOID                       **Buffer,\r
-  IN OUT UINTN                      *BufferSize,\r
-  OUT UINT32                        *AuthenticationStatus\r
-  );\r
-\r
-/**\r
-  Write the supplied file (NameGuid) to the FV.\r
-\r
-  @param  This                  Calling context\r
-  @param  NumberOfFiles         Indicates the number of file records pointed to by FileData\r
-  @param  WritePolicy           Indicates the level of reliability of the write with respect to\r
-                                things like power failure events.\r
-  @param  FileData              A pointer to an array of EFI_FV_WRITE_FILE_DATA structures. Each\r
-                                element in the array indicates a file to write, and there are\r
-                                NumberOfFiles elements in the input array.\r
-\r
-  @retval EFI_SUCCESS\r
-  @retval EFI_OUT_OF_RESOURCES\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_WRITE_PROTECTED\r
-  @retval EFI_NOT_FOUND\r
-  @retval EFI_INVALID_PARAMETER\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI \r
-FvWriteFile (\r
-  IN EFI_FIRMWARE_VOLUME_PROTOCOL      *This,\r
-  IN UINT32                            NumberOfFiles,\r
-  IN FRAMEWORK_EFI_FV_WRITE_POLICY     WritePolicy,\r
-  IN FRAMEWORK_EFI_FV_WRITE_FILE_DATA  *FileData\r
-  );\r
-\r
-/**\r
-  Given the input key, search for the next matching file in the volume.\r
-\r
-  @param  This                  Calling context\r
-  @param  Key                   Pointer to a caller allocated buffer that contains an implementation\r
-                                specific key that is used to track where to begin searching on\r
-                                successive calls.\r
-  @param  FileType              Indicates the file type to filter for\r
-  @param  NameGuid              Guid filename of the file found\r
-  @param  Attributes            Attributes of the file found\r
-  @param  Size                  Size in bytes of the file found\r
-\r
-  @retval EFI_SUCCESS\r
-  @retval EFI_NOT_FOUND\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_ACCESS_DENIED\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI \r
-FvGetNextFile (\r
-  IN EFI_FIRMWARE_VOLUME_PROTOCOL   *This,\r
-  IN OUT VOID                       *Key,\r
-  IN OUT EFI_FV_FILETYPE            *FileType,\r
-  OUT EFI_GUID                      *NameGuid,\r
-  OUT EFI_FV_FILE_ATTRIBUTES        *Attributes,\r
-  OUT UINTN                         *Size\r
-  );\r
-\r
 #define FIRMWARE_VOLUME_PRIVATE_DATA_SIGNATURE  SIGNATURE_32 ('f', 'v', 't', 'h')\r
 \r
 typedef struct {\r
@@ -213,138 +39,6 @@ typedef struct {
 \r
 #define FIRMWARE_VOLUME_PRIVATE_DATA_FROM_THIS(a) CR (a, FIRMWARE_VOLUME_PRIVATE_DATA, FirmwareVolume, FIRMWARE_VOLUME_PRIVATE_DATA_SIGNATURE)\r
 \r
-//\r
-// Firmware Volume Protocol template\r
-//\r
-EFI_EVENT  mFvRegistration;\r
-\r
-FIRMWARE_VOLUME_PRIVATE_DATA gFirmwareVolumePrivateDataTemplate = {\r
-  FIRMWARE_VOLUME_PRIVATE_DATA_SIGNATURE,\r
-  {\r
-    FvGetVolumeAttributes,\r
-    FvSetVolumeAttributes,\r
-    FvReadFile,\r
-    FvReadSection,\r
-    FvWriteFile,\r
-    FvGetNextFile,\r
-    0,\r
-    NULL\r
-  },\r
-  NULL\r
-};\r
-\r
-//\r
-// Module globals\r
-//\r
-\r
-VOID\r
-EFIAPI\r
-FvNotificationEvent (\r
-  IN  EFI_EVENT       Event,\r
-  IN  VOID            *Context\r
-  )\r
-{\r
-  EFI_STATUS                    Status;\r
-  UINTN                         BufferSize;\r
-  EFI_HANDLE                    Handle;\r
-  FIRMWARE_VOLUME_PRIVATE_DATA  *Private;\r
-  EFI_FIRMWARE_VOLUME_PROTOCOL  *FirmwareVolume;\r
-\r
-  while (TRUE) {\r
-    BufferSize = sizeof (Handle);\r
-    Status = gBS->LocateHandle (\r
-                    ByRegisterNotify,\r
-                    &gEfiFirmwareVolume2ProtocolGuid,\r
-                    mFvRegistration,\r
-                    &BufferSize,\r
-                    &Handle\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      //\r
-      // Exit Path of While Loop....\r
-      //\r
-      break;\r
-    }\r
-\r
-    //\r
-    // Skip this handle if the Firmware Volume Protocol is already installed\r
-    //\r
-    Status = gBS->HandleProtocol (\r
-                    Handle,\r
-                    &gEfiFirmwareVolumeProtocolGuid,\r
-                    (VOID **)&FirmwareVolume\r
-                    );\r
-    if (!EFI_ERROR (Status)) {\r
-      continue;\r
-    }\r
-\r
-    //\r
-    // Allocate private data structure\r
-    //\r
-    Private = AllocateCopyPool (sizeof (FIRMWARE_VOLUME_PRIVATE_DATA), &gFirmwareVolumePrivateDataTemplate);\r
-    if (Private == NULL) {\r
-      continue;\r
-    }\r
-\r
-    //\r
-    // Retrieve the Firmware Volume2 Protocol\r
-    //\r
-    Status = gBS->HandleProtocol (\r
-                    Handle,\r
-                    &gEfiFirmwareVolume2ProtocolGuid,\r
-                    (VOID **)&Private->FirmwareVolume2\r
-                    );\r
-    ASSERT_EFI_ERROR (Status);\r
-\r
-    //\r
-    // Fill in rest of private data structure\r
-    //\r
-    Private->FirmwareVolume.KeySize      = Private->FirmwareVolume2->KeySize;\r
-    Private->FirmwareVolume.ParentHandle = Private->FirmwareVolume2->ParentHandle;\r
-\r
-    //\r
-    // Install Firmware Volume Protocol onto same handle\r
-    //\r
-    Status = gBS->InstallMultipleProtocolInterfaces (\r
-                    &Handle,\r
-                    &gEfiFirmwareVolumeProtocolGuid,\r
-                    &Private->FirmwareVolume,\r
-                    NULL\r
-                    );\r
-    ASSERT_EFI_ERROR (Status);\r
-  }\r
-}\r
-\r
-\r
-/**\r
-  The user Entry Point for DXE driver. The user code starts with this function\r
-  as the real entry point for the image goes into a library that calls this \r
-  function.\r
-\r
-  @param[in] ImageHandle    The firmware allocated handle for the EFI image.  \r
-  @param[in] SystemTable    A pointer to the EFI System Table.\r
-  \r
-  @retval EFI_SUCCESS       The entry point is executed successfully.\r
-  @retval other             Some error occurs when executing this entry point.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-InitializeFirmwareVolume2 (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-{\r
-  EfiCreateProtocolNotifyEvent (\r
-    &gEfiFirmwareVolume2ProtocolGuid,\r
-    TPL_CALLBACK,\r
-    FvNotificationEvent,\r
-    NULL,\r
-    &mFvRegistration\r
-    );\r
-  return EFI_SUCCESS;\r
-}\r
-\r
 /**\r
   Convert FV attrbiutes to FV2 attributes.\r
 \r
@@ -366,13 +60,12 @@ Fv2AttributesToFvAttributes (
 \r
 /**\r
   Retrieves attributes, insures positive polarity of attribute bits, returns\r
-  resulting attributes in output parameter\r
+  resulting attributes in output parameter.\r
 \r
   @param  This                  Calling context\r
   @param  Attributes            output buffer which contains attributes\r
 \r
-  @retval EFI_INVALID_PARAMETER\r
-  @retval EFI_SUCCESS\r
+  @retval EFI_SUCCESS           The firmware volume attributes were returned.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -400,14 +93,16 @@ FvGetVolumeAttributes (
 }\r
 \r
 /**\r
-  Sets volume attributes\r
+  Sets volume attributes.\r
 \r
   @param  This                  Calling context\r
   @param  Attributes            Buffer which contains attributes\r
 \r
-  @retval EFI_INVALID_PARAMETER\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_SUCCESS\r
+  @retval EFI_INVALID_PARAMETER A bit in Attributes was invalid\r
+  @retval EFI_SUCCESS           The requested firmware volume attributes were set \r
+                                and the resulting EFI_FV_ATTRIBUTES is returned in\r
+                                Attributes.\r
+  @retval EFI_ACCESS_DENIED     The Device is locked and does not permit modification. \r
 \r
 **/\r
 EFI_STATUS\r
@@ -457,11 +152,13 @@ FvSetVolumeAttributes (
   @param  FileAttributes        Indicates the attributes of the file who's data is resturned\r
   @param  AuthenticationStatus  Indicates the authentication status of the data\r
 \r
-  @retval EFI_SUCCESS\r
-  @retval EFI_WARN_BUFFER_TOO_SMALL\r
-  @retval EFI_NOT_FOUND\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_ACCESS_DENIED\r
+  @retval EFI_SUCCESS               The call completed successfully\r
+  @retval EFI_WARN_BUFFER_TOO_SMALL The buffer is too small to contain the requested output.\r
+                                    The buffer is filled and the output is truncated.\r
+  @retval EFI_NOT_FOUND             NameGuid was not found in the firmware volume.\r
+  @retval EFI_DEVICE_ERROR          A hardware error occurred when attempting to access the firmware volume.\r
+  @retval EFI_ACCESS_DENIED         The firmware volume is configured to disallow reads.\r
+  @retval EFI_OUT_OF_RESOURCES      An allocation failure occurred.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -522,12 +219,13 @@ FvReadFile (
                                 required to complete the read\r
   @param  AuthenticationStatus  Indicates the authentication status of the data\r
 \r
-  @retval EFI_SUCCESS\r
-  @retval EFI_WARN_BUFFER_TOO_SMALL\r
-  @retval EFI_OUT_OF_RESOURCES\r
-  @retval EFI_NOT_FOUND\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_ACCESS_DENIED\r
+  @retval EFI_SUCCESS                The call completed successfully.\r
+  @retval EFI_WARN_BUFFER_TOO_SMALL  The buffer is too small to contain the requested output. \r
+                                     The buffer is filled and the output is truncated.\r
+  @retval EFI_OUT_OF_RESOURCES       An allocation failure occurred.\r
+  @retval EFI_NOT_FOUND              Name was not found in the firmware volume.\r
+  @retval EFI_DEVICE_ERROR           A hardware error occurred when attempting to access the firmware volume.\r
+  @retval EFI_ACCESS_DENIED          The firmware volume is configured to disallow reads.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -570,12 +268,16 @@ FvReadSection (
                                 element in the array indicates a file to write, and there are\r
                                 NumberOfFiles elements in the input array.\r
 \r
-  @retval EFI_SUCCESS\r
-  @retval EFI_OUT_OF_RESOURCES\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_WRITE_PROTECTED\r
-  @retval EFI_NOT_FOUND\r
-  @retval EFI_INVALID_PARAMETER\r
+  @retval EFI_SUCCESS           The write completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  The firmware volume does not have enough free space to store file(s).\r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred when attempting to access the firmware volume.\r
+  @retval EFI_WRITE_PROTECTED   The firmware volume is configured to disallow writes.\r
+  @retval EFI_NOT_FOUND         A delete was requested, but the requested file was not \r
+                                found in the firmware volume.\r
+  @retval EFI_INVALID_PARAMETER A delete was requested with a multiple file write.\r
+                                An unsupported WritePolicy was requested.\r
+                                An unknown file type was specified.\r
+                                A file system specific error has occurred.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -629,10 +331,12 @@ FvWriteFile (
   @param  Attributes            Attributes of the file found\r
   @param  Size                  Size in bytes of the file found\r
 \r
-  @retval EFI_SUCCESS\r
-  @retval EFI_NOT_FOUND\r
-  @retval EFI_DEVICE_ERROR\r
-  @retval EFI_ACCESS_DENIED\r
+  @retval EFI_SUCCESS           The output parameters are filled with data obtained from \r
+                                the first matching file that was found.\r
+  @retval EFI_NOT_FOUND         No files of type FileType were found.\r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred when attempting to access \r
+                                the firmware volume.\r
+  @retval EFI_ACCESS_DENIED     The firmware volume is configured to disallow reads.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -669,3 +373,143 @@ FvGetNextFile (
   \r
   return Status;\r
 }\r
+\r
+//\r
+// Firmware Volume Protocol template\r
+//\r
+EFI_EVENT  mFvRegistration;\r
+\r
+FIRMWARE_VOLUME_PRIVATE_DATA gFirmwareVolumePrivateDataTemplate = {\r
+  FIRMWARE_VOLUME_PRIVATE_DATA_SIGNATURE,\r
+  {\r
+    FvGetVolumeAttributes,\r
+    FvSetVolumeAttributes,\r
+    FvReadFile,\r
+    FvReadSection,\r
+    FvWriteFile,\r
+    FvGetNextFile,\r
+    0,\r
+    NULL\r
+  },\r
+  NULL\r
+};\r
+\r
+//\r
+// Module globals\r
+//\r
+/**\r
+  This notification function is invoked when an instance of the\r
+  EFI_FIRMWARE_VOLUME2_PROTOCOL is produced. It installs another instance of the\r
+  EFI_FIRMWARE_VOLUME_PROTOCOL on the same handle.\r
+\r
+  @param  Event                 The event that occured\r
+  @param  Context               Context of event. Not used in this nofication function.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+FvNotificationEvent (\r
+  IN  EFI_EVENT       Event,\r
+  IN  VOID            *Context\r
+  )\r
+{\r
+  EFI_STATUS                    Status;\r
+  UINTN                         BufferSize;\r
+  EFI_HANDLE                    Handle;\r
+  FIRMWARE_VOLUME_PRIVATE_DATA  *Private;\r
+  EFI_FIRMWARE_VOLUME_PROTOCOL  *FirmwareVolume;\r
+\r
+  while (TRUE) {\r
+    BufferSize = sizeof (Handle);\r
+    Status = gBS->LocateHandle (\r
+                    ByRegisterNotify,\r
+                    &gEfiFirmwareVolume2ProtocolGuid,\r
+                    mFvRegistration,\r
+                    &BufferSize,\r
+                    &Handle\r
+                    );\r
+    if (EFI_ERROR (Status)) {\r
+      //\r
+      // Exit Path of While Loop....\r
+      //\r
+      break;\r
+    }\r
+\r
+    //\r
+    // Skip this handle if the Firmware Volume Protocol is already installed\r
+    //\r
+    Status = gBS->HandleProtocol (\r
+                    Handle,\r
+                    &gEfiFirmwareVolumeProtocolGuid,\r
+                    (VOID **)&FirmwareVolume\r
+                    );\r
+    if (!EFI_ERROR (Status)) {\r
+      continue;\r
+    }\r
+\r
+    //\r
+    // Allocate private data structure\r
+    //\r
+    Private = AllocateCopyPool (sizeof (FIRMWARE_VOLUME_PRIVATE_DATA), &gFirmwareVolumePrivateDataTemplate);\r
+    if (Private == NULL) {\r
+      continue;\r
+    }\r
+\r
+    //\r
+    // Retrieve the Firmware Volume2 Protocol\r
+    //\r
+    Status = gBS->HandleProtocol (\r
+                    Handle,\r
+                    &gEfiFirmwareVolume2ProtocolGuid,\r
+                    (VOID **)&Private->FirmwareVolume2\r
+                    );\r
+    ASSERT_EFI_ERROR (Status);\r
+\r
+    //\r
+    // Fill in rest of private data structure\r
+    //\r
+    Private->FirmwareVolume.KeySize      = Private->FirmwareVolume2->KeySize;\r
+    Private->FirmwareVolume.ParentHandle = Private->FirmwareVolume2->ParentHandle;\r
+\r
+    //\r
+    // Install Firmware Volume Protocol onto same handle\r
+    //\r
+    Status = gBS->InstallMultipleProtocolInterfaces (\r
+                    &Handle,\r
+                    &gEfiFirmwareVolumeProtocolGuid,\r
+                    &Private->FirmwareVolume,\r
+                    NULL\r
+                    );\r
+    ASSERT_EFI_ERROR (Status);\r
+  }\r
+}\r
+\r
+\r
+/**\r
+  The user Entry Point for DXE driver. The user code starts with this function\r
+  as the real entry point for the image goes into a library that calls this \r
+  function.\r
+\r
+  @param[in] ImageHandle    The firmware allocated handle for the EFI image.  \r
+  @param[in] SystemTable    A pointer to the EFI System Table.\r
+  \r
+  @retval EFI_SUCCESS       The entry point is executed successfully.\r
+  @retval other             Some error occurs when executing this entry point.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeFirmwareVolume2 (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  )\r
+{\r
+  EfiCreateProtocolNotifyEvent (\r
+    &gEfiFirmwareVolume2ProtocolGuid,\r
+    TPL_CALLBACK,\r
+    FvNotificationEvent,\r
+    NULL,\r
+    &mFvRegistration\r
+    );\r
+  return EFI_SUCCESS;\r
+}\r
index 20c37ec1c78f413b98f57b3cf001ed79f02c2b96..76deda869328a37b70b111222def298d78615adf 100644 (file)
@@ -65,12 +65,12 @@ typedef union {
 } SMMBASE_FUNCTION_ARGS;\r
 \r
 typedef enum {\r
-  SMMBASE_REGISTER,\r
-  SMMBASE_UNREGISTER,\r
-  SMMBASE_REGISTER_CALLBACK,\r
-  SMMBASE_ALLOCATE_POOL,\r
-  SMMBASE_FREE_POOL,\r
-  SMMBASE_COMMUNICATE,\r
+  SmmBaseFunctionRegister,\r
+  SmmBaseFunctionUnregister,\r
+  SmmBaseFunctionRegisterCallback,\r
+  SmmBaseFunctionAllocatePool,\r
+  SmmBaseFunctionFreePool,\r
+  SmmBaseFunctionCommunicate\r
 } SMMBASE_FUNCTION;\r
 \r
 typedef struct {\r
index 0595db776fd1f6e81440b8655cc8df5b7aa8b0ee..16a9d60b7455b673553924f6b8fab51cb0e772a1 100644 (file)
@@ -2,7 +2,7 @@
   Language Library implementation that provides functions for language conversion\r
   between ISO 639-2 and RFC 4646 language codes.\r
 \r
-  Copyright (c) 2009, Intel Corporation<BR>\r
+  Copyright (c) 2009 - 2010, 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
@@ -406,7 +406,7 @@ ConvertLanguagesIso639ToRfc4646 (
   // The length of ISO 639-2 lanugage codes string must be multiple of 3\r
   //\r
   Length = AsciiStrLen (Iso639Languages);\r
-  if (Length % 3) {\r
+  if (Length % 3 != 0) {\r
     return NULL;\r
   }\r
   \r
index 24196b1c862d67c8365af0a555f8119c1674a552..ddd81df5dcaee85b37453ab539c01f94974e97dc 100644 (file)
@@ -58,7 +58,7 @@ these two conditions are true:
 1) Framework module present that produces PCI CFG PPI  AND\r
 2) PI module that produces PCI CFG2 is not present\r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -139,25 +139,24 @@ PciCfg2Read (
 /**\r
   Write to a given location in the PCI configuration space.\r
 \r
-  @param  PeiServices                   An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+  @param  PeiServices           An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
 \r
-  @param  This                              Pointer to local data for the interface.\r
+  @param  This                  Pointer to local data for the interface.\r
 \r
-  @param  Width                            The width of the access. Enumerated in bytes.\r
-                                                    See EFI_PEI_PCI_CFG_PPI_WIDTH above.\r
+  @param  Width                 The width of the access. Enumerated in bytes.\r
+                                See EFI_PEI_PCI_CFG_PPI_WIDTH above.\r
 \r
-  @param  Address                         The physical address of the access. The format of\r
-                                                    the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS.\r
+  @param  Address               The physical address of the access. The format of\r
+                                the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS.\r
 \r
-  @param  Buffer                            A pointer to the buffer of data..\r
+  @param  Buffer                A pointer to the buffer of data..\r
 \r
 \r
-  @retval EFI_SUCCESS                   The function completed successfully.\r
+  @retval EFI_SUCCESS           The function completed successfully.\r
 \r
-  @retval EFI_DEVICE_ERROR          There was a problem with the transaction.\r
+  @retval EFI_DEVICE_ERROR      There was a problem with the transaction.\r
 \r
-  @retval EFI_DEVICE_NOT_READY  The device is not capable of supporting the operation at this\r
-                                                     time.\r
+  @retval EFI_DEVICE_NOT_READY  The device is not capable of supporting the operation at this time.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -236,18 +235,16 @@ EFI_PEI_PPI_DESCRIPTOR mPpiListPciCfg2 = {
 \r
   Standard PEIM entry point.\r
 \r
-  @param FfsHeadher   The FFS file header\r
-  @param PeiServices   General purpose services available to every PEIM.\r
-\r
+  @param FileHandle   Handle of the file being invoked.\r
+  @param PeiServices  General purpose services available to every PEIM.\r
 \r
-  @retval EFI_SUCCESS if the interface could be successfully\r
-                                    installed\r
+  @retval EFI_SUCCESS The interface could be successfully installed.\r
 \r
---*/\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeimInitializePciCfg2 (\r
-  IN EFI_PEI_FILE_HANDLE     FfsHeader,\r
+  IN EFI_PEI_FILE_HANDLE     FileHandle,\r
   IN CONST EFI_PEI_SERVICES  **PeiServices\r
   )\r
 {\r
index 592a571f13dbc8a53f95fcb19b021af64aa43978..3b7f0226d87c49d62a475ea4425f581267701218 100644 (file)
@@ -14,7 +14,7 @@ that produce PCI CFG2 can also produce PCI CFG by setting Pcd Feature Flag gEfiI
 to FALSE.\r
 \r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -160,18 +160,16 @@ EFI_PEI_PPI_DESCRIPTOR     mPpiListPciCfg = {
 \r
   Standard PEIM entry point.\r
 \r
-  @param FfsHeadher   The FFS file header\r
-  @param PeiServices   General purpose services available to every PEIM.\r
+  @param FileHandle   Handle of the file being invoked.\r
+  @param PeiServices  General purpose services available to every PEIM.\r
 \r
+  @retval EFI_SUCCESS The interface could be successfully installed.\r
 \r
-  @retval EFI_SUCCESS if the interface could be successfully\r
-                                    installed\r
-\r
---*/\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeimInitializePciCfg (\r
-  IN EFI_PEI_FILE_HANDLE     FfsHeader,\r
+  IN EFI_PEI_FILE_HANDLE     FileHandle,\r
   IN CONST EFI_PEI_SERVICES  **PeiServices\r
   )\r
 {\r
index 28097482ad7d57d296bc25ef1bfd767bcc10d8e6..a325807a9cd8fcca0d14d36629b011f37ff2be5c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The conversion table that guides the generation of the Smbios struture list.\r
   \r
-Copyright (c) 2009, Intel Corporation\r
+Copyright (c) 2009 - 2010, 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
@@ -396,8 +396,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorCoreFrequencyRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x16,\r
     SmbiosFldBase10ToWordWithMega\r
   },\r
@@ -409,8 +409,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorFsbFrequencyRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x12,\r
     SmbiosFldBase10ToWordWithMega\r
   },\r
@@ -422,8 +422,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorVersionRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x10,\r
     SmbiosFldString\r
   },\r
@@ -435,8 +435,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorManufacturerRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x7,\r
     SmbiosFldString\r
   },\r
@@ -448,8 +448,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorSerialNumberRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x20,\r
     SmbiosFldString\r
   },\r
@@ -461,8 +461,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorIdRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x08,\r
     SmbiosFldProcessorType6\r
   },\r
@@ -474,8 +474,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorTypeRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x05,\r
     SmbiosFldTruncateToByte\r
   },\r
@@ -487,8 +487,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorFamilyRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x06,\r
     SmbiosFldTruncateToByte\r
   },\r
@@ -500,8 +500,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorVoltageRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x11,\r
     SmbiosFldProcessorType9\r
   },\r
@@ -513,8 +513,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorStatusRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x18,\r
     SmbiosFldTruncateToByte\r
   },\r
@@ -526,8 +526,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorSocketTypeRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x19,\r
     SmbiosFldTruncateToByte\r
   },\r
@@ -539,8 +539,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorSocketNameRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x04,\r
     SmbiosFldString\r
   },\r
@@ -552,8 +552,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     CacheAssociationRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_WHOLE_DATA_RECORD,\r
+    BySubClassInstanceProducer,\r
+    ByFunctionWithWholeDataRecord,\r
     0,\r
     SmbiosFldProcessorType17\r
   },\r
@@ -565,8 +565,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorMaxCoreFrequencyRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x14,\r
     SmbiosFldBase10ToWordWithMega\r
   },\r
@@ -578,8 +578,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_PROCESSOR_SUBCLASS_GUID,\r
     ProcessorAssetTagRecordType,\r
     4,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x21,\r
     SmbiosFldString\r
   },\r
@@ -591,8 +591,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheSizeRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x09,\r
     SmbiosFldBase2ToWordWithKilo\r
   },\r
@@ -604,8 +604,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     MaximumSizeCacheRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x07,\r
     SmbiosFldBase2ToWordWithKilo\r
   },\r
@@ -617,8 +617,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheSpeedRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x0f,\r
     SmbiosFldBase10ToByteWithNano\r
   },\r
@@ -630,8 +630,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheSocketRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x04,\r
     SmbiosFldString\r
   },\r
@@ -643,8 +643,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheSramTypeRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x0b,\r
     SmbiosFldCacheType5  // Asynchronous and Synchronous are reversed\r
   },\r
@@ -656,8 +656,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheInstalledSramTypeRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x0d,\r
     SmbiosFldCacheType5\r
   },\r
@@ -669,8 +669,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheErrorTypeRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x10,\r
     SmbiosFldTruncateToByte\r
   },\r
@@ -682,8 +682,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheTypeRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x11,\r
     SmbiosFldTruncateToByte\r
   },\r
@@ -695,8 +695,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheAssociativityRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x12,\r
     SmbiosFldTruncateToByte\r
   },\r
@@ -708,8 +708,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_CACHE_SUBCLASS_GUID,\r
     CacheConfigRecordType,\r
     7,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunctionWithOffsetSpecified,\r
     0x05,\r
     SmbiosFldCacheType10\r
   },\r
@@ -721,8 +721,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_ARRAY_LOCATION_RECORD_NUMBER,\r
     16,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType2\r
   },\r
@@ -734,8 +734,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_ARRAY_LINK_RECORD_NUMBER,\r
     6,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldSMBIOSType6\r
   },\r
@@ -747,8 +747,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_ARRAY_LINK_RECORD_NUMBER,\r
     17,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType3\r
   },\r
@@ -760,8 +760,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER,\r
     19,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType4\r
   },\r
@@ -773,8 +773,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_DEVICE_START_ADDRESS_RECORD_NUMBER,\r
     20,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType5\r
   },\r
@@ -786,8 +786,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_CHANNEL_TYPE_RECORD_NUMBER,\r
     37,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType6\r
   },\r
@@ -799,8 +799,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_CHANNEL_DEVICE_RECORD_NUMBER,\r
     37,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType7\r
   },\r
@@ -812,8 +812,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_CONTROLLER_INFORMATION_RECORD_NUMBER,\r
     5,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType8\r
   },\r
@@ -825,8 +825,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_32BIT_ERROR_INFORMATION_RECORD_NUMBER,\r
     18,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType9\r
   },\r
@@ -838,8 +838,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MEMORY_SUBCLASS_GUID,\r
     EFI_MEMORY_64BIT_ERROR_INFORMATION_RECORD_NUMBER,\r
     33,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMemoryType10\r
   },\r
@@ -851,8 +851,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_BIOS_VENDOR_RECORD_NUMBER, // 0,\r
     0,                                  // smbios Type 0\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType0\r
   },\r
@@ -864,8 +864,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER, // 1,\r
     1,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType1\r
   },\r
@@ -877,8 +877,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_BASE_BOARD_MANUFACTURER_RECORD_NUMBER, // 2,\r
     2,  // SMBIOS Type 2\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType2\r
   },\r
@@ -890,8 +890,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_CHASSIS_MANUFACTURER_RECORD_NUMBER,  // 3,\r
     3,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType3\r
   },\r
@@ -903,8 +903,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_RECORD_NUMBER,  // 8,\r
     8,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType8\r
   },\r
@@ -916,8 +916,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_SYSTEM_SLOT_DESIGNATION_RECORD_NUMBER, // 9,\r
     9,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType9\r
   },\r
@@ -929,8 +929,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_ONBOARD_DEVICE_RECORD_NUMBER,  // 10,\r
     10,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType10\r
   },\r
@@ -942,8 +942,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_OEM_STRING_RECORD_NUMBER,  // 11,\r
     11,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType11\r
   },\r
@@ -955,8 +955,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_SYSTEM_OPTION_STRING_RECORD_NUMBER,  // 12,\r
     12,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType12\r
   },\r
@@ -968,8 +968,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_RECORD_NUMBER, // 13,\r
     13,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType13\r
   },\r
@@ -981,8 +981,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_SYSTEM_LANGUAGE_STRING_RECORD_NUMBER, // 13,\r
     13,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType14\r
   },\r
@@ -994,8 +994,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_SYSTEM_EVENT_LOG_RECORD_NUMBER, // 15,\r
     15,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType15\r
   },  \r
@@ -1007,8 +1007,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_POINTING_DEVICE_TYPE_RECORD_NUMBER,  // 21,\r
     21,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType21\r
   },\r
@@ -1020,8 +1020,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_PORTABLE_BATTERY_RECORD_NUMBER, // 22,\r
     22,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType22\r
   },  \r
@@ -1033,8 +1033,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_RESET_CAPABILITIES_RECORD_NUMBER,  // 23,\r
     23,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType23\r
   },\r
@@ -1046,8 +1046,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_HARDWARE_SECURITY_SETTINGS_DATA_RECORD_NUMBER,  // 24,\r
     24,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType24\r
   },\r
@@ -1059,8 +1059,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_SCHEDULED_POWER_ON_MONTH_RECORD_NUMBER,  // 25,\r
     25,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType25\r
   },\r
@@ -1072,8 +1072,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_VOLTAGE_PROBE_DESCRIPTION_RECORD_NUMBER,  // 26,\r
     26,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType26\r
   },\r
@@ -1085,8 +1085,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_COOLING_DEVICE_TEMP_LINK_RECORD_NUMBER,  // 27,\r
     27,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType27\r
   },\r
@@ -1098,8 +1098,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_TEMPERATURE_PROBE_DESCRIPTION_RECORD_NUMBER,  // 28,\r
     28,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType28\r
   },\r
@@ -1111,8 +1111,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_ELECTRICAL_CURRENT_PROBE_DESCRIPTION_RECORD_NUMBER,  // 29,\r
     29,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType29\r
   },\r
@@ -1124,8 +1124,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_REMOTE_ACCESS_MANUFACTURER_DESCRIPTION_RECORD_NUMBER,  // 30,\r
     30,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType30\r
   },\r
@@ -1137,8 +1137,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_BOOT_INFORMATION_STATUS_RECORD_NUMBER, // 32,\r
     32,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType32\r
   },\r
@@ -1150,8 +1150,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_MANAGEMENT_DEVICE_DESCRIPTION_RECORD_NUMBER, // 34,\r
     34,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType34\r
   },\r
@@ -1163,8 +1163,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_MANAGEMENT_DEVICE_THRESHOLD_RECORD_NUMBER, // 36,\r
     36,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType36\r
   },\r
@@ -1176,8 +1176,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_IPMI_INTERFACE_TYPE_RECORD_NUMBER, // 38,\r
     38,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType38\r
   },\r
@@ -1189,8 +1189,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_SYSTEM_POWER_SUPPLY_RECORD_NUMBER, // 39,\r
     39,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType39\r
   },\r
@@ -1202,8 +1202,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     EFI_MISC_SMBIOS_STRUCT_ENCAP_RECORD_NUMBER, // 0x80,\r
     0x80,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscTypeOEM\r
   },\r
@@ -1215,8 +1215,8 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
     EFI_MISC_SUBCLASS_GUID,\r
     127,\r
     127,\r
-    BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-    BY_FUNCTION,\r
+    BySubclassInstanceSubinstanceProducer,\r
+    ByFunction,\r
     0,\r
     SmbiosFldMiscType127\r
   },\r
index 2069fa962a5c5209fd1699133b574bd4a91e3446..44cec16453cb45564a01f44e1e190cb623402be5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The common header file for the thunk driver.\r
   \r
-Copyright (c) 2009 Intel Corporation. <BR>\r
+Copyright (c) 2009 - 2010, 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
@@ -41,17 +41,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 // Data Hub Data Records of certain SubClass and RecordNumber\r
 //\r
 typedef enum {\r
-  BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER,\r
-  BY_SUBCLASS_INSTANCE_PRODUCER,\r
-  MAX_LOCATING_METHOD\r
+  BySubclassInstanceSubinstanceProducer,\r
+  BySubClassInstanceProducer,\r
+  MaxLocatingMethod\r
 } SMBIOS_STRUCTURE_LOCATING_METHOD;\r
 \r
 typedef enum {\r
-  RECORD_DATA_UNCHANGED_OFFSET_SPECIFIED,\r
-  BY_FUNCTION_WITH_OFFSET_SPECIFIED,\r
-  BY_FUNCTION,\r
-  BY_FUNCTION_WITH_WHOLE_DATA_RECORD,\r
-  MAX_FIELD_FILLING_METHOD\r
+  RecordDataUnchangedOffsetSpecified,\r
+  ByFunctionWithOffsetSpecified,\r
+  ByFunction,\r
+  ByFunctionWithWholeDataRecord,\r
+  MaxFieldFillingMethod\r
 } SMBIOS_FIELD_FILLING_METHOD;\r
 \r
 typedef struct _SMBIOS_STRUCTURE_NODE SMBIOS_STRUCTURE_NODE;\r
@@ -229,8 +229,7 @@ SmbiosDataFilter (
 VOID\r
 SmbiosProcessDataRecord (\r
   IN EFI_DATA_RECORD_HEADER  *Record\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Calculate the minimal length for a SMBIOS type. This length maybe not equal\r
@@ -243,8 +242,7 @@ SmbiosProcessDataRecord (
 UINT32\r
 SmbiosGetTypeMinimalLength (\r
   IN UINT8  Type\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Enlarge the structure buffer of a structure node in SMBIOS database.\r
@@ -267,10 +265,10 @@ SmbiosEnlargeStructureBuffer (
   );\r
 \r
 /**\r
-  Field Filling Function. Fill a standard Smbios string field. \r
-  Convert the unicode string to single byte chars.\r
-  Only English language is supported.\r
-\r
+  Fill a standard Smbios string field. \r
+  \r
+  This function will convert the unicode string to single byte chars, and only\r
+  English language is supported.\r
   This function changes the Structure pointer value of the structure node, \r
   which should be noted by Caller.\r
   \r
@@ -289,8 +287,7 @@ SmbiosFldString (
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Fill the inter link field for a SMBIOS recorder.\r
@@ -315,8 +312,7 @@ SmbiosFldInterLink (
   IN      UINT8                     LinkSmbiosType,\r
   IN      EFI_INTER_LINK_DATA       *InterLink,\r
   IN      EFI_GUID                  *SubClassGuid\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Find a handle that matches the Link Data and the target Smbios type.\r
@@ -335,323 +331,675 @@ SmbiosFindHandle (
   IN      EFI_GUID            *SubClass,\r
   IN      EFI_INTER_LINK_DATA *LinkData,\r
   IN OUT  UINT16              *HandleNum\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function. Transform an EFI_EXP_BASE10_DATA to a word, with 'Mega'\r
+  as the unit.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_INVALID_PARAMETER  RecordDataSize is invalid. \r
+  @retval EFI_SUCCESS            RecordData is successed to be filled into given SMBIOS record.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldBase10ToWordWithMega (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a word, with 'Kilo'\r
+  as the unit. Granularity implemented for Cache Size.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_INVALID_PARAMETER  RecordDataSize is invalid. \r
+  @retval EFI_SUCCESS            RecordData is successed to be filled into given SMBIOS record.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldBase2ToWordWithKilo (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function: truncate record data to byte and fill in the\r
+  field as indicated by Offset.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_INVALID_PARAMETER  RecordDataSize is invalid. \r
+  @retval EFI_SUCCESS            RecordData is successed to be filled into given SMBIOS record.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldTruncateToByte (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Processor SubClass record type 6 -- ProcessorID.\r
+  Offset is mandatory.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldProcessorType6 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Processor SubClass record type 9 -- Voltage.\r
+  Offset is mandatory.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldProcessorType9 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Processor SubClass record type 17 -- Cache association.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldProcessorType17 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a word, with 10exp-9\r
+  as the unit.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_INVALID_PARAMETER  RecordDataSize is invalid. \r
+  @retval EFI_SUCCESS            RecordData is successed to be filled into given SMBIOS record.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldBase10ToByteWithNano (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function: truncate record data to byte and fill in the\r
+  field as indicated by Offset.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_INVALID_PARAMETER  RecordDataSize is invalid. \r
+  @retval EFI_SUCCESS            RecordData is successed to be filled into given SMBIOS record.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldTruncateToWord (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
+\r
+/**\r
+  Field Filling Function for Cache SubClass record type 10 -- Cache Config.\r
+  Offset is mandatory\r
 \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldCacheType10 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Check if OEM structure has included 2 trailing 0s in data record.\r
+  \r
+  @param RecordData       Point to record data will be checked.\r
+  @param RecordDataSize   The size of record data.\r
+  \r
+  @retval 0    2 trailing 0s exist in unformatted section\r
+  @retval 1    1 trailing 0 exists at the end of unformatted section\r
+  @retval -1   There is no 0 at the end of unformatted section\r
+**/\r
 INT8\r
 SmbiosCheckTrailingZero (\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Cache SubClass record type 5&6 -- Cache SRAM type.\r
+  Offset is mandatory\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldCacheType5 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type 2 -- Physical Memory\r
+  Array.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType2 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type 3 -\r
+  - Memory Device: SMBIOS Type 17\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType3 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type 4\r
+  -- Memory Array Mapped Address: SMBIOS Type 19\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType4 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type 5\r
+  -- Memory Device Mapped Address: SMBIOS Type 20\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType5 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type 6\r
+  -- Memory Channel Type: SMBIOS Type 37\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType6 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type 7\r
+  -- Memory Channel Device: SMBIOS Type 37\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType7 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type 8\r
+  -- Memory Controller information: SMBIOS Type 5\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType8 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type \r
+  -- Memory 32 Bit Error Information: SMBIOS Type 18\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType9 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type \r
+  -- Memory 64 Bit Error Information: SMBIOS Type 33\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMemoryType10 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 0 -- Bios Information.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType0 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a byte, with '64k'\r
+  as the unit.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_INVALID_PARAMETER  RecordDataSize is invalid. \r
+  @retval EFI_SUCCESS            RecordData is successed to be filled into given SMBIOS record.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldBase2ToByteWith64K (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 1 -- System Information.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType1 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for record type 2 -- Base Board Manufacture.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType2 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 3 -\r
+  - System Enclosure or Chassis.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType3 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 8 -- Port Connector.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType8 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 9 -- System slot.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType9 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 10 - Onboard Device.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType10 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 11 - OEM Strings.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType11 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 12 - System Options.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType12 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 13 - BIOS Language.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType13 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 14 - System Language String\r
+  Current solution assumes that EFI_MISC_SYSTEM_LANGUAGE_STRINGs are logged with\r
+  their LanguageId having ascending orders.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType14 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 15 -- System Event Log.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType15 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 21 - Pointing Device.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType21 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 32 -- System Boot Information.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType32 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 38 -- IPMI device info.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType38 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
@@ -660,170 +1008,349 @@ SmbiosFldMiscType38 (
   IN      UINT32                    RecordDataSize\r
   );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 0x80-0xFF -- OEM.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscTypeOEM (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Memory SubClass record type 3 -\r
+  - Memory Device: SMBIOS Type 6\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldSMBIOSType6 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
-  IN      UINT32                    Offset, \r
+  IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 22 - Portable Battery.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType22 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 22 - Portable Battery.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType22 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 23 - System Reset.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType23 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 24 - Hardware Security.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType24 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 25 - System Power Controls.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType25 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 26 - Voltage Probe.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType26 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 27 - Cooling Device.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType27 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 28 -- Temperature Probe.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType28 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 29 -- Electrical Current Probe.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType29 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 30 -- Out-of-Band Remote Access.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType30 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 34 -- Management Device.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType34 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 36 -- Management Device Threshold.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType36 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 38 -- IPMI device info.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType38 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 39 -- Power supply.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType39 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
 \r
+/**\r
+  Field Filling Function for Misc SubClass record type 127 - End-of-Table.\r
+  \r
+  @param StructureNode    Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
+  @param Offset           Offset of SMBIOS record which RecordData will be filled.\r
+  @param RecordData       RecordData buffer will be filled.\r
+  @param RecordDataSize   The size of RecordData buffer.\r
+  \r
+  @retval EFI_SUCCESS   Success fill RecordData into SMBIOS's record buffer.\r
+**/\r
 EFI_STATUS\r
 SmbiosFldMiscType127 (\r
   IN OUT  SMBIOS_STRUCTURE_NODE     *StructureNode,\r
   IN      UINT32                    Offset,\r
   IN      VOID                      *RecordData,\r
   IN      UINT32                    RecordDataSize\r
-  )\r
-;\r
+  );\r
     \r
+/**\r
+  Create a blank smbios record. The datahub record is only a field of smbios record.\r
+  So before fill any field from datahub's record. A blank smbios record need to be \r
+  created.\r
+  \r
+  @param ProducerHandle   The produce handle for a datahub record\r
+  @param StructureNode    Point to SMBIOS_STRUCTURE_NODE\r
+  \r
+  @retval EFI_OUT_OF_RESOURCES Fail to allocate memory for new blank SMBIOS record.\r
+  @retval EFI_SUCCESS          Success to create blank smbios record.\r
+**/\r
 EFI_STATUS\r
 SmbiosProtocolCreateRecord (\r
   IN      EFI_HANDLE              ProducerHandle, OPTIONAL\r
   IN      SMBIOS_STRUCTURE_NODE   *StructureNode\r
   );\r
   \r
+/**\r
+  Get pointer of EFI_SMBIOS_PROTOCOL.\r
+  \r
+  @return pointer of EFI_SMBIOS_PROTOCOL.\r
+**/\r
 EFI_SMBIOS_PROTOCOL*\r
 GetSmbiosProtocol (\r
   VOID\r
   );\r
     \r
+/**\r
+  Get pointer of a SMBIOS record's buffer according to its handle.\r
+  \r
+  @param Handle         The handle of SMBIOS record want to be searched.\r
+  @param Type           The type of SMBIOS record want to be searched.\r
+  @param ProducerHandle The producer handle of SMBIOS record.\r
+  \r
+  @return EFI_SMBIOS_TABLE_HEADER Point to a SMBIOS record's buffer.\r
+**/  \r
 EFI_SMBIOS_TABLE_HEADER*\r
 GetSmbiosBufferFromHandle (\r
   IN  EFI_SMBIOS_HANDLE  Handle,\r
@@ -831,6 +1358,18 @@ GetSmbiosBufferFromHandle (
   IN  EFI_HANDLE         ProducerHandle  OPTIONAL\r
   );\r
           \r
+/**\r
+\r
+  Get the full size of smbios structure including optional strings that follow the formatted structure.\r
+\r
+  @param Head                   Pointer to the beginning of smbios structure.\r
+  @param Size                   The returned size.\r
+  @param NumberOfStrings        The returned number of optional strings that follow the formatted structure.\r
+\r
+  @retval EFI_SUCCESS           Size retured in Size.\r
+  @retval EFI_INVALID_PARAMETER Input smbios structure mal-formed or Size is NULL.\r
+  \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetSmbiosStructureSize (\r
index ad41ec0783592ac6f7d709c533384134934bd849..65e4407488f1a06e9ef38937a0f98636250abbb3 100644 (file)
@@ -2,7 +2,7 @@
   Translate the DataHub records via EFI_DATA_HUB_PROTOCOL to Smbios recorders \r
   via EFI_SMBIOS_PROTOCOL.\r
   \r
-Copyright (c) 2009, Intel Corporation\r
+Copyright (c) 2009 - 2010, 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
@@ -117,7 +117,7 @@ SmbiosProcessDataRecord (
                         SMBIOS_STRUCTURE_NODE_SIGNATURE\r
                         );\r
 \r
-      if (Conversion->StructureLocatingMethod == BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER) {\r
+      if (Conversion->StructureLocatingMethod == BySubclassInstanceSubinstanceProducer) {\r
         //\r
         // Look at SubClass, Instance, SubInstance and ProducerName for a matching\r
         // node\r
@@ -136,7 +136,7 @@ SmbiosProcessDataRecord (
           }\r
         }\r
 \r
-      } else if (Conversion->StructureLocatingMethod == BY_SUBCLASS_INSTANCE_PRODUCER) {\r
+      } else if (Conversion->StructureLocatingMethod == BySubClassInstanceProducer) {\r
         //\r
         // Look at SubClass, Instance and ProducerName for a matching node\r
         //\r
@@ -172,7 +172,7 @@ SmbiosProcessDataRecord (
         goto Done;\r
       }\r
 \r
-      if (Conversion->StructureLocatingMethod == BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER) {\r
+      if (Conversion->StructureLocatingMethod == BySubclassInstanceSubinstanceProducer) {\r
         //\r
         // Fill in SubClass, Instance, SubInstance and ProducerName\r
         //\r
@@ -181,7 +181,7 @@ SmbiosProcessDataRecord (
         StructureNode->SubInstance  = DataHeader->SubInstance;\r
         CopyMem (&(StructureNode->ProducerName), &(RecordHeader->ProducerName), sizeof (EFI_GUID));\r
 \r
-      } else if (Conversion->StructureLocatingMethod == BY_SUBCLASS_INSTANCE_PRODUCER) {\r
+      } else if (Conversion->StructureLocatingMethod == BySubClassInstanceProducer) {\r
         //\r
         // Fill in at SubClass, Instance and ProducerName, mark SubInstance as Non\r
         // Applicable\r
@@ -244,7 +244,7 @@ SmbiosProcessDataRecord (
     //\r
     // Fill the Structure's field corresponding to this data record\r
     //\r
-    if (Conversion->FieldFillingMethod == RECORD_DATA_UNCHANGED_OFFSET_SPECIFIED) {\r
+    if (Conversion->FieldFillingMethod == RecordDataUnchangedOffsetSpecified) {\r
       //\r
       // Field data is just the record data without transforming and\r
       // offset is specified directly in the conversion table entry\r
@@ -262,7 +262,7 @@ SmbiosProcessDataRecord (
       \r
       CopyMem ((UINT8 *) (StructureNode->Structure) + Conversion->FieldOffset, SrcData, SrcDataSize);\r
 \r
-    } else if (Conversion->FieldFillingMethod == BY_FUNCTION_WITH_OFFSET_SPECIFIED) {\r
+    } else if (Conversion->FieldFillingMethod == ByFunctionWithOffsetSpecified) {\r
       //\r
       // Field offfset is specified in the conversion table entry, but\r
       // record data needs to be transformed to be filled into the field,\r
@@ -292,7 +292,7 @@ SmbiosProcessDataRecord (
 \r
         goto Done;\r
       }\r
-    } else if (Conversion->FieldFillingMethod == BY_FUNCTION) {\r
+    } else if (Conversion->FieldFillingMethod == ByFunction) {\r
       //\r
       // Both field offset and field content are determined by\r
       // FieldFillingFunction\r
@@ -321,7 +321,7 @@ SmbiosProcessDataRecord (
 \r
         goto Done;\r
       }\r
-    } else if (Conversion->FieldFillingMethod == BY_FUNCTION_WITH_WHOLE_DATA_RECORD) {\r
+    } else if (Conversion->FieldFillingMethod == ByFunctionWithWholeDataRecord) {\r
       //\r
       // Both field offset and field content are determined by\r
       // FieldFillingFunction and the function accepts the whole data record\r
index adeddbc00e1ebb90ea5229a556f045dc158d0e37..16a39eb1222345e89e4616a8b1672a6699506924 100644 (file)
@@ -11,7 +11,7 @@ This module is used on platform when both of these two conditions are true:
 This module can't be used together with ReadOnlyVariableToReadOnlyVariable2Thunk module.\r
 \r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -30,87 +30,17 @@ Module Name:
 #include <Library/PeiServicesTablePointerLib.h>\r
 #include <Library/PeiServicesLib.h>\r
 \r
-//\r
-// Function Prototypes\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-PeiGetVariable (\r
-  IN CONST  EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,\r
-  IN CONST  CHAR16                          *VariableName,\r
-  IN CONST  EFI_GUID                        *VariableGuid,\r
-  OUT       UINT32                          *Attributes,\r
-  IN OUT    UINTN                           *DataSize,\r
-  OUT       VOID                            *Data\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PeiGetNextVariableName (\r
-  IN CONST  EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,\r
-  IN OUT UINTN                              *VariableNameSize,\r
-  IN OUT CHAR16                             *VariableName,\r
-  IN OUT EFI_GUID                           *VariableGuid\r
-  );\r
-\r
-//\r
-// Module globals\r
-//\r
-EFI_PEI_READ_ONLY_VARIABLE2_PPI mVariablePpi = {\r
-  PeiGetVariable,\r
-  PeiGetNextVariableName\r
-};\r
-\r
-EFI_PEI_PPI_DESCRIPTOR     mPpiListVariable = {\r
-  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
-  &gEfiPeiReadOnlyVariable2PpiGuid,\r
-  &mVariablePpi\r
-};\r
-\r
-\r
-/**\r
-  User entry for this PEIM driver.\r
-  \r
-  @param  FileHandle  Handle of the file being invoked.\r
-  @param  PeiServices Describes the list of possible PEI Services.\r
-\r
-  @retval EFI_SUCCESS ReadOnlyVariable2 PPI is successfully installed.\r
-  @return Others      ReadOnlyVariable2 PPI is not successfully installed.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-PeimInitializeReadOnlyVariable2 (\r
-  IN EFI_PEI_FILE_HANDLE       FfsHeader,\r
-  IN CONST EFI_PEI_SERVICES    **PeiServices\r
-  )\r
-{\r
-  //\r
-  // This thunk module can only be used together with a PI PEI core, as we \r
-  // assume PeiServices Pointer Table can be located in a standard way defined\r
-  // in PI spec.\r
-  //\r
-  ASSERT ((*PeiServices)->Hdr.Revision >= 0x00010000);\r
-\r
-  //\r
-  // Developer should make sure ReadOnlyVariable2ToReadOnlyVariable module is not present. or else, the call chain will form a\r
-  // infinite loop: ReadOnlyVariable2 -> ReadOnlyVariable -> ReadOnlyVariable2 -> .....\r
-  //\r
-  //\r
-  // Publish the variable capability to other modules\r
-  //\r
-  return PeiServicesInstallPpi (&mPpiListVariable);\r
-}\r
-\r
 /**\r
   Provide the read variable functionality of the variable services.\r
 \r
-  @param  PeiServices           General purpose services available to every PEIM.\r
-  @param  VariableName          The variable name\r
-  @param  VendorGuid            The vendor's GUID\r
-  @param  Attributes            Pointer to the attribute\r
-  @param  DataSize              Size of data\r
-  @param  Data                  Pointer to data\r
+  @param  This                  A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.\r
+  @param  VariableName          A pointer to a null-terminated string that is the variable's name.\r
+  @param  VariableGuid          A pointer to an EFI_GUID that is the variable's GUID. The combination of\r
+                                VariableGuid and VariableName must be unique.\r
+  @param  Attributes            If non-NULL, on return, points to the variable's attributes.\r
+  @param  DataSize              On entry, points to the size in bytes of the Data buffer.\r
+                                On return, points to the size of the data returned in Data.\r
+  @param  Data                  Points to the buffer which will hold the returned variable value.\r
 \r
   @retval EFI_SUCCESS           The interface could be successfully installed\r
   @retval EFI_NOT_FOUND         The variable could not be discovered\r
@@ -152,16 +82,17 @@ PeiGetVariable (
 /**\r
   Provide the get next variable functionality of the variable services.\r
 \r
-  @param  PeiServices           General purpose services available to every PEIM.\r
-  @param  VariabvleNameSize     The variable name's size.\r
-  @param  VariableName          A pointer to the variable's name.\r
-  @param  VariableGuid          A pointer to the EFI_GUID structure.\r
-  @param  VariableNameSize      Size of the variable name\r
-  @param  VariableName          The variable name\r
-  @param  VendorGuid            The vendor's GUID\r
+  @param  This              A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.\r
 \r
-  @retval EFI_SUCCESS           The interface could be successfully installed\r
-  @retval EFI_NOT_FOUND         The variable could not be discovered\r
+  @param  VariableNameSize  On entry, points to the size of the buffer pointed to by VariableName.\r
+  @param  VariableName      On entry, a pointer to a null-terminated string that is the variable's name.\r
+                            On return, points to the next variable's null-terminated name string.\r
+\r
+  @param  VariableGuid      On entry, a pointer to an EFI_GUID that is the variable's GUID. \r
+                            On return, a pointer to the next variable's GUID.\r
+\r
+  @retval EFI_SUCCESS       The interface could be successfully installed\r
+  @retval EFI_NOT_FOUND     The variable could not be discovered\r
 \r
 **/\r
 EFI_STATUS\r
@@ -191,3 +122,51 @@ PeiGetNextVariableName (
                              VariableGuid\r
                              );\r
 }\r
+\r
+//\r
+// Module globals\r
+//\r
+EFI_PEI_READ_ONLY_VARIABLE2_PPI mVariablePpi = {\r
+  PeiGetVariable,\r
+  PeiGetNextVariableName\r
+};\r
+\r
+EFI_PEI_PPI_DESCRIPTOR     mPpiListVariable = {\r
+  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
+  &gEfiPeiReadOnlyVariable2PpiGuid,\r
+  &mVariablePpi\r
+};\r
+\r
+/**\r
+  User entry for this PEIM driver.\r
+  \r
+  @param  FileHandle  Handle of the file being invoked.\r
+  @param  PeiServices Describes the list of possible PEI Services.\r
+\r
+  @retval EFI_SUCCESS ReadOnlyVariable2 PPI is successfully installed.\r
+  @return Others      ReadOnlyVariable2 PPI is not successfully installed.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeimInitializeReadOnlyVariable2 (\r
+  IN EFI_PEI_FILE_HANDLE       FileHandle,\r
+  IN CONST EFI_PEI_SERVICES    **PeiServices\r
+  )\r
+{\r
+  //\r
+  // This thunk module can only be used together with a PI PEI core, as we \r
+  // assume PeiServices Pointer Table can be located in a standard way defined\r
+  // in PI spec.\r
+  //\r
+  ASSERT ((*PeiServices)->Hdr.Revision >= 0x00010000);\r
+\r
+  //\r
+  // Developer should make sure ReadOnlyVariable2ToReadOnlyVariable module is not present. or else, the call chain will form a\r
+  // infinite loop: ReadOnlyVariable2 -> ReadOnlyVariable -> ReadOnlyVariable2 -> .....\r
+  //\r
+  //\r
+  // Publish the variable capability to other modules\r
+  //\r
+  return PeiServicesInstallPpi (&mPpiListVariable);\r
+}\r
index 3eaa929c7c7dd9194b99b59ef65afd0b388b7edc..6ee3c55ab58d9d2112b3564979156f8d38840dac 100644 (file)
@@ -10,7 +10,7 @@ UEFI PI Spec supersedes Intel's Framework Specs.
 \r
 This module can't be used together with ReadOnlyVariable2ToReadOnlyVariableThunk module.\r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -28,80 +28,18 @@ Module Name:
 #include <Library/DebugLib.h>\r
 #include <Library/PeiServicesLib.h>\r
 \r
-//\r
-// Function Prototypes\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-PeiGetVariable (\r
-  IN  EFI_PEI_SERVICES  **PeiServices,\r
-  IN  CHAR16            *VariableName,\r
-  IN  EFI_GUID          *VendorGuid,\r
-  OUT UINT32            *Attributes OPTIONAL,\r
-  IN  OUT UINTN         *DataSize,\r
-  OUT VOID              *Data\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PeiGetNextVariableName (\r
-  IN EFI_PEI_SERVICES  **PeiServices,\r
-  IN OUT UINTN         *VariableNameSize,\r
-  IN OUT CHAR16        *VariableName,\r
-  IN OUT EFI_GUID      *VendorGuid\r
-  );\r
-\r
-//\r
-// Module globals\r
-//\r
-EFI_PEI_READ_ONLY_VARIABLE_PPI mVariablePpi = {\r
-  PeiGetVariable,\r
-  PeiGetNextVariableName\r
-};\r
-\r
-EFI_PEI_PPI_DESCRIPTOR     mPpiListVariable = {\r
-  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
-  &gEfiPeiReadOnlyVariablePpiGuid,\r
-  &mVariablePpi\r
-};\r
-\r
-\r
-\r
-/**\r
-  Standard entry point of a PEIM.\r
-\r
-  @param FfsHeadher  The FFS file header\r
-  @param PeiServices  General purpose services available to every PEIM.\r
-\r
-  @retval EFI_SUCCESS If the gEfiPeiReadOnlyVariablePpiGuid interface could be successfully installed.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-PeimInitializeReadOnlyVariable (\r
-  IN EFI_PEI_FILE_HANDLE     FfsHeader,\r
-  IN CONST EFI_PEI_SERVICES  **PeiServices\r
-  )\r
-{\r
-  //\r
-  //Developer should make sure ReadOnlyVariableToReadOnlyVariable2 module is not present. If so, the call chain will form a\r
-  // infinite loop: ReadOnlyVariable -> ReadOnlyVariable2 -> ReadOnlyVariable -> ....\r
-  //\r
-  //\r
-  // Publish the variable capability to other modules\r
-  //\r
-  return (*PeiServices)->InstallPpi (PeiServices, &mPpiListVariable);\r
-}\r
-\r
 /**\r
   Provide the read variable functionality of the variable services.\r
 \r
-  @param  PeiServices           General purpose services available to every PEIM.\r
-  @param  VariableName          The variable name\r
-  @param  VendorGuid            The vendor's GUID\r
-  @param  Attributes            Pointer to the attribute\r
-  @param  DataSize              Size of data\r
-  @param  Data                  Pointer to data\r
+  @param[in]  PeiServices    An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+  @param[in]  VariableName   A NULL-terminated Unicode string that is the name of the vendor's variable.\r
+  @param[in]  VendorGuid     A unique identifier for the vendor.\r
+  @param[out] Attributes     This OPTIONAL parameter may be either NULL or\r
+                             a pointer to the location in which to return\r
+                             the attributes bitmask for the variable.\r
+  @param[in, out]  DataSize   On input, the size in bytes of the return Data buffer.\r
+                             On output, the size of data returned in Data.\r
+  @param[out] Data           The buffer to return the contents of the variable.\r
 \r
   @retval EFI_SUCCESS           The interface could be successfully installed\r
   @retval EFI_NOT_FOUND         The variable could not be discovered\r
@@ -144,13 +82,14 @@ PeiGetVariable (
 /**\r
   Provide the get next variable functionality of the variable services.\r
 \r
-  @param  PeiServices           General purpose services available to every PEIM.\r
-  @param  VariabvleNameSize     The variable name's size.\r
-  @param  VariableName          A pointer to the variable's name.\r
-  @param  VariableGuid          A pointer to the EFI_GUID structure.\r
-  @param  VariableNameSize      Size of the variable name\r
-  @param  VariableName          The variable name\r
-  @param  VendorGuid            The vendor's GUID\r
+  @param[in]     PeiServices       An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+  @param[in, out] VariableNameSize  The size of the VariableName buffer.\r
+  @param[in, out] VariableName      On input, supplies the last VariableName that was\r
+                                   returned by GetNextVariableName(). On output, returns the Null-terminated\r
+                                   Unicode string of the current variable.\r
+  @param[in, out] VendorGuid        On input, supplies the last VendorGuid that was\r
+                                   returned by GetNextVariableName(). On output, returns the VendorGuid\r
+                                   of the current variable.\r
 \r
   @retval EFI_SUCCESS           The interface could be successfully installed\r
   @retval EFI_NOT_FOUND         The variable could not be discovered\r
@@ -184,3 +123,43 @@ PeiGetNextVariableName (
                               VendorGuid\r
                               );\r
 }\r
+\r
+//\r
+// Module globals\r
+//\r
+EFI_PEI_READ_ONLY_VARIABLE_PPI mVariablePpi = {\r
+  PeiGetVariable,\r
+  PeiGetNextVariableName\r
+};\r
+\r
+EFI_PEI_PPI_DESCRIPTOR     mPpiListVariable = {\r
+  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
+  &gEfiPeiReadOnlyVariablePpiGuid,\r
+  &mVariablePpi\r
+};\r
+\r
+/**\r
+  Standard entry point of a PEIM.\r
+\r
+  @param FileHandle   Handle of the file being invoked.\r
+  @param PeiServices  General purpose services available to every PEIM.\r
+\r
+  @retval EFI_SUCCESS If the gEfiPeiReadOnlyVariablePpiGuid interface could be successfully installed.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeimInitializeReadOnlyVariable (\r
+  IN EFI_PEI_FILE_HANDLE     FileHandle,\r
+  IN CONST EFI_PEI_SERVICES  **PeiServices\r
+  )\r
+{\r
+  //\r
+  //Developer should make sure ReadOnlyVariableToReadOnlyVariable2 module is not present. If so, the call chain will form a\r
+  // infinite loop: ReadOnlyVariable -> ReadOnlyVariable2 -> ReadOnlyVariable -> ....\r
+  //\r
+  //\r
+  // Publish the variable capability to other modules\r
+  //\r
+  return (*PeiServices)->InstallPpi (PeiServices, &mPpiListVariable);\r
+}\r
index 97df22c24a6606caaa72038af284f7eff2ec4241..8e1159505838184f952f26f94b6d05221f6e5628 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   SMM Access2 Protocol on SMM Access Protocol Thunk driver.\r
 \r
-  Copyright (c) 2009 Intel Corporation\r
+  Copyright (c) 2009 - 2010, 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
@@ -68,7 +68,7 @@ SmmAccess2Open (
   This function "closes" SMRAM so that it is not visible while outside of SMM. The function should \r
   return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM.\r
 \r
-  @param[in] This           The EFI_SMM_ACCESS2_PROTOCOL instance.\r
+  @param [in] This           The EFI_SMM_ACCESS2_PROTOCOL instance.\r
 \r
   @retval EFI_SUCCESS       The operation was successful.\r
   @retval EFI_UNSUPPORTED   The system does not support opening and closing of SMRAM.\r
@@ -135,8 +135,8 @@ SmmAccess2Lock (
   Queries the memory controller for the possible regions that will support SMRAM.\r
 \r
   @param[in]     This           The EFI_SMM_ACCESS2_PROTOCOL instance.\r
-  @param[in,out] SmramMapSize   A pointer to the size, in bytes, of the SmramMemoryMap buffer.\r
-  @param[in,out] SmramMap       A pointer to the buffer in which firmware places the current memory map.\r
+  @param[in, out] SmramMapSize   A pointer to the size, in bytes, of the SmramMemoryMap buffer.\r
+  @param[in, out] SmramMap       A pointer to the buffer in which firmware places the current memory map.\r
 \r
   @retval EFI_SUCCESS           The chipset supported the given resource.\r
   @retval EFI_BUFFER_TOO_SMALL  The SmramMap parameter was too small.  The current buffer size \r
index bc3415903af687339028717b05d7d589f3f3aca3..d53447b9e21f271184906d8cedb29dab813d288a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Include file for SMM Access2 Protocol on SMM Access Protocol Thunk driver.\r
   \r
-  Copyright (c) 2009, Intel Corporation\r
+  Copyright (c) 2009 - 2010, 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
@@ -81,8 +81,8 @@ SmmAccess2Lock (
   Queries the memory controller for the possible regions that will support SMRAM.\r
 \r
   @param[in]     This           The EFI_SMM_ACCESS2_PROTOCOL instance.\r
-  @param[in,out] SmramMapSize   A pointer to the size, in bytes, of the SmramMemoryMap buffer.\r
-  @param[in,out] SmramMap       A pointer to the buffer in which firmware places the current memory map.\r
+  @param[in, out] SmramMapSize   A pointer to the size, in bytes, of the SmramMemoryMap buffer.\r
+  @param[in, out] SmramMap       A pointer to the buffer in which firmware places the current memory map.\r
 \r
   @retval EFI_SUCCESS           The chipset supported the given resource.\r
   @retval EFI_BUFFER_TOO_SMALL  The SmramMap parameter was too small.  The current buffer size \r
index 2a4437b13450c028ea766db1e4b519e1f4b3ed44..3d344c7bcb6669d9581df2e8ef4f6cb1f7a9b15c 100644 (file)
@@ -406,9 +406,9 @@ GetCallbackInfo (
   @param[in]     DispatchHandle  The unique handle assigned to this handler by SmiHandlerRegister().\r
   @param[in]     Context         Points to an optional handler context which was specified when the\r
                                  handler was registered.\r
-  @param[in,out] CommBuffer      A pointer to a collection of data in memory that will\r
+  @param[in, out] CommBuffer      A pointer to a collection of data in memory that will\r
                                  be conveyed from a non-SMM environment into an SMM environment.\r
-  @param[in,out] CommBufferSize  The size of the CommBuffer.\r
+  @param[in, out] CommBufferSize  The size of the CommBuffer.\r
 \r
   @retval EFI_SUCCESS                         The interrupt was handled and quiesced. No other handlers \r
                                               should still be called.\r
@@ -651,11 +651,11 @@ HelperCommunicate (
   This SMI handler provides services for the SMM Base Thunk driver.\r
 \r
   @param[in]     DispatchHandle  The unique handle assigned to this handler by SmiHandlerRegister().\r
-  @param[in]     Context         Points to an optional handler context which was specified when the\r
+  @param[in]     RegisterContext Points to an optional handler context which was specified when the\r
                                  handler was registered.\r
-  @param[in,out] CommBuffer      A pointer to a collection of data in memory that will\r
+  @param[in, out] CommBuffer      A pointer to a collection of data in memory that will\r
                                  be conveyed from a non-SMM environment into an SMM environment.\r
-  @param[in,out] CommBufferSize  The size of the CommBuffer.\r
+  @param[in, out] CommBufferSize  The size of the CommBuffer.\r
 \r
   @retval EFI_SUCCESS                         The interrupt was handled and quiesced. No other handlers \r
                                               should still be called.\r
@@ -682,22 +682,22 @@ SmmHandlerEntry (
   FunctionData = (SMMBASE_FUNCTION_DATA *)CommBuffer;\r
 \r
   switch (FunctionData->Function) {\r
-    case SMMBASE_REGISTER:\r
+    case SmmBaseFunctionRegister:\r
       Register (FunctionData);\r
       break;\r
-    case SMMBASE_UNREGISTER:\r
+    case SmmBaseFunctionUnregister:\r
       UnRegister (FunctionData);\r
       break;\r
-    case SMMBASE_REGISTER_CALLBACK:\r
+    case SmmBaseFunctionRegisterCallback:\r
       RegisterCallback (FunctionData);\r
       break;\r
-    case SMMBASE_ALLOCATE_POOL:\r
+    case SmmBaseFunctionAllocatePool:\r
       HelperAllocatePool (FunctionData);\r
       break;\r
-    case SMMBASE_FREE_POOL:\r
+    case SmmBaseFunctionFreePool:\r
       HelperFreePool (FunctionData);\r
       break;\r
-    case SMMBASE_COMMUNICATE:\r
+    case SmmBaseFunctionCommunicate:\r
       HelperCommunicate (FunctionData);\r
       break;\r
     default:\r
@@ -725,9 +725,10 @@ SmmBaseHelperMain (
 {\r
   EFI_STATUS  Status;\r
   EFI_MP_SERVICES_PROTOCOL   *MpServices;\r
-  EFI_HANDLE  Handle = NULL;\r
+  EFI_HANDLE                 Handle;\r
   UINTN                      NumberOfEnabledProcessors;\r
-\r
+  \r
+  Handle = NULL;\r
   ///\r
   /// Locate SMM CPU Protocol which is used later to retrieve/update CPU Save States\r
   ///\r
index 61e40cc2282f8c4d743fa0c1db0eb871521d1553..8bbfd8049b6f7c8364f5cd527357999bf3c4ca35 100644 (file)
 #include <Library/UefiLib.h>\r
 #include <Library/UefiRuntimeLib.h>\r
 \r
-//\r
-// SMM Base Protocol function ptoyotypes\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-SmmBaseRegister (\r
-  IN      EFI_SMM_BASE_PROTOCOL     *This,\r
-  IN      EFI_DEVICE_PATH_PROTOCOL  *FilePath,\r
-  IN      VOID                      *SourceBuffer,\r
-  IN      UINTN                     SourceSize,\r
-  OUT     EFI_HANDLE                *ImageHandle,\r
-  IN      BOOLEAN                   LegacyIA32Binary\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-SmmBaseUnregister (\r
-  IN      EFI_SMM_BASE_PROTOCOL     *This,\r
-  IN      EFI_HANDLE                ImageHandle\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-SmmBaseCommunicate (\r
-  IN      EFI_SMM_BASE_PROTOCOL     *This,\r
-  IN      EFI_HANDLE                ImageHandle,\r
-  IN OUT  VOID                      *CommunicationBuffer,\r
-  IN OUT  UINTN                     *BufferSize\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-SmmBaseRegisterCallback (\r
-  IN      EFI_SMM_BASE_PROTOCOL         *This,\r
-  IN      EFI_HANDLE                    SmmImageHandle,\r
-  IN      EFI_SMM_CALLBACK_ENTRY_POINT  CallbackAddress,\r
-  IN      BOOLEAN                       MakeLast,\r
-  IN      BOOLEAN                       FloatingPointSave\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-SmmBaseInSmm (\r
-  IN      EFI_SMM_BASE_PROTOCOL     *This,\r
-  OUT     BOOLEAN                   *InSmm\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-SmmBaseSmmAllocatePool (\r
-  IN      EFI_SMM_BASE_PROTOCOL     *This,\r
-  IN      EFI_MEMORY_TYPE           PoolType,\r
-  IN      UINTN                     Size,\r
-  OUT     VOID                      **Buffer\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-SmmBaseSmmFreePool (\r
-  IN      EFI_SMM_BASE_PROTOCOL     *This,\r
-  IN      VOID                      *Buffer\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-SmmBaseGetSmstLocation (\r
-  IN      EFI_SMM_BASE_PROTOCOL     *This,\r
-  OUT     EFI_SMM_SYSTEM_TABLE      **Smst\r
-  );\r
-\r
-///\r
-/// SMM Base Protocol instance\r
-///\r
-EFI_SMM_BASE_PROTOCOL  mSmmBase = {\r
-  SmmBaseRegister,\r
-  SmmBaseUnregister,\r
-  SmmBaseCommunicate,\r
-  SmmBaseRegisterCallback,\r
-  SmmBaseInSmm,\r
-  SmmBaseSmmAllocatePool,\r
-  SmmBaseSmmFreePool,\r
-  SmmBaseGetSmstLocation\r
-};\r
-\r
 SMMBASETHUNK_COMMUNICATION_DATA  mCommunicationData = {\r
   EFI_SMM_BASE_THUNK_COMMUNICATION_GUID,\r
   sizeof (SMMBASE_FUNCTION_DATA)\r
@@ -160,7 +76,7 @@ SmmBaseHelperService (
 \r
   mCommunicationData.FunctionData.Status = EFI_UNSUPPORTED;\r
 \r
-  if ((mCommunicationData.FunctionData.Function != SMMBASE_COMMUNICATE) && IsInSmm()) {\r
+  if ((mCommunicationData.FunctionData.Function != SmmBaseFunctionCommunicate) && IsInSmm()) {\r
     ///\r
     /// If in SMM mode, directly call services in SMM Base Helper.\r
     ///\r
@@ -220,7 +136,7 @@ SmmBaseRegister (
     return EFI_UNSUPPORTED;\r
   }\r
 \r
-  mCommunicationData.FunctionData.Function = SMMBASE_REGISTER;\r
+  mCommunicationData.FunctionData.Function = SmmBaseFunctionRegister;\r
   mCommunicationData.FunctionData.Args.Register.FilePath = FilePath;\r
   mCommunicationData.FunctionData.Args.Register.SourceBuffer = SourceBuffer;\r
   mCommunicationData.FunctionData.Args.Register.SourceSize = SourceSize;\r
@@ -249,7 +165,7 @@ SmmBaseUnregister (
   IN      EFI_HANDLE                ImageHandle\r
   )\r
 {\r
-  mCommunicationData.FunctionData.Function = SMMBASE_UNREGISTER;\r
+  mCommunicationData.FunctionData.Function = SmmBaseFunctionUnregister;\r
   mCommunicationData.FunctionData.Args.UnRegister.ImageHandle = ImageHandle;\r
 \r
   SmmBaseHelperService ();\r
@@ -264,8 +180,8 @@ SmmBaseUnregister (
 \r
   @param[in]      This                  Protocol instance pointer.\r
   @param[in]      ImageHandle           The handle of the registered driver.\r
-  @param[in,out]  CommunicationBuffer   Pointer to the buffer to convey into SMRAM.\r
-  @param[in,out]  BufferSize            The size of the data buffer being passed in.\r
+  @param[in, out]  CommunicationBuffer   Pointer to the buffer to convey into SMRAM.\r
+  @param[in, out]  BufferSize            The size of the data buffer being passed in.\r
                                         On exit, the size of data being returned.\r
                                         Zero if the handler does not wish to reply with any data.\r
 \r
@@ -285,7 +201,7 @@ SmmBaseCommunicate (
   /// Note this is a runtime interface\r
   ///\r
 \r
-  mCommunicationData.FunctionData.Function = SMMBASE_COMMUNICATE;\r
+  mCommunicationData.FunctionData.Function = SmmBaseFunctionCommunicate;\r
   mCommunicationData.FunctionData.Args.Communicate.ImageHandle = ImageHandle;\r
   mCommunicationData.FunctionData.Args.Communicate.CommunicationBuffer = CommunicationBuffer;\r
   mCommunicationData.FunctionData.Args.Communicate.SourceSize = BufferSize;\r
@@ -327,7 +243,7 @@ SmmBaseRegisterCallback (
     return EFI_UNSUPPORTED;\r
   }\r
 \r
-  mCommunicationData.FunctionData.Function = SMMBASE_REGISTER_CALLBACK;\r
+  mCommunicationData.FunctionData.Function = SmmBaseFunctionRegisterCallback;\r
   mCommunicationData.FunctionData.Args.RegisterCallback.SmmImageHandle = SmmImageHandle;\r
   mCommunicationData.FunctionData.Args.RegisterCallback.CallbackAddress = CallbackAddress;\r
   mCommunicationData.FunctionData.Args.RegisterCallback.MakeLast = MakeLast;\r
@@ -387,7 +303,7 @@ SmmBaseSmmAllocatePool (
   OUT     VOID                      **Buffer\r
   )\r
 {\r
-  mCommunicationData.FunctionData.Function = SMMBASE_ALLOCATE_POOL;\r
+  mCommunicationData.FunctionData.Function = SmmBaseFunctionAllocatePool;\r
   mCommunicationData.FunctionData.Args.AllocatePool.PoolType = PoolType;\r
   mCommunicationData.FunctionData.Args.AllocatePool.Size = Size;\r
   mCommunicationData.FunctionData.Args.AllocatePool.Buffer = Buffer;\r
@@ -415,7 +331,7 @@ SmmBaseSmmFreePool (
   IN      VOID                      *Buffer\r
   )\r
 {\r
-  mCommunicationData.FunctionData.Function = SMMBASE_FREE_POOL;\r
+  mCommunicationData.FunctionData.Function = SmmBaseFunctionFreePool;\r
   mCommunicationData.FunctionData.Args.FreePool.Buffer = Buffer;\r
 \r
   SmmBaseHelperService ();\r
@@ -429,7 +345,7 @@ SmmBaseSmmFreePool (
   global variable so that the SMST can be invoked in subsequent callbacks.\r
 \r
   @param[in]  This                  Protocol instance pointer.\r
-  @param[in]  Smst                  Pointer to the SMST.\r
+  @param[out] Smst                  Pointer to the SMST.\r
 \r
   @retval     EFI_SUCCESS           The operation was successful\r
   @retval     EFI_INVALID_PARAMETER Smst was invalid.\r
@@ -473,6 +389,20 @@ SmmBaseAddressChangeEvent (
   EfiConvertPointer (0x0, (VOID **) &mSmmCommunication);\r
 }\r
 \r
+///\r
+/// SMM Base Protocol instance\r
+///\r
+EFI_SMM_BASE_PROTOCOL  mSmmBase = {\r
+  SmmBaseRegister,\r
+  SmmBaseUnregister,\r
+  SmmBaseCommunicate,\r
+  SmmBaseRegisterCallback,\r
+  SmmBaseInSmm,\r
+  SmmBaseSmmAllocatePool,\r
+  SmmBaseSmmFreePool,\r
+  SmmBaseGetSmstLocation\r
+};\r
+\r
 /**\r
   Entry Point for SMM Base Protocol on SMM Base2 Protocol Thunk driver.\r
 \r
index 1b8a40779ba498914b45e0033775f83251d6c1fa..8abd56ecd6cfef3c9c00b6082652c9ccec17c857 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   SMM Control2 Protocol on SMM Control Protocol Thunk driver.\r
 \r
-  Copyright (c) 2009 Intel Corporation\r
+  Copyright (c) 2009 - 2010, 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
@@ -29,8 +29,8 @@ UINT8                      mDataPort;
   This function generates an SMI.\r
 \r
   @param[in]     This                The EFI_SMM_CONTROL2_PROTOCOL instance.\r
-  @param[in,out] CommandPort         The value written to the command port.\r
-  @param[in,out] DataPort            The value written to the data port.\r
+  @param[in, out] CommandPort         The value written to the command port.\r
+  @param[in, out] DataPort            The value written to the data port.\r
   @param[in]     Periodic            Optional mechanism to engender a periodic stream.\r
   @param[in]     ActivationInterval  Optional parameter to repeat at this period one\r
                                      time or, if the Periodic Boolean is set, periodically.\r
@@ -50,8 +50,9 @@ SmmControl2Trigger (
   IN UINTN                            ActivationInterval OPTIONAL\r
   )\r
 {\r
-  UINTN  ArgumentBufferSize = 0;\r
+  UINTN  ArgumentBufferSize;\r
 \r
+  ArgumentBufferSize = 0;\r
   if (CommandPort != NULL) {\r
     ArgumentBufferSize = 1;\r
   }\r
index ebee0086feeab9a8823db59bbf055064b958a79b..a74b8299c19779461798660341881566d0001fd0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Include file for SMM Control2 Protocol on SMM Control Protocol Thunk driver.\r
   \r
-  Copyright (c) 2009, Intel Corporation\r
+  Copyright (c) 2009 - 2010, 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
@@ -30,8 +30,8 @@
   This function generates an SMI.\r
 \r
   @param[in]     This                The EFI_SMM_CONTROL2_PROTOCOL instance.\r
-  @param[in,out] CommandPort         The value written to the command port.\r
-  @param[in,out] DataPort            The value written to the data port.\r
+  @param[in, out] CommandPort         The value written to the command port.\r
+  @param[in, out] DataPort            The value written to the data port.\r
   @param[in]     Periodic            Optional mechanism to engender a periodic stream.\r
   @param[in]     ActivationInterval  Optional parameter to repeat at this period one\r
                                      time or, if the Periodic Boolean is set, periodically.\r
index 31aba70a1def5c76013c22417c32e21da17a86eb..5e194d225d6eb16b6b51e20961b96e0d36a6a3ee 100644 (file)
@@ -9,7 +9,7 @@ these two conditions are true:
 1) EFI 1.10 module producing UC present\r
 2) And the rest of modules on the platform consume UC2\r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -153,11 +153,11 @@ StrToFat (
 \r
 typedef struct {\r
   UINT32                          Signature;\r
-  EFI_UNICODE_COLLATION_PROTOCOL  UC2;\r
-  EFI_UNICODE_COLLATION_PROTOCOL *UC;\r
+  EFI_UNICODE_COLLATION_PROTOCOL  Uc2;\r
+  EFI_UNICODE_COLLATION_PROTOCOL *Uc;\r
 } UC2_PRIVATE_DATA;\r
 \r
-#define UC2_PRIVATE_DATA_FROM_THIS(a) CR (a, UC2_PRIVATE_DATA, UC2, UC2_PRIVATE_DATA_SIGNATURE)\r
+#define UC2_PRIVATE_DATA_FROM_THIS(a) CR (a, UC2_PRIVATE_DATA, Uc2, UC2_PRIVATE_DATA_SIGNATURE)\r
 \r
 //\r
 // Firmware Volume Protocol template\r
@@ -181,7 +181,15 @@ UC2_PRIVATE_DATA gUC2PrivateDataTemplate = {
 //\r
 // Module globals\r
 //\r
+/**\r
+  This notification function is invoked when an instance of the\r
+  EFI_UNICODE_COLLATION_PROTOCOL is produced. It installs another instance of the\r
+  EFI_UNICODE_COLLATION_PROTOCOL2 on the same handle.\r
+\r
+  @param  Event                 The event that occured\r
+  @param  Context               Context of event. Not used in this nofication function.\r
 \r
+**/\r
 VOID\r
 EFIAPI\r
 UcNotificationEvent (\r
@@ -237,23 +245,23 @@ UcNotificationEvent (
     Status = gBS->HandleProtocol (\r
                     Handle,\r
                     &gEfiUnicodeCollationProtocolGuid,\r
-                    (VOID **)&Private->UC\r
+                    (VOID **)&Private->Uc\r
                     );\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     //\r
     // Fill in rest of private data structure\r
     //\r
-    Private->UC2.SupportedLanguages = ConvertLanguagesIso639ToRfc4646 (Private->UC->SupportedLanguages);\r
-    if (Private->UC2.SupportedLanguages != NULL) {\r
+    Private->Uc2.SupportedLanguages = ConvertLanguagesIso639ToRfc4646 (Private->Uc->SupportedLanguages);\r
+    if (Private->Uc2.SupportedLanguages != NULL) {\r
 \r
       //\r
-      // Install Firmware Volume Protocol onto same handle\r
+      // Install UC2 Protocol onto same handle\r
       //\r
       Status = gBS->InstallMultipleProtocolInterfaces (\r
                       &Handle,\r
                       &gEfiUnicodeCollation2ProtocolGuid,\r
-                      &Private->UC2,\r
+                      &Private->Uc2,\r
                       NULL\r
                       );\r
       ASSERT_EFI_ERROR (Status);\r
@@ -317,7 +325,7 @@ StriColl (
   \r
   Private = UC2_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  return Private->UC->StriColl (Private->UC, Str1, Str2);\r
+  return Private->Uc->StriColl (Private->Uc, Str1, Str2);\r
 }\r
 \r
 \r
@@ -340,7 +348,7 @@ StrLwr (
   \r
   Private = UC2_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  Private->UC->StrLwr (Private->UC, Str);\r
+  Private->Uc->StrLwr (Private->Uc, Str);\r
 }\r
 \r
 \r
@@ -363,7 +371,7 @@ StrUpr (
   \r
   Private = UC2_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  Private->UC->StrUpr (Private->UC, Str);\r
+  Private->Uc->StrUpr (Private->Uc, Str);\r
 }\r
 \r
 /**\r
@@ -390,7 +398,7 @@ MetaiMatch (
   \r
   Private = UC2_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  return Private->UC->MetaiMatch (Private->UC, String, Pattern);\r
+  return Private->Uc->MetaiMatch (Private->Uc, String, Pattern);\r
 }\r
 \r
 \r
@@ -419,7 +427,7 @@ FatToStr (
   \r
   Private = UC2_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  Private->UC->FatToStr (Private->UC, FatSize, Fat, String);\r
+  Private->Uc->FatToStr (Private->Uc, FatSize, Fat, String);\r
 }\r
 \r
 \r
@@ -451,6 +459,6 @@ StrToFat (
   \r
   Private = UC2_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  return Private->UC->StrToFat (Private->UC, String, FatSize, Fat);\r
+  return Private->Uc->StrToFat (Private->Uc, String, FatSize, Fat);\r
 }\r
 \r
index bba93bdaaf1043fd4d464585155a994422357d8f..c4638f9203af51f24061e36a8b348a7a4c1a2549 100644 (file)
@@ -9,7 +9,7 @@ these two conditions are true:
 1) EFI 1.10 module consuming UC present\r
 2) And the rest of modules on the platform produce UC2\r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -153,11 +153,11 @@ StrToFat (
 \r
 typedef struct {\r
   UINT32                          Signature;\r
-  EFI_UNICODE_COLLATION_PROTOCOL  UC;\r
-  EFI_UNICODE_COLLATION_PROTOCOL *UC2;\r
+  EFI_UNICODE_COLLATION_PROTOCOL  Uc;\r
+  EFI_UNICODE_COLLATION_PROTOCOL *Uc2;\r
 } UC_PRIVATE_DATA;\r
 \r
-#define UC_PRIVATE_DATA_FROM_THIS(a) CR (a, UC_PRIVATE_DATA, UC, UC_PRIVATE_DATA_SIGNATURE)\r
+#define UC_PRIVATE_DATA_FROM_THIS(a) CR (a, UC_PRIVATE_DATA, Uc, UC_PRIVATE_DATA_SIGNATURE)\r
 \r
 //\r
 // Firmware Volume Protocol template\r
@@ -181,7 +181,15 @@ UC_PRIVATE_DATA gUCPrivateDataTemplate = {
 //\r
 // Module globals\r
 //\r
+/**\r
+  This notification function is invoked when an instance of the\r
+  EFI_UNICODE_COLLATION_PROTOCOL2 is produced. It installs another instance of the\r
+  EFI_UNICODE_COLLATION_PROTOCOL on the same handle.\r
 \r
+  @param  Event                 The event that occured\r
+  @param  Context               Context of event. Not used in this nofication function.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 Uc2NotificationEvent (\r
@@ -237,16 +245,16 @@ Uc2NotificationEvent (
     Status = gBS->HandleProtocol (\r
                     Handle,\r
                     &gEfiUnicodeCollation2ProtocolGuid,\r
-                    (VOID **)&Private->UC2\r
+                    (VOID **)&Private->Uc2\r
                     );\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     //\r
     // Fill in rest of private data structure\r
     //\r
-    Private->UC.SupportedLanguages = ConvertLanguagesRfc4646ToIso639 (Private->UC2->SupportedLanguages);\r
+    Private->Uc.SupportedLanguages = ConvertLanguagesRfc4646ToIso639 (Private->Uc2->SupportedLanguages);\r
 \r
-    if (Private->UC.SupportedLanguages != NULL) {\r
+    if (Private->Uc.SupportedLanguages != NULL) {\r
 \r
       //\r
       // Install Firmware Volume Protocol onto same handle\r
@@ -254,7 +262,7 @@ Uc2NotificationEvent (
       Status = gBS->InstallMultipleProtocolInterfaces (\r
                       &Handle,\r
                       &gEfiUnicodeCollationProtocolGuid,\r
-                      &Private->UC,\r
+                      &Private->Uc,\r
                       NULL\r
                       );\r
       ASSERT_EFI_ERROR (Status);\r
@@ -318,7 +326,7 @@ StriColl (
   \r
   Private = UC_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  return Private->UC2->StriColl (Private->UC2, Str1, Str2);\r
+  return Private->Uc2->StriColl (Private->Uc2, Str1, Str2);\r
 }\r
 \r
 \r
@@ -341,7 +349,7 @@ StrLwr (
   \r
   Private = UC_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  Private->UC2->StrLwr (Private->UC2, Str);\r
+  Private->Uc2->StrLwr (Private->Uc2, Str);\r
 }\r
 \r
 \r
@@ -364,7 +372,7 @@ StrUpr (
   \r
   Private = UC_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  Private->UC2->StrUpr (Private->UC2, Str);\r
+  Private->Uc2->StrUpr (Private->Uc2, Str);\r
 }\r
 \r
 /**\r
@@ -391,7 +399,7 @@ MetaiMatch (
   \r
   Private = UC_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  return Private->UC2->MetaiMatch (Private->UC2, String, Pattern);\r
+  return Private->Uc2->MetaiMatch (Private->Uc2, String, Pattern);\r
 }\r
 \r
 \r
@@ -420,7 +428,7 @@ FatToStr (
   \r
   Private = UC_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  Private->UC2->FatToStr (Private->UC2, FatSize, Fat, String);\r
+  Private->Uc2->FatToStr (Private->Uc2, FatSize, Fat, String);\r
 }\r
 \r
 \r
@@ -452,6 +460,6 @@ StrToFat (
   \r
   Private = UC_PRIVATE_DATA_FROM_THIS (This);\r
   \r
-  return Private->UC2->StrToFat (Private->UC2, String, FatSize, Fat);\r
+  return Private->Uc2->StrToFat (Private->Uc2, String, FatSize, Fat);\r
 }\r
 \r