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