Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11094 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -78,10 +78,13 @@ typedef struct {
|
||||
} IFR_OPTION;
|
||||
#pragma pack()
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
VENDOR_DEVICE_PATH VendorDevicePath;
|
||||
UINT32 MonotonicCount;
|
||||
UINT32 Reserved;
|
||||
UINT64 UniqueId;
|
||||
} HII_VENDOR_DEVICE_PATH_NODE;
|
||||
#pragma pack()
|
||||
|
||||
typedef struct {
|
||||
HII_VENDOR_DEVICE_PATH_NODE Node;
|
||||
@@ -280,7 +283,8 @@ CreateOneOfOptionOpCode (
|
||||
IN IFR_OPTION *OptionsList,
|
||||
IN UINT8 Type,
|
||||
IN OUT EFI_HII_UPDATE_DATA *Data
|
||||
);
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
CreateOneOfOpCode (
|
||||
@@ -599,6 +603,53 @@ ExtractDefault(
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConstructConfigAltResp (
|
||||
IN EFI_STRING ConfigRequest, OPTIONAL
|
||||
OUT EFI_STRING *Progress,
|
||||
OUT EFI_STRING *ConfigAltResp,
|
||||
IN EFI_GUID *Guid,
|
||||
IN CHAR16 *Name,
|
||||
IN EFI_HANDLE *DriverHandle,
|
||||
IN VOID *BufferStorage,
|
||||
IN UINTN BufferStorageSize,
|
||||
IN VOID *BlockNameArray, OPTIONAL
|
||||
IN UINTN NumberAltCfg,
|
||||
...
|
||||
//IN UINT16 AltCfgId,
|
||||
//IN VOID *DefaultValueArray,
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Construct <ConfigAltResp> for a buffer storage.
|
||||
|
||||
Arguments:
|
||||
ConfigRequest - The Config request string. If set to NULL, all the
|
||||
configurable elements will be extracted from BlockNameArray.
|
||||
ConfigAltResp - The returned <ConfigAltResp>.
|
||||
Progress - On return, points to a character in the Request.
|
||||
Guid - GUID of the buffer storage.
|
||||
Name - Name of the buffer storage.
|
||||
DriverHandle - The DriverHandle which is used to invoke HiiDatabase
|
||||
protocol interface NewPackageList().
|
||||
BufferStorage - Content of the buffer storage.
|
||||
BufferStorageSize - Length in bytes of the buffer storage.
|
||||
BlockNameArray - Array generated by VFR compiler.
|
||||
NumberAltCfg - Number of Default value array generated by VFR compiler.
|
||||
The sequential input parameters will be number of
|
||||
AltCfgId and DefaultValueArray pairs. When set to 0,
|
||||
there will be no <AltResp>.
|
||||
|
||||
Returns:
|
||||
EFI_OUT_OF_RESOURCES - Run out of memory resource.
|
||||
EFI_INVALID_PARAMETER - ConfigAltResp is NULL.
|
||||
EFI_SUCCESS - Operation successful.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ExtractGuidFromHiiHandle (
|
||||
IN EFI_HII_HANDLE Handle,
|
||||
@@ -643,6 +694,49 @@ Returns:
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ExtractClassGuidFromHiiHandle (
|
||||
IN EFI_HII_HANDLE Handle,
|
||||
OUT UINT8 *NumberOfClassGuid,
|
||||
OUT EFI_GUID **ClassGuid,
|
||||
OUT EFI_STRING_ID *FormSetTitle,
|
||||
OUT EFI_STRING_ID *FormSetHelp
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Extract formset ClassGuid for given HII handle.
|
||||
|
||||
Arguments:
|
||||
HiiHandle - Hii handle
|
||||
NumberOfClassGuid - Number of ClassGuid
|
||||
ClassGuid - Pointer to callee allocated buffer, an array of ClassGuid
|
||||
FormSetTitle - Formset title string
|
||||
FormSetHelp - Formset help string
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Successfully extract Class for specified Hii handle.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
VOID
|
||||
ToLower (
|
||||
IN OUT CHAR16 *Str
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Converts the unicode character from uppercase to lowercase.
|
||||
|
||||
Arguments:
|
||||
Str - String to be converted
|
||||
|
||||
Returns:
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
BufferToHexString (
|
||||
IN OUT CHAR16 *Str,
|
||||
@@ -689,6 +783,64 @@ Returns:
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConfigStringToUnicode (
|
||||
IN OUT CHAR16 *UnicodeString,
|
||||
IN OUT UINTN *StrBufferLen,
|
||||
IN CHAR16 *ConfigString
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert binary representation Config string (e.g. "0041004200430044") to the
|
||||
original string (e.g. "ABCD"). Config string appears in <ConfigHdr> (i.e.
|
||||
"&NAME=<string>"), or Name/Value pair in <ConfigBody> (i.e. "label=<string>").
|
||||
|
||||
Arguments:
|
||||
UnicodeString - Original Unicode string.
|
||||
StrBufferLen - On input: Length in bytes of buffer to hold the Unicode string.
|
||||
Includes tailing '\0' character.
|
||||
On output:
|
||||
If return EFI_SUCCESS, containing length of Unicode string buffer.
|
||||
If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired.
|
||||
ConfigString - Binary representation of Unicode String, <string> := (<HexCh>4)+
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Routine success.
|
||||
EFI_BUFFER_TOO_SMALL - The string buffer is too small.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
UnicodeToConfigString (
|
||||
IN OUT CHAR16 *ConfigString,
|
||||
IN OUT UINTN *StrBufferLen,
|
||||
IN CHAR16 *UnicodeString
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert Unicode string to binary representation Config string, e.g.
|
||||
"ABCD" => "0041004200430044". Config string appears in <ConfigHdr> (i.e.
|
||||
"&NAME=<string>"), or Name/Value pair in <ConfigBody> (i.e. "label=<string>").
|
||||
|
||||
Arguments:
|
||||
ConfigString - Binary representation of Unicode String, <string> := (<HexCh>4)+
|
||||
StrBufferLen - On input: Length in bytes of buffer to hold the Unicode string.
|
||||
Includes tailing '\0' character.
|
||||
On output:
|
||||
If return EFI_SUCCESS, containing length of Unicode string buffer.
|
||||
If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired.
|
||||
UnicodeString - Original Unicode string.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Routine success.
|
||||
EFI_BUFFER_TOO_SMALL - The string buffer is too small.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConstructConfigHdr (
|
||||
IN OUT CHAR16 *ConfigHdr,
|
||||
@@ -719,6 +871,29 @@ Returns:
|
||||
--*/
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
IsConfigHdrMatch (
|
||||
IN EFI_STRING ConfigString,
|
||||
IN EFI_GUID *StorageGuid, OPTIONAL
|
||||
IN CHAR16 *StorageName OPTIONAL
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Determines if the Routing data (Guid and Name) is correct in <ConfigHdr>.
|
||||
|
||||
Arguments:
|
||||
ConfigString - Either <ConfigRequest> or <ConfigResp>.
|
||||
StorageGuid - GUID of the storage.
|
||||
StorageName - Name of the stoarge.
|
||||
|
||||
Returns:
|
||||
TRUE - Routing information is correct in ConfigString.
|
||||
FALSE - Routing information is incorrect in ConfigString.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
FindBlockName (
|
||||
IN OUT CHAR16 *String,
|
||||
@@ -1093,6 +1268,47 @@ Returns:
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
IfrLibInitUpdateData (
|
||||
IN OUT EFI_HII_UPDATE_DATA *UpdateData,
|
||||
IN UINT32 BufferSize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This function initialize the data structure for dynamic opcode.
|
||||
|
||||
Arguments:
|
||||
UpdateData - The adding data;
|
||||
BufferSize - Length of the buffer to fill dynamic opcodes.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Update data is initialized.
|
||||
EFI_INVALID_PARAMETER - UpdateData is NULL.
|
||||
EFI_OUT_OF_RESOURCES - No enough memory to allocate.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
IfrLibFreeUpdateData (
|
||||
IN EFI_HII_UPDATE_DATA *UpdateData
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This function free the resource of update data.
|
||||
|
||||
Arguments:
|
||||
UpdateData - The adding data;
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Resource in UpdateData is released.
|
||||
EFI_INVALID_PARAMETER - UpdateData is NULL.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
IfrLibUpdateForm (
|
||||
IN EFI_HII_HANDLE Handle,
|
||||
|
Reference in New Issue
Block a user