MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of interfaces function for EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, 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
|
||||
@@ -109,7 +109,7 @@ ExtractDevicePath (
|
||||
if (((Length + 1) / 2) < sizeof (EFI_DEVICE_PATH_PROTOCOL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// The data in <PathHdr> is encoded as hex UNICODE %02x bytes in the same order
|
||||
// as the device path resides in RAM memory.
|
||||
@@ -119,7 +119,7 @@ ExtractDevicePath (
|
||||
if (DevicePathBuffer == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Convert DevicePath
|
||||
//
|
||||
@@ -133,7 +133,7 @@ ExtractDevicePath (
|
||||
DevicePathBuffer [Index/2] = (UINT8) ((DevicePathBuffer [Index/2] << 4) + DigitUint8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Validate DevicePath
|
||||
//
|
||||
@@ -209,7 +209,7 @@ ExtractNameSpace (
|
||||
|
||||
TmpPtr = StrStr (String, L"&");
|
||||
if (TmpPtr != NULL) {
|
||||
*TmpPtr = 0;
|
||||
*TmpPtr = 0;
|
||||
}
|
||||
if (NextString != NULL) {
|
||||
*NextString = String + StrLen (String);
|
||||
@@ -227,7 +227,7 @@ ExtractNameSpace (
|
||||
UnicodeStrToAsciiStrS (String, *NameSpace, NameSpaceSize);
|
||||
|
||||
if (TmpPtr != NULL) {
|
||||
*TmpPtr = L'&';
|
||||
*TmpPtr = L'&';
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -256,7 +256,7 @@ ExtractKeyword (
|
||||
EFI_STRING TmpPtr;
|
||||
|
||||
ASSERT ((Keyword != NULL) && (NextString != NULL));
|
||||
|
||||
|
||||
TmpPtr = NULL;
|
||||
|
||||
//
|
||||
@@ -280,10 +280,10 @@ ExtractKeyword (
|
||||
}
|
||||
|
||||
String += StrLen (L"KEYWORD=");
|
||||
|
||||
|
||||
TmpPtr = StrStr (String, L"&");
|
||||
if (TmpPtr != NULL) {
|
||||
*TmpPtr = 0;
|
||||
*TmpPtr = 0;
|
||||
}
|
||||
*NextString = String + StrLen (String);
|
||||
|
||||
@@ -295,7 +295,7 @@ ExtractKeyword (
|
||||
if (TmpPtr != NULL) {
|
||||
*TmpPtr = L'&';
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -335,10 +335,10 @@ ExtractValue (
|
||||
}
|
||||
|
||||
String += StrLen (L"VALUE=");
|
||||
|
||||
|
||||
TmpPtr = StrStr (String, L"&");
|
||||
if (TmpPtr != NULL) {
|
||||
*TmpPtr = 0;
|
||||
*TmpPtr = 0;
|
||||
}
|
||||
*NextString = String + StrLen (String);
|
||||
|
||||
@@ -350,7 +350,7 @@ ExtractValue (
|
||||
if (TmpPtr != NULL) {
|
||||
*TmpPtr = L'&';
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ ExtractFilter (
|
||||
{
|
||||
CHAR16 *PathPtr;
|
||||
CHAR16 *KeywordPtr;
|
||||
BOOLEAN RetVal;
|
||||
BOOLEAN RetVal;
|
||||
|
||||
ASSERT ((FilterFlags != NULL) && (NextString != NULL));
|
||||
|
||||
@@ -387,7 +387,7 @@ ExtractFilter (
|
||||
*NextString = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
*FilterFlags = 0;
|
||||
RetVal = TRUE;
|
||||
|
||||
@@ -558,7 +558,7 @@ ValidateFilter (
|
||||
|
||||
//
|
||||
// Get ReadOnly flag from Question.
|
||||
//
|
||||
//
|
||||
*ReadOnly = ExtractReadOnlyFromOpCode(OpCodeData);
|
||||
|
||||
while (ExtractFilter (StringPtr, &FilterFlags, &NextFilter)) {
|
||||
@@ -653,7 +653,7 @@ ValidateFilter (
|
||||
//
|
||||
StringPtr = NextFilter;
|
||||
}
|
||||
|
||||
|
||||
Done:
|
||||
//
|
||||
// The current filter which is processing.
|
||||
@@ -702,14 +702,14 @@ GetRecordFromDevicePath (
|
||||
}
|
||||
|
||||
/**
|
||||
Calculate the size of StringSrc and output it. Also copy string text from src
|
||||
Calculate the size of StringSrc and output it. Also copy string text from src
|
||||
to dest.
|
||||
|
||||
This is a internal function.
|
||||
|
||||
@param StringSrc Points to current null-terminated string.
|
||||
@param BufferSize Length of the buffer.
|
||||
@param StringDest Buffer to store the string text.
|
||||
@param StringDest Buffer to store the string text.
|
||||
|
||||
@retval EFI_SUCCESS The string text was outputted successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES Out of resource.
|
||||
@@ -738,7 +738,7 @@ GetUnicodeStringTextAndSize (
|
||||
if (*StringDest == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
CopyMem (*StringDest, StringSrc, StringSize);
|
||||
|
||||
*BufferSize = StringSize;
|
||||
@@ -1067,7 +1067,7 @@ GetNextStringId (
|
||||
case EFI_HII_SIBT_STRING_SCSU:
|
||||
Offset = sizeof (EFI_HII_STRING_BLOCK);
|
||||
StringTextPtr = BlockHdr + Offset;
|
||||
|
||||
|
||||
if (FindString) {
|
||||
StringSize = AsciiStrSize ((CHAR8 *) StringTextPtr);
|
||||
*KeywordValue = AllocatePool (StringSize * sizeof (CHAR16));
|
||||
@@ -1087,7 +1087,7 @@ GetNextStringId (
|
||||
case EFI_HII_SIBT_STRING_SCSU_FONT:
|
||||
Offset = sizeof (EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK) - sizeof (UINT8);
|
||||
StringTextPtr = BlockHdr + Offset;
|
||||
|
||||
|
||||
if (FindString) {
|
||||
StringSize = AsciiStrSize ((CHAR8 *) StringTextPtr);
|
||||
*KeywordValue = AllocatePool (StringSize * sizeof (CHAR16));
|
||||
@@ -1205,7 +1205,7 @@ GetNextStringId (
|
||||
BlockSize += Offset;
|
||||
CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
|
||||
for (Index = 0; Index < StringCount; Index++) {
|
||||
GetUnicodeStringTextAndSize (StringTextPtr, &StringSize, &String);
|
||||
GetUnicodeStringTextAndSize (StringTextPtr, &StringSize, &String);
|
||||
|
||||
if (FindString) {
|
||||
*KeywordValue = String;
|
||||
@@ -1346,7 +1346,7 @@ GetStringIdFromRecord (
|
||||
StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
|
||||
|
||||
if (AsciiStrnCmp(Name, StringPackage->StringPkgHdr->Language, AsciiStrLen (Name)) == 0) {
|
||||
Status = GetStringIdFromString (StringPackage, KeywordValue, StringId);
|
||||
Status = GetStringIdFromString (StringPackage, KeywordValue, StringId);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return KEYWORD_HANDLER_KEYWORD_NOT_FOUND;
|
||||
} else {
|
||||
@@ -1430,10 +1430,10 @@ IsStorageOpCode (
|
||||
@retval the opcode for the question.
|
||||
|
||||
**/
|
||||
UINT8 *
|
||||
UINT8 *
|
||||
FindQuestionFromStringId (
|
||||
IN HII_IFR_PACKAGE_INSTANCE *FormPackage,
|
||||
IN EFI_STRING_ID KeywordStrId
|
||||
IN EFI_STRING_ID KeywordStrId
|
||||
)
|
||||
{
|
||||
UINT8 *OpCodeData;
|
||||
@@ -1530,7 +1530,7 @@ FindStorageFromVarId (
|
||||
@retval the width info for one question.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
UINT16
|
||||
GetWidth (
|
||||
IN UINT8 *OpCodeData
|
||||
)
|
||||
@@ -1548,16 +1548,16 @@ GetWidth (
|
||||
switch (((EFI_IFR_ONE_OF *) OpCodeData)->Flags & EFI_IFR_NUMERIC_SIZE) {
|
||||
case EFI_IFR_NUMERIC_SIZE_1:
|
||||
return (UINT16) sizeof (UINT8);
|
||||
|
||||
|
||||
case EFI_IFR_NUMERIC_SIZE_2:
|
||||
return (UINT16) sizeof (UINT16);
|
||||
|
||||
|
||||
case EFI_IFR_NUMERIC_SIZE_4:
|
||||
return (UINT16) sizeof (UINT32);
|
||||
|
||||
|
||||
case EFI_IFR_NUMERIC_SIZE_8:
|
||||
return (UINT16) sizeof (UINT64);
|
||||
|
||||
|
||||
default:
|
||||
ASSERT (FALSE);
|
||||
return 0;
|
||||
@@ -1572,16 +1572,16 @@ GetWidth (
|
||||
switch (((EFI_IFR_ONE_OF_OPTION *) NextOpCodeData)->Type) {
|
||||
case EFI_IFR_TYPE_NUM_SIZE_8:
|
||||
return (UINT16) sizeof (UINT8) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers;
|
||||
|
||||
|
||||
case EFI_IFR_TYPE_NUM_SIZE_16:
|
||||
return (UINT16) sizeof (UINT16) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers ;
|
||||
|
||||
|
||||
case EFI_IFR_TYPE_NUM_SIZE_32:
|
||||
return (UINT16) sizeof (UINT32) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers;
|
||||
|
||||
|
||||
case EFI_IFR_TYPE_NUM_SIZE_64:
|
||||
return (UINT16) sizeof (UINT64) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers;
|
||||
|
||||
|
||||
default:
|
||||
ASSERT (FALSE);
|
||||
return 0;
|
||||
@@ -1589,7 +1589,7 @@ GetWidth (
|
||||
|
||||
case EFI_IFR_CHECKBOX_OP:
|
||||
return (UINT16) sizeof (BOOLEAN);
|
||||
|
||||
|
||||
case EFI_IFR_PASSWORD_OP:
|
||||
return (UINT16)((UINTN) ((EFI_IFR_PASSWORD *) OpCodeData)->MaxSize * sizeof (CHAR16));
|
||||
|
||||
@@ -1648,12 +1648,12 @@ InternalLowerConfigString (
|
||||
|
||||
/**
|
||||
Allocates and returns a Null-terminated Unicode <ConfigHdr> string.
|
||||
|
||||
|
||||
The format of a <ConfigHdr> is as follows:
|
||||
|
||||
GUID=<HexCh>32&NAME=<Char>NameLength&PATH=<HexChar>DevicePathSize<Null>
|
||||
|
||||
@param[in] OpCodeData The opcode for the storage.
|
||||
@param[in] OpCodeData The opcode for the storage.
|
||||
@param[in] DriverHandle The driver handle which supports a Device Path Protocol
|
||||
that is the routing information PATH. Each byte of
|
||||
the Device Path associated with DriverHandle is converted
|
||||
@@ -1689,17 +1689,17 @@ ConstructConfigHdr (
|
||||
Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE *) OpCodeData)->Guid;
|
||||
AsciiName = (CHAR8 *) ((EFI_IFR_VARSTORE *) OpCodeData)->Name;
|
||||
break;
|
||||
|
||||
|
||||
case EFI_IFR_VARSTORE_NAME_VALUE_OP:
|
||||
Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE_NAME_VALUE *) OpCodeData)->Guid;
|
||||
AsciiName = NULL;
|
||||
break;
|
||||
|
||||
|
||||
case EFI_IFR_VARSTORE_EFI_OP:
|
||||
Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Guid;
|
||||
AsciiName = (CHAR8 *) ((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Name;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
ASSERT (FALSE);
|
||||
Guid = NULL;
|
||||
@@ -1717,7 +1717,7 @@ ConstructConfigHdr (
|
||||
}
|
||||
|
||||
//
|
||||
// Compute the length of Name in Unicode characters.
|
||||
// Compute the length of Name in Unicode characters.
|
||||
// If Name is NULL, then the length is 0.
|
||||
//
|
||||
NameLength = 0;
|
||||
@@ -1773,7 +1773,7 @@ ConstructConfigHdr (
|
||||
String += StrnLenS (String, MaxLen - ((UINTN)String - (UINTN)ReturnString) / sizeof (CHAR16));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Append L"&NAME="
|
||||
//
|
||||
@@ -1841,12 +1841,12 @@ EFI_STRING
|
||||
ConstructRequestElement (
|
||||
IN CHAR16 *Name,
|
||||
IN UINT16 Offset,
|
||||
IN UINT16 Width
|
||||
IN UINT16 Width
|
||||
)
|
||||
{
|
||||
CHAR16 *StringPtr;
|
||||
UINTN Length;
|
||||
|
||||
|
||||
if (Name != NULL) {
|
||||
//
|
||||
// Add <BlockName> length for each Name
|
||||
@@ -1886,10 +1886,10 @@ ConstructRequestElement (
|
||||
// Append OFFSET=XXXX&WIDTH=YYYY\0
|
||||
//
|
||||
UnicodeSPrint (
|
||||
StringPtr,
|
||||
(7 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
|
||||
L"OFFSET=%04X&WIDTH=%04X",
|
||||
Offset,
|
||||
StringPtr,
|
||||
(7 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
|
||||
L"OFFSET=%04X&WIDTH=%04X",
|
||||
Offset,
|
||||
Width
|
||||
);
|
||||
}
|
||||
@@ -1922,7 +1922,7 @@ GetNameFromId (
|
||||
|
||||
Name = NULL;
|
||||
BestLanguage = NULL;
|
||||
PlatformLanguage = NULL;
|
||||
PlatformLanguage = NULL;
|
||||
SupportedLanguages = NULL;
|
||||
|
||||
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);
|
||||
@@ -1932,10 +1932,10 @@ GetNameFromId (
|
||||
// Get the best matching language from SupportedLanguages
|
||||
//
|
||||
BestLanguage = GetBestLanguage (
|
||||
SupportedLanguages,
|
||||
SupportedLanguages,
|
||||
FALSE, // RFC 4646 mode
|
||||
PlatformLanguage != NULL ? PlatformLanguage : "", // Highest priority
|
||||
SupportedLanguages, // Lowest priority
|
||||
SupportedLanguages, // Lowest priority
|
||||
NULL
|
||||
);
|
||||
if (BestLanguage == NULL) {
|
||||
@@ -2013,7 +2013,7 @@ ExtractConfigRequest (
|
||||
IN EFI_STRING_ID KeywordStrId,
|
||||
OUT UINT8 **OpCodeData,
|
||||
OUT EFI_STRING *ConfigRequest
|
||||
)
|
||||
)
|
||||
{
|
||||
LIST_ENTRY *Link;
|
||||
HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageListNode;
|
||||
@@ -2053,7 +2053,7 @@ ExtractConfigRequest (
|
||||
//
|
||||
ASSERT (Header->VarStoreId != 0);
|
||||
DEBUG ((EFI_D_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId));
|
||||
|
||||
|
||||
Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId);
|
||||
ASSERT (Storage != NULL);
|
||||
|
||||
@@ -2116,7 +2116,7 @@ ExtractConfigResp (
|
||||
IN EFI_STRING ValueElement,
|
||||
OUT UINT8 **OpCodeData,
|
||||
OUT EFI_STRING *ConfigResp
|
||||
)
|
||||
)
|
||||
{
|
||||
LIST_ENTRY *Link;
|
||||
HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageListNode;
|
||||
@@ -2156,7 +2156,7 @@ ExtractConfigResp (
|
||||
//
|
||||
ASSERT (Header->VarStoreId != 0);
|
||||
DEBUG ((EFI_D_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId));
|
||||
|
||||
|
||||
Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId);
|
||||
ASSERT (Storage != NULL);
|
||||
|
||||
@@ -2341,7 +2341,7 @@ GetStringIdFromDatabase (
|
||||
*ProgressErr = GetStringIdFromRecord (Record, NameSpace, KeywordData, KeywordStringId);
|
||||
if (*ProgressErr == KEYWORD_HANDLER_NO_ERROR) {
|
||||
*DataBaseRecord = Record;
|
||||
|
||||
|
||||
if ((DevicePathPkg = Record->PackageList->DevicePathPkg) != NULL) {
|
||||
DestDevicePath = (EFI_DEVICE_PATH_PROTOCOL *) (DevicePathPkg + sizeof (EFI_HII_PACKAGE_HEADER));
|
||||
DevicePathSize = GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) DestDevicePath);
|
||||
@@ -2361,7 +2361,7 @@ GetStringIdFromDatabase (
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
} else if (*ProgressErr == KEYWORD_HANDLER_KEYWORD_NOT_FOUND) {
|
||||
FindNameSpace = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2394,7 +2394,7 @@ GetStringIdFromDatabase (
|
||||
**/
|
||||
EFI_STATUS
|
||||
GenerateKeywordResp (
|
||||
IN CHAR8 *NameSpace,
|
||||
IN CHAR8 *NameSpace,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN EFI_STRING KeywordData,
|
||||
IN EFI_STRING ValueStr,
|
||||
@@ -2510,7 +2510,7 @@ GenerateKeywordResp (
|
||||
if (PathHdr != NULL) {
|
||||
FreePool (PathHdr);
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -2562,9 +2562,9 @@ MergeToMultiKeywordResp (
|
||||
}
|
||||
|
||||
/**
|
||||
Enumerate all keyword in the system.
|
||||
|
||||
If error occur when parse one keyword, just skip it and parse the next one.
|
||||
Enumerate all keyword in the system.
|
||||
|
||||
If error occur when parse one keyword, just skip it and parse the next one.
|
||||
|
||||
This is a internal function.
|
||||
|
||||
@@ -2649,7 +2649,7 @@ EnumerateAllKeywords (
|
||||
// Any valid string start from 2. so here initial it to 1.
|
||||
//
|
||||
NextStringId = 1;
|
||||
|
||||
|
||||
//
|
||||
// Enumerate all valid stringid in the package.
|
||||
//
|
||||
@@ -2664,7 +2664,7 @@ EnumerateAllKeywords (
|
||||
//
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 3.4 Extract Value for the input keyword.
|
||||
//
|
||||
@@ -2698,7 +2698,7 @@ EnumerateAllKeywords (
|
||||
//
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 6. Merge to the MultiKeywordResp string.
|
||||
//
|
||||
@@ -2721,7 +2721,7 @@ Error:
|
||||
if (KeywordResp != NULL) {
|
||||
FreePool (KeywordResp);
|
||||
KeywordResp = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (LocalNameSpace != NULL) {
|
||||
@@ -2729,7 +2729,7 @@ Error:
|
||||
LocalNameSpace = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2746,7 +2746,7 @@ Error:
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
*MultiResp = MultiKeywordResp;
|
||||
|
||||
|
||||
Done:
|
||||
if (LocalNameSpace != NULL) {
|
||||
FreePool (LocalNameSpace);
|
||||
@@ -2766,18 +2766,18 @@ Done:
|
||||
This function accepts a <MultiKeywordResp> formatted string, finds the associated
|
||||
keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
|
||||
EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
|
||||
|
||||
If there is an issue in resolving the contents of the KeywordString, then the
|
||||
function returns an error and also sets the Progress and ProgressErr with the
|
||||
|
||||
If there is an issue in resolving the contents of the KeywordString, then the
|
||||
function returns an error and also sets the Progress and ProgressErr with the
|
||||
appropriate information about where the issue occurred and additional data about
|
||||
the nature of the issue.
|
||||
|
||||
the nature of the issue.
|
||||
|
||||
In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
|
||||
error is generated during processing the second or later keyword element, the system
|
||||
storage associated with earlier keywords is not modified. All elements of the
|
||||
storage associated with earlier keywords is not modified. All elements of the
|
||||
KeywordString must successfully pass all tests for format and access prior to making
|
||||
any modifications to storage.
|
||||
|
||||
|
||||
In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
|
||||
containing multiple keywords, the state of storage associated with earlier keywords
|
||||
is undefined.
|
||||
@@ -2785,18 +2785,18 @@ Done:
|
||||
|
||||
@param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
|
||||
|
||||
@param KeywordString A null-terminated string in <MultiKeywordResp> format.
|
||||
@param KeywordString A null-terminated string in <MultiKeywordResp> format.
|
||||
|
||||
@param Progress On return, points to a character in the KeywordString.
|
||||
Points to the string's NULL terminator if the request
|
||||
was successful. Points to the most recent '&' before
|
||||
@param Progress On return, points to a character in the KeywordString.
|
||||
Points to the string's NULL terminator if the request
|
||||
was successful. Points to 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) if the request was not successful.
|
||||
|
||||
@param ProgressErr If during the processing of the KeywordString there was
|
||||
a failure, this parameter gives additional information
|
||||
about the possible source of the problem. The various
|
||||
a failure, this parameter gives additional information
|
||||
about the possible source of the problem. The various
|
||||
errors are defined in "Related Definitions" below.
|
||||
|
||||
|
||||
@@ -2804,16 +2804,16 @@ Done:
|
||||
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
||||
1. KeywordString is NULL.
|
||||
2. Parsing of the KeywordString resulted in an
|
||||
2. Parsing of the KeywordString resulted in an
|
||||
error. See Progress and ProgressErr for more data.
|
||||
|
||||
@retval EFI_NOT_FOUND An element of the KeywordString was not found.
|
||||
@retval EFI_NOT_FOUND An element of the KeywordString was not found.
|
||||
See ProgressErr for more data.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
See ProgressErr for more data.
|
||||
|
||||
@retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
|
||||
|
||||
@retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
|
||||
for more data.
|
||||
|
||||
@retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
|
||||
@@ -2821,7 +2821,7 @@ Done:
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
EfiConfigKeywordHandlerSetData (
|
||||
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
|
||||
IN CONST EFI_STRING KeywordString,
|
||||
@@ -2974,7 +2974,7 @@ EfiConfigKeywordHandlerSetData (
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 9. Merge to the MultiKeywordResp string.
|
||||
//
|
||||
@@ -2991,7 +2991,7 @@ EfiConfigKeywordHandlerSetData (
|
||||
FreePool (KeywordData);
|
||||
FreePool (ValueElement);
|
||||
NameSpace = NULL;
|
||||
DevicePath = NULL;
|
||||
DevicePath = NULL;
|
||||
KeywordData = NULL;
|
||||
ValueElement = NULL;
|
||||
if (ConfigResp != NULL) {
|
||||
@@ -3013,7 +3013,7 @@ EfiConfigKeywordHandlerSetData (
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
*ProgressErr = KEYWORD_HANDLER_NO_ERROR;
|
||||
|
||||
Done:
|
||||
@@ -3049,56 +3049,56 @@ Done:
|
||||
|
||||
/**
|
||||
|
||||
This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
|
||||
This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
|
||||
keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
|
||||
EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
|
||||
|
||||
|
||||
If there is an issue in resolving the contents of the KeywordString, then the function
|
||||
returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
|
||||
appropriate information about where the issue occurred and additional data about the
|
||||
nature of the issue.
|
||||
|
||||
|
||||
In the case when KeywordString is NULL, or contains multiple keywords, or when
|
||||
EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
|
||||
contains values returned for all keywords processed prior to the keyword generating the
|
||||
contains values returned for all keywords processed prior to the keyword generating the
|
||||
error but no values for the keyword with error or any following keywords.
|
||||
|
||||
|
||||
|
||||
@param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
|
||||
|
||||
|
||||
@param NameSpaceId A null-terminated string containing the platform configuration
|
||||
language to search through in the system. If a NULL is passed
|
||||
in, then it is assumed that any platform configuration language
|
||||
with the prefix of "x-UEFI-" are searched.
|
||||
|
||||
|
||||
@param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
|
||||
NULL is passed in the KeywordString field, all of the known
|
||||
keywords in the system for the NameSpaceId specified are
|
||||
NULL is passed in the KeywordString field, all of the known
|
||||
keywords in the system for the NameSpaceId specified are
|
||||
returned in the Results field.
|
||||
|
||||
|
||||
@param Progress On return, points to a character in the KeywordString. Points
|
||||
to the string's NULL terminator if the request was successful.
|
||||
to the string's NULL terminator if the request was successful.
|
||||
Points to 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) if the request was not successful.
|
||||
|
||||
|
||||
@param ProgressErr If during the processing of the KeywordString there was a
|
||||
failure, this parameter gives additional information about the
|
||||
failure, this parameter gives additional information about the
|
||||
possible source of the problem. See the definitions in SetData()
|
||||
for valid value definitions.
|
||||
|
||||
|
||||
@param Results A null-terminated string in <MultiKeywordResp> format is returned
|
||||
which has all the values filled in for the keywords in the
|
||||
which has all the values filled in for the keywords in the
|
||||
KeywordString. This is a callee-allocated field, and must be freed
|
||||
by the caller after being used.
|
||||
by the caller after being used.
|
||||
|
||||
@retval EFI_SUCCESS The specified action was completed successfully.
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
||||
1.Progress, ProgressErr, or Results is NULL.
|
||||
2.Parsing of the KeywordString resulted in an error. See
|
||||
Progress and ProgressErr for more data.
|
||||
|
||||
|
||||
|
||||
@retval EFI_NOT_FOUND An element of the KeywordString was not found. See
|
||||
ProgressErr for more data.
|
||||
@@ -3108,7 +3108,7 @@ Done:
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
|
||||
ProgressErr for more data.
|
||||
|
||||
|
||||
@retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
|
||||
more data.
|
||||
|
||||
@@ -3117,12 +3117,12 @@ Done:
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
EfiConfigKeywordHandlerGetData (
|
||||
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
|
||||
IN CONST EFI_STRING NameSpaceId, OPTIONAL
|
||||
IN CONST EFI_STRING KeywordString, OPTIONAL
|
||||
OUT EFI_STRING *Progress,
|
||||
OUT EFI_STRING *Progress,
|
||||
OUT UINT32 *ProgressErr,
|
||||
OUT EFI_STRING *Results
|
||||
)
|
||||
@@ -3132,7 +3132,7 @@ EfiConfigKeywordHandlerGetData (
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
HII_DATABASE_RECORD *DataBaseRecord;
|
||||
CHAR16 *StringPtr;
|
||||
CHAR16 *NextStringPtr;
|
||||
CHAR16 *NextStringPtr;
|
||||
CHAR16 *KeywordData;
|
||||
EFI_STRING_ID KeywordStringId;
|
||||
UINT8 *OpCode;
|
||||
@@ -3188,7 +3188,7 @@ EfiConfigKeywordHandlerGetData (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (KeywordString != NULL) {
|
||||
//
|
||||
// Use temp string to avoid changing input string buffer.
|
||||
@@ -3208,7 +3208,7 @@ EfiConfigKeywordHandlerGetData (
|
||||
}
|
||||
StringPtr = NextStringPtr;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// 3. Process Keyword section from the input keywordRequest string.
|
||||
//
|
||||
@@ -3240,7 +3240,7 @@ EfiConfigKeywordHandlerGetData (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 3.4 Extract Value for the input keyword.
|
||||
//
|
||||
@@ -3293,7 +3293,7 @@ EfiConfigKeywordHandlerGetData (
|
||||
FreePool (KeywordData);
|
||||
FreePool (ValueElement);
|
||||
FreePool (ConfigRequest);
|
||||
DevicePath = NULL;
|
||||
DevicePath = NULL;
|
||||
KeywordData = NULL;
|
||||
ValueElement = NULL;
|
||||
ConfigRequest = NULL;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation for EFI_HII_DATABASE_PROTOCOL.
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, 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
|
||||
@@ -1431,7 +1431,7 @@ Error:
|
||||
|
||||
/**
|
||||
Adjust all string packages in a single package list to have the same max string ID.
|
||||
|
||||
|
||||
@param PackageList Pointer to a package list which will be adjusted.
|
||||
|
||||
@retval EFI_SUCCESS Adjust all string packages successfully.
|
||||
@@ -3154,7 +3154,7 @@ AddPackages (
|
||||
PackageHdrPtr = (EFI_HII_PACKAGE_HEADER *) ((UINT8 *) PackageHdrPtr + PackageHeader.Length);
|
||||
CopyMem (&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Adjust String Package to make sure all string packages have the same max string ID.
|
||||
//
|
||||
@@ -3520,7 +3520,7 @@ HiiNewPackageList (
|
||||
DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE);
|
||||
if (CompareGuid (
|
||||
&(DatabaseRecord->PackageList->PackageListHdr.PackageListGuid),
|
||||
&PackageListGuid) &&
|
||||
&PackageListGuid) &&
|
||||
DatabaseRecord->DriverHandle == DriverHandle) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -3992,7 +3992,7 @@ HiiListPackageLists (
|
||||
@retval EFI_NOT_FOUND The specified Handle could not be found in the
|
||||
current database.
|
||||
@retval EFI_INVALID_PARAMETER BufferSize was NULL.
|
||||
@retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
|
||||
@retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
|
||||
and Buffer was NULL.
|
||||
|
||||
**/
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Implementation for EFI_HII_FONT_PROTOCOL.
|
||||
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, 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
|
||||
@@ -304,14 +304,14 @@ NarrowGlyphToBlt (
|
||||
|
||||
Height = EFI_GLYPH_HEIGHT;
|
||||
Width = EFI_GLYPH_WIDTH;
|
||||
|
||||
|
||||
//
|
||||
// Move position to the left-top corner of char.
|
||||
//
|
||||
Buffer = *Origin - EFI_GLYPH_HEIGHT * ImageWidth;
|
||||
|
||||
//
|
||||
// Char may be partially displayed when CLIP_X or CLIP_Y is not set.
|
||||
// Char may be partially displayed when CLIP_X or CLIP_Y is not set.
|
||||
//
|
||||
if (RowHeight < Height) {
|
||||
Height = (UINT8) RowHeight;
|
||||
@@ -685,7 +685,7 @@ FindGlyphBlock (
|
||||
ASSERT (FontPackage->Signature == HII_FONT_PACKAGE_SIGNATURE);
|
||||
BaseLine = 0;
|
||||
MinOffsetY = 0;
|
||||
|
||||
|
||||
if (CharValue == (CHAR16) (-1)) {
|
||||
//
|
||||
// Collect the cell information specified in font package fixed header.
|
||||
@@ -1099,8 +1099,8 @@ IsSystemFontInfo (
|
||||
}
|
||||
if ((StringInfo->FontInfoMask & EFI_FONT_INFO_SYS_FORE_COLOR) == 0) {
|
||||
if (CompareMem (
|
||||
&StringInfo->ForegroundColor,
|
||||
&SystemDefault->ForegroundColor,
|
||||
&StringInfo->ForegroundColor,
|
||||
&SystemDefault->ForegroundColor,
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||
) != 0) {
|
||||
goto Exit;
|
||||
@@ -1108,8 +1108,8 @@ IsSystemFontInfo (
|
||||
}
|
||||
if ((StringInfo->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == 0) {
|
||||
if (CompareMem (
|
||||
&StringInfo->BackgroundColor,
|
||||
&SystemDefault->BackgroundColor,
|
||||
&StringInfo->BackgroundColor,
|
||||
&SystemDefault->BackgroundColor,
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||
) != 0) {
|
||||
goto Exit;
|
||||
@@ -1745,7 +1745,7 @@ HiiStringToImage (
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Use the maximum height of font as the base line.
|
||||
// And, use the maximum height as line height.
|
||||
@@ -1753,7 +1753,7 @@ HiiStringToImage (
|
||||
LineHeight = Height;
|
||||
LastLineHeight = Height;
|
||||
BaseLineOffset = Height - BaseLine;
|
||||
|
||||
|
||||
//
|
||||
// Parse the string to be displayed to drop some ignored characters.
|
||||
//
|
||||
@@ -1799,7 +1799,7 @@ HiiStringToImage (
|
||||
Index++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Status = GetGlyphBuffer (Private, *StringPtr, FontInfo, &GlyphBuf[Index], &Cell[Index], &Attributes[Index]);
|
||||
if (Status == EFI_NOT_FOUND) {
|
||||
if ((Flags & EFI_HII_IGNORE_IF_NO_GLYPH) == EFI_HII_IGNORE_IF_NO_GLYPH) {
|
||||
@@ -1971,8 +1971,8 @@ HiiStringToImage (
|
||||
// opportunity prior to a character whose right-most extent would exceed Width.
|
||||
// Search the right-most line-break opportunity here.
|
||||
//
|
||||
if ((Flags & EFI_HII_OUT_FLAG_WRAP) == EFI_HII_OUT_FLAG_WRAP &&
|
||||
(RowInfo[RowIndex].LineWidth + BltX > Image->Width || StringPtr[NextIndex] != 0) &&
|
||||
if ((Flags & EFI_HII_OUT_FLAG_WRAP) == EFI_HII_OUT_FLAG_WRAP &&
|
||||
(RowInfo[RowIndex].LineWidth + BltX > Image->Width || StringPtr[NextIndex] != 0) &&
|
||||
!LineBreak) {
|
||||
if ((Flags & EFI_HII_IGNORE_LINE_BREAK) == 0) {
|
||||
LineWidth = RowInfo[RowIndex].LineWidth;
|
||||
@@ -2040,7 +2040,7 @@ HiiStringToImage (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// LineWidth can't exceed Image width.
|
||||
//
|
||||
@@ -2091,7 +2091,7 @@ HiiStringToImage (
|
||||
);
|
||||
}
|
||||
if (ColumnInfoArray != NULL) {
|
||||
if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0)
|
||||
if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0)
|
||||
|| RowInfo[RowIndex].LineWidth == 0) {
|
||||
*ColumnInfoArray = (UINTN) ~0;
|
||||
} else {
|
||||
@@ -2119,7 +2119,7 @@ HiiStringToImage (
|
||||
FreePool (BltBuffer);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
FreePool (BltBuffer);
|
||||
}
|
||||
} else {
|
||||
@@ -2151,7 +2151,7 @@ HiiStringToImage (
|
||||
);
|
||||
}
|
||||
if (ColumnInfoArray != NULL) {
|
||||
if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0)
|
||||
if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0)
|
||||
|| RowInfo[RowIndex].LineWidth == 0) {
|
||||
*ColumnInfoArray = (UINTN) ~0;
|
||||
} else {
|
||||
@@ -2392,7 +2392,7 @@ HiiStringIdToImage (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
if (Language == NULL) {
|
||||
Language = "";
|
||||
}
|
||||
@@ -2409,7 +2409,7 @@ HiiStringIdToImage (
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
StringSize = MAX_STRING_LENGTH;
|
||||
String = (EFI_STRING) AllocateZeroPool (StringSize);
|
||||
if (String == NULL) {
|
||||
@@ -2447,33 +2447,33 @@ HiiStringIdToImage (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// When StringInfo specifies that string will be output in the system default font and color,
|
||||
// use particular stringfontinfo described in string package instead if exists.
|
||||
// use particular stringfontinfo described in string package instead if exists.
|
||||
// StringFontInfo equals NULL means system default font attaches with the string block.
|
||||
//
|
||||
if (StringFontInfo != NULL && IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *) StringInfo, NULL, NULL)) {
|
||||
NameSize = StrSize (StringFontInfo->FontName);
|
||||
FontLen = sizeof (EFI_FONT_DISPLAY_INFO) - sizeof (CHAR16) + NameSize;
|
||||
NewStringInfo = AllocateZeroPool (FontLen);
|
||||
if (NewStringInfo == NULL) {
|
||||
if (NewStringInfo == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Exit;
|
||||
}
|
||||
NewStringInfo->FontInfoMask = EFI_FONT_INFO_SYS_FORE_COLOR | EFI_FONT_INFO_SYS_BACK_COLOR;
|
||||
NewStringInfo->FontInfo.FontStyle = StringFontInfo->FontStyle;
|
||||
NewStringInfo->FontInfo.FontSize = StringFontInfo->FontSize;
|
||||
NewStringInfo->FontInfo.FontSize = StringFontInfo->FontSize;
|
||||
StrCpyS (NewStringInfo->FontInfo.FontName, NameSize / sizeof (CHAR16), StringFontInfo->FontName);
|
||||
|
||||
|
||||
Status = HiiStringToImage (
|
||||
This,
|
||||
Flags,
|
||||
String,
|
||||
NewStringInfo,
|
||||
Blt,
|
||||
BltX,
|
||||
BltY,
|
||||
This,
|
||||
Flags,
|
||||
String,
|
||||
NewStringInfo,
|
||||
Blt,
|
||||
BltX,
|
||||
BltY,
|
||||
RowInfoArray,
|
||||
RowInfoArraySize,
|
||||
ColumnInfoArray
|
||||
@@ -2640,7 +2640,7 @@ HiiGetGlyph (
|
||||
//
|
||||
BaseLine = (UINT16) (Cell.Height + Cell.OffsetY);
|
||||
//
|
||||
// Set BltBuffer to the position of Origin.
|
||||
// Set BltBuffer to the position of Origin.
|
||||
//
|
||||
BltBuffer = Image->Image.Bitmap + (Cell.Height + Cell.OffsetY) * Image->Width - Cell.OffsetX;
|
||||
GlyphToImage (
|
||||
@@ -2715,7 +2715,7 @@ Exit:
|
||||
@param StringInfoOut Upon return, contains the matching font's information.
|
||||
If NULL, then no information is returned. This buffer
|
||||
is allocated with a call to the Boot Service AllocatePool().
|
||||
It is the caller's responsibility to call the Boot
|
||||
It is the caller's responsibility to call the Boot
|
||||
Service FreePool() when the caller no longer requires
|
||||
the contents of StringInfoOut.
|
||||
@param String Points to the string which will be tested to
|
||||
@@ -2800,7 +2800,7 @@ HiiGetFontInfo (
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// StringInfoIn must not be NULL if it is not system default font info.
|
||||
//
|
||||
@@ -2808,15 +2808,15 @@ HiiGetFontInfo (
|
||||
//
|
||||
// Check the font information mask to make sure it is valid.
|
||||
//
|
||||
if (((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ==
|
||||
if (((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ==
|
||||
(EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ||
|
||||
((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ==
|
||||
((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ==
|
||||
(EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ||
|
||||
((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ==
|
||||
((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ==
|
||||
(EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ||
|
||||
((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ==
|
||||
(EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ||
|
||||
((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)) ==
|
||||
((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ==
|
||||
(EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ||
|
||||
((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)) ==
|
||||
(EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -2838,7 +2838,7 @@ HiiGetFontInfo (
|
||||
|
||||
if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_SIZE) == EFI_FONT_INFO_SYS_SIZE) {
|
||||
InfoOut.FontInfo.FontSize = SystemDefault->FontInfo.FontSize;
|
||||
}
|
||||
}
|
||||
if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_STYLE) == EFI_FONT_INFO_SYS_STYLE) {
|
||||
InfoOut.FontInfo.FontStyle = SystemDefault->FontInfo.FontStyle;
|
||||
}
|
||||
@@ -2848,7 +2848,7 @@ HiiGetFontInfo (
|
||||
if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == EFI_FONT_INFO_SYS_BACK_COLOR) {
|
||||
InfoOut.BackgroundColor = SystemDefault->BackgroundColor;
|
||||
}
|
||||
|
||||
|
||||
ASSERT (FontInfo != NULL);
|
||||
FontInfo->FontSize = InfoOut.FontInfo.FontSize;
|
||||
FontInfo->FontStyle = InfoOut.FontInfo.FontStyle;
|
||||
@@ -2856,7 +2856,7 @@ HiiGetFontInfo (
|
||||
if (IsFontInfoExisted (Private, FontInfo, &InfoOut.FontInfoMask, LocalFontHandle, &GlobalFont)) {
|
||||
//
|
||||
// Test to guarantee all characters are available in the found font.
|
||||
//
|
||||
//
|
||||
if (String != NULL) {
|
||||
StringIn = String;
|
||||
while (*StringIn != 0) {
|
||||
@@ -2873,21 +2873,21 @@ HiiGetFontInfo (
|
||||
//
|
||||
if (StringInfoOut != NULL) {
|
||||
StringInfoOutLen = sizeof (EFI_FONT_DISPLAY_INFO) - sizeof (EFI_FONT_INFO) + GlobalFont->FontInfoSize;
|
||||
*StringInfoOut = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (StringInfoOutLen);
|
||||
*StringInfoOut = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (StringInfoOutLen);
|
||||
if (*StringInfoOut == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
LocalFontHandle = NULL;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
CopyMem (*StringInfoOut, &InfoOut, sizeof (EFI_FONT_DISPLAY_INFO));
|
||||
CopyMem (&(*StringInfoOut)->FontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
|
||||
}
|
||||
|
||||
LocalFontHandle = GlobalFont->Entry.ForwardLink;
|
||||
|
||||
LocalFontHandle = GlobalFont->Entry.ForwardLink;
|
||||
Status = EFI_SUCCESS;
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
Status = EFI_NOT_FOUND;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Private structures definitions in HiiDatabase.
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, 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
|
||||
@@ -390,10 +390,10 @@ typedef struct _HII_DATABASE_PRIVATE_DATA {
|
||||
|
||||
@param BufferLen The length of the Buffer in bytes.
|
||||
|
||||
@param Buffer Points to a buffer which will be converted to be the
|
||||
@param Buffer Points to a buffer which will be converted to be the
|
||||
content of the generated string.
|
||||
|
||||
@param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
|
||||
@param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
|
||||
UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
|
||||
if 3, the buffer contains other data.
|
||||
|
||||
@@ -460,21 +460,21 @@ IsFontInfoExisted (
|
||||
/**
|
||||
|
||||
This function invokes the matching registered function.
|
||||
|
||||
|
||||
@param Private HII Database driver private structure.
|
||||
@param NotifyType The type of change concerning the database.
|
||||
@param PackageInstance Points to the package referred to by the notification.
|
||||
@param PackageType Package type
|
||||
@param Handle The handle of the package list which contains the specified package.
|
||||
|
||||
@retval EFI_SUCCESS Already checked all registered function and invoked
|
||||
|
||||
@retval EFI_SUCCESS Already checked all registered function and invoked
|
||||
if matched.
|
||||
@retval EFI_INVALID_PARAMETER Any input parameter is not valid.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
InvokeRegisteredFunction (
|
||||
IN HII_DATABASE_PRIVATE_DATA *Private,
|
||||
IN HII_DATABASE_PRIVATE_DATA *Private,
|
||||
IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
|
||||
IN VOID *PackageInstance,
|
||||
IN UINT8 PackageType,
|
||||
@@ -508,7 +508,7 @@ GetSystemFont (
|
||||
/**
|
||||
Parse all string blocks to find a String block specified by StringId.
|
||||
If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
|
||||
within this string package and backup its information. If LastStringId is
|
||||
within this string package and backup its information. If LastStringId is
|
||||
specified, the string id of last string block will also be output.
|
||||
If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
|
||||
|
||||
@@ -734,8 +734,8 @@ HiiStringToImage (
|
||||
RowInfoArray or Blt.
|
||||
@retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
|
||||
@retval EFI_INVALID_PARAMETER Flags were invalid combination.
|
||||
@retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
|
||||
in the specified PackageList.
|
||||
@retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
|
||||
in the specified PackageList.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -806,7 +806,7 @@ HiiGetGlyph (
|
||||
@param StringInfoOut Upon return, contains the matching font's information.
|
||||
If NULL, then no information is returned. This buffer
|
||||
is allocated with a call to the Boot Service AllocatePool().
|
||||
It is the caller's responsibility to call the Boot
|
||||
It is the caller's responsibility to call the Boot
|
||||
Service FreePool() when the caller no longer requires
|
||||
the contents of StringInfoOut.
|
||||
@param String Points to the string which will be tested to
|
||||
@@ -1067,7 +1067,7 @@ HiiDrawImage (
|
||||
@retval EFI_SUCCESS The image was successfully drawn.
|
||||
@retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
|
||||
@retval EFI_INVALID_PARAMETER The Blt was NULL.
|
||||
@retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
|
||||
@retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
|
||||
The specified PackageList is not in the database.
|
||||
|
||||
**/
|
||||
@@ -1654,7 +1654,7 @@ HiiListPackageLists (
|
||||
@retval EFI_NOT_FOUND The specified Handle could not be found in the
|
||||
current database.
|
||||
@retval EFI_INVALID_PARAMETER BufferSize was NULL.
|
||||
@retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
|
||||
@retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
|
||||
and Buffer was NULL.
|
||||
|
||||
**/
|
||||
@@ -1725,7 +1725,7 @@ HiiRegisterPackageNotify (
|
||||
unregistered.
|
||||
|
||||
@retval EFI_SUCCESS Notification is unregistered successfully.
|
||||
@retval EFI_NOT_FOUND The incoming notification handle does not exist
|
||||
@retval EFI_NOT_FOUND The incoming notification handle does not exist
|
||||
in current hii database.
|
||||
|
||||
**/
|
||||
@@ -1912,8 +1912,8 @@ HiiConfigRoutingExtractConfig (
|
||||
instance.
|
||||
@param Results Null-terminated Unicode string in
|
||||
<MultiConfigAltResp> format which has all values
|
||||
filled in for the entirety of the current HII
|
||||
database. String to be allocated by the called
|
||||
filled in for the entirety of the current HII
|
||||
database. String to be allocated by the called
|
||||
function. De-allocation is up to the caller.
|
||||
|
||||
@retval EFI_SUCCESS The Results string is filled with the values
|
||||
@@ -2064,7 +2064,7 @@ HiiBlockToConfig (
|
||||
value pair. Block is left updated and
|
||||
Progress points at the '&' preceding the first
|
||||
non-<BlockName>.
|
||||
@retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
|
||||
@retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
|
||||
BlockSize is updated with the required buffer size.
|
||||
|
||||
**/
|
||||
@@ -2136,18 +2136,18 @@ HiiGetAltCfg (
|
||||
This function accepts a <MultiKeywordResp> formatted string, finds the associated
|
||||
keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
|
||||
EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
|
||||
|
||||
If there is an issue in resolving the contents of the KeywordString, then the
|
||||
function returns an error and also sets the Progress and ProgressErr with the
|
||||
|
||||
If there is an issue in resolving the contents of the KeywordString, then the
|
||||
function returns an error and also sets the Progress and ProgressErr with the
|
||||
appropriate information about where the issue occurred and additional data about
|
||||
the nature of the issue.
|
||||
|
||||
the nature of the issue.
|
||||
|
||||
In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
|
||||
error is generated during processing the second or later keyword element, the system
|
||||
storage associated with earlier keywords is not modified. All elements of the
|
||||
storage associated with earlier keywords is not modified. All elements of the
|
||||
KeywordString must successfully pass all tests for format and access prior to making
|
||||
any modifications to storage.
|
||||
|
||||
|
||||
In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
|
||||
containing multiple keywords, the state of storage associated with earlier keywords
|
||||
is undefined.
|
||||
@@ -2155,18 +2155,18 @@ HiiGetAltCfg (
|
||||
|
||||
@param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
|
||||
|
||||
@param KeywordString A null-terminated string in <MultiKeywordResp> format.
|
||||
@param KeywordString A null-terminated string in <MultiKeywordResp> format.
|
||||
|
||||
@param Progress On return, points to a character in the KeywordString.
|
||||
Points to the string's NULL terminator if the request
|
||||
was successful. Points to the most recent '&' before
|
||||
@param Progress On return, points to a character in the KeywordString.
|
||||
Points to the string's NULL terminator if the request
|
||||
was successful. Points to 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) if the request was not successful.
|
||||
|
||||
@param ProgressErr If during the processing of the KeywordString there was
|
||||
a failure, this parameter gives additional information
|
||||
about the possible source of the problem. The various
|
||||
a failure, this parameter gives additional information
|
||||
about the possible source of the problem. The various
|
||||
errors are defined in "Related Definitions" below.
|
||||
|
||||
|
||||
@@ -2174,16 +2174,16 @@ HiiGetAltCfg (
|
||||
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
||||
1. KeywordString is NULL.
|
||||
2. Parsing of the KeywordString resulted in an
|
||||
2. Parsing of the KeywordString resulted in an
|
||||
error. See Progress and ProgressErr for more data.
|
||||
|
||||
@retval EFI_NOT_FOUND An element of the KeywordString was not found.
|
||||
@retval EFI_NOT_FOUND An element of the KeywordString was not found.
|
||||
See ProgressErr for more data.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
See ProgressErr for more data.
|
||||
|
||||
@retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
|
||||
|
||||
@retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
|
||||
for more data.
|
||||
|
||||
@retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
|
||||
@@ -2191,7 +2191,7 @@ HiiGetAltCfg (
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
EfiConfigKeywordHandlerSetData (
|
||||
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
|
||||
IN CONST EFI_STRING KeywordString,
|
||||
@@ -2201,56 +2201,56 @@ EfiConfigKeywordHandlerSetData (
|
||||
|
||||
/**
|
||||
|
||||
This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
|
||||
This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
|
||||
keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
|
||||
EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
|
||||
|
||||
|
||||
If there is an issue in resolving the contents of the KeywordString, then the function
|
||||
returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
|
||||
appropriate information about where the issue occurred and additional data about the
|
||||
nature of the issue.
|
||||
|
||||
|
||||
In the case when KeywordString is NULL, or contains multiple keywords, or when
|
||||
EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
|
||||
contains values returned for all keywords processed prior to the keyword generating the
|
||||
contains values returned for all keywords processed prior to the keyword generating the
|
||||
error but no values for the keyword with error or any following keywords.
|
||||
|
||||
|
||||
|
||||
@param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
|
||||
|
||||
|
||||
@param NameSpaceId A null-terminated string containing the platform configuration
|
||||
language to search through in the system. If a NULL is passed
|
||||
in, then it is assumed that any platform configuration language
|
||||
with the prefix of "x-UEFI-" are searched.
|
||||
|
||||
|
||||
@param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
|
||||
NULL is passed in the KeywordString field, all of the known
|
||||
keywords in the system for the NameSpaceId specified are
|
||||
NULL is passed in the KeywordString field, all of the known
|
||||
keywords in the system for the NameSpaceId specified are
|
||||
returned in the Results field.
|
||||
|
||||
|
||||
@param Progress On return, points to a character in the KeywordString. Points
|
||||
to the string's NULL terminator if the request was successful.
|
||||
to the string's NULL terminator if the request was successful.
|
||||
Points to 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) if the request was not successful.
|
||||
|
||||
|
||||
@param ProgressErr If during the processing of the KeywordString there was a
|
||||
failure, this parameter gives additional information about the
|
||||
failure, this parameter gives additional information about the
|
||||
possible source of the problem. See the definitions in SetData()
|
||||
for valid value definitions.
|
||||
|
||||
|
||||
@param Results A null-terminated string in <MultiKeywordResp> format is returned
|
||||
which has all the values filled in for the keywords in the
|
||||
which has all the values filled in for the keywords in the
|
||||
KeywordString. This is a callee-allocated field, and must be freed
|
||||
by the caller after being used.
|
||||
by the caller after being used.
|
||||
|
||||
@retval EFI_SUCCESS The specified action was completed successfully.
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
||||
1.Progress, ProgressErr, or Results is NULL.
|
||||
2.Parsing of the KeywordString resulted in an error. See
|
||||
Progress and ProgressErr for more data.
|
||||
|
||||
|
||||
|
||||
@retval EFI_NOT_FOUND An element of the KeywordString was not found. See
|
||||
ProgressErr for more data.
|
||||
@@ -2260,7 +2260,7 @@ EfiConfigKeywordHandlerSetData (
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
|
||||
ProgressErr for more data.
|
||||
|
||||
|
||||
@retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
|
||||
more data.
|
||||
|
||||
@@ -2269,12 +2269,12 @@ EfiConfigKeywordHandlerSetData (
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
EfiConfigKeywordHandlerGetData (
|
||||
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
|
||||
IN CONST EFI_STRING NameSpaceId, OPTIONAL
|
||||
IN CONST EFI_STRING KeywordString, OPTIONAL
|
||||
OUT EFI_STRING *Progress,
|
||||
OUT EFI_STRING *Progress,
|
||||
OUT UINT32 *ProgressErr,
|
||||
OUT EFI_STRING *Results
|
||||
);
|
||||
@@ -2298,11 +2298,11 @@ HiiCompareLanguage (
|
||||
|
||||
/**
|
||||
Retrieves a pointer to a Null-terminated ASCII string containing the list
|
||||
of languages that an HII handle in the HII Database supports. The returned
|
||||
of languages that an HII handle in the HII Database supports. The returned
|
||||
string is allocated using AllocatePool(). The caller is responsible for freeing
|
||||
the returned string using FreePool(). The format of the returned string follows
|
||||
the language format assumed the HII Database.
|
||||
|
||||
|
||||
If HiiHandle is NULL, then ASSERT().
|
||||
|
||||
@param[in] HiiHandle A handle that was previously registered in the HII Database.
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// This driver produces all required HII serivces that includes HiiDataBase, HiiString,
|
||||
// HiiFont, HiiConfigRouting. To support UEFI HII, this driver is required.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, 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
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -4,14 +4,14 @@
|
||||
# This driver produces all required HII serivces that includes HiiDataBase, HiiString,
|
||||
# HiiFont, HiiConfigRouting. To support UEFI HII, this driver is required.
|
||||
#
|
||||
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, 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
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
@@ -81,7 +81,7 @@
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang ## CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdNvStoreDefaultValueBuffer ## CONSUMES
|
||||
|
||||
[Guids]
|
||||
[Guids]
|
||||
#
|
||||
# Event registered to EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group,
|
||||
# which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout().
|
||||
|
@@ -2,7 +2,7 @@
|
||||
This file contains the entry code to the HII database, which is defined by
|
||||
UEFI 2.1 specification.
|
||||
|
||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, 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
|
||||
@@ -188,7 +188,7 @@ InitializeHiiDatabase (
|
||||
ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiStringProtocolGuid);
|
||||
ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiConfigRoutingProtocolGuid);
|
||||
ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiConfigKeywordHandlerProtocolGuid);
|
||||
|
||||
|
||||
InitializeListHead (&mPrivate.DatabaseList);
|
||||
InitializeListHead (&mPrivate.DatabaseNotifyList);
|
||||
InitializeListHead (&mPrivate.HiiHandleList);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// HiiDatabase Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, 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
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"HII Database DXE Driver"
|
||||
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Implementation for EFI_HII_IMAGE_PROTOCOL.
|
||||
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, 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
|
||||
@@ -1018,7 +1018,7 @@ HiiGetImage (
|
||||
|
||||
@retval EFI_SUCCESS The new image was updated successfully.
|
||||
@retval EFI_NOT_FOUND The image specified by ImageId is not in the
|
||||
database. The specified PackageList is not in the database.
|
||||
database. The specified PackageList is not in the database.
|
||||
@retval EFI_INVALID_PARAMETER The Image was NULL.
|
||||
|
||||
**/
|
||||
@@ -1426,8 +1426,8 @@ HiiDrawImage (
|
||||
@retval EFI_SUCCESS The image was successfully drawn.
|
||||
@retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
|
||||
@retval EFI_INVALID_PARAMETER The Blt was NULL.
|
||||
@retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
|
||||
The specified PackageList is not in the database.
|
||||
@retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
|
||||
The specified PackageList is not in the database.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Implementation for EFI_HII_STRING_PROTOCOL.
|
||||
|
||||
|
||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -236,7 +236,7 @@ GetStringFontInfo (
|
||||
/**
|
||||
Parse all string blocks to find a String block specified by StringId.
|
||||
If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
|
||||
within this string package and backup its information. If LastStringId is
|
||||
within this string package and backup its information. If LastStringId is
|
||||
specified, the string id of last string block will also be output.
|
||||
If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
|
||||
|
||||
@@ -524,7 +524,7 @@ FindStringBlock (
|
||||
// Since string package tool set FontId initially to 0 and increases it
|
||||
// progressively by one, StringPackage->FondId always represents an unique
|
||||
// and available FontId.
|
||||
//
|
||||
//
|
||||
StringPackage->FontId++;
|
||||
|
||||
FreePool (FontInfo);
|
||||
@@ -574,7 +574,7 @@ FindStringBlock (
|
||||
*StartStringId = CurrentStringId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get last string ID
|
||||
//
|
||||
@@ -681,7 +681,7 @@ GetStringWorker (
|
||||
}
|
||||
|
||||
//
|
||||
// Get the string font. The FontId 0 is the default font for those string blocks which
|
||||
// Get the string font. The FontId 0 is the default font for those string blocks which
|
||||
// do not specify a font identifier. If default font is not specified, return NULL.
|
||||
//
|
||||
if (StringFontInfo != NULL) {
|
||||
@@ -706,17 +706,17 @@ GetStringWorker (
|
||||
|
||||
/**
|
||||
If GetStringBlock find the StringId's string is not saved in the exist string block,
|
||||
this function will create the UCS2 string block to save the string; also split the
|
||||
this function will create the UCS2 string block to save the string; also split the
|
||||
skip block into two or one skip block.
|
||||
|
||||
This is a internal function.
|
||||
|
||||
|
||||
@param StringPackage Hii string package instance.
|
||||
@param StartStringId The first id in the skip block which StringId in the block.
|
||||
@param StringId The string's id, which is unique within
|
||||
PackageList.
|
||||
@param BlockType Output the block type of found string block.
|
||||
@param StringBlockAddr Output the block address of found string block.
|
||||
PackageList.
|
||||
@param BlockType Output the block type of found string block.
|
||||
@param StringBlockAddr Output the block address of found string block.
|
||||
@param FontBlock whether this string block has font info.
|
||||
|
||||
@retval EFI_SUCCESS The string font is outputted successfully.
|
||||
@@ -735,7 +735,7 @@ InsertLackStringBlock (
|
||||
{
|
||||
UINT8 *BlockPtr;
|
||||
UINT8 *StringBlock;
|
||||
UINT32 SkipLen;
|
||||
UINT32 SkipLen;
|
||||
UINT32 OldBlockSize;
|
||||
UINT32 NewBlockSize;
|
||||
UINT32 FrontSkipNum;
|
||||
@@ -746,7 +746,7 @@ InsertLackStringBlock (
|
||||
FrontSkipNum = 0;
|
||||
SkipLen = 0;
|
||||
OldStringAddr = *StringBlockAddr;
|
||||
|
||||
|
||||
ASSERT (*BlockType == EFI_HII_SIBT_SKIP1 || *BlockType == EFI_HII_SIBT_SKIP2);
|
||||
//
|
||||
// Old skip block size.
|
||||
@@ -757,7 +757,7 @@ InsertLackStringBlock (
|
||||
} else {
|
||||
SkipLen = sizeof (EFI_HII_SIBT_SKIP2_BLOCK);
|
||||
IdCount = *(UINT16*)(OldStringAddr + sizeof (EFI_HII_STRING_BLOCK));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// New create UCS or UCS2 block size.
|
||||
@@ -801,7 +801,7 @@ InsertLackStringBlock (
|
||||
//
|
||||
// Copy old block in front of skip block.
|
||||
//
|
||||
CopyMem (StringBlock, StringPackage->StringBlock, OldStringAddr - StringPackage->StringBlock);
|
||||
CopyMem (StringBlock, StringPackage->StringBlock, OldStringAddr - StringPackage->StringBlock);
|
||||
BlockPtr = StringBlock + (OldStringAddr - StringPackage->StringBlock);
|
||||
|
||||
if (FrontSkipNum > 0) {
|
||||
@@ -838,7 +838,7 @@ InsertLackStringBlock (
|
||||
//
|
||||
// Append a EFI_HII_SIBT_END block to the end.
|
||||
//
|
||||
CopyMem (BlockPtr, OldStringAddr + SkipLen, OldBlockSize - (OldStringAddr - StringPackage->StringBlock) - SkipLen);
|
||||
CopyMem (BlockPtr, OldStringAddr + SkipLen, OldBlockSize - (OldStringAddr - StringPackage->StringBlock) - SkipLen);
|
||||
|
||||
if (FontBlock) {
|
||||
*BlockType = EFI_HII_SIBT_STRING_UCS2_FONT;
|
||||
@@ -918,9 +918,9 @@ SetStringWorker (
|
||||
&StartStringId
|
||||
);
|
||||
if (EFI_ERROR (Status) && (BlockType == EFI_HII_SIBT_SKIP1 || BlockType == EFI_HII_SIBT_SKIP2)) {
|
||||
Status = InsertLackStringBlock(StringPackage,
|
||||
StartStringId,
|
||||
StringId,
|
||||
Status = InsertLackStringBlock(StringPackage,
|
||||
StartStringId,
|
||||
StringId,
|
||||
&BlockType,
|
||||
&StringBlockAddr,
|
||||
(BOOLEAN)(StringFontInfo != NULL)
|
||||
@@ -947,11 +947,11 @@ SetStringWorker (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
} else {
|
||||
Referred = ReferFontInfoLocally (
|
||||
Private,
|
||||
StringPackage,
|
||||
StringPackage->FontId,
|
||||
FALSE,
|
||||
GlobalFont,
|
||||
Private,
|
||||
StringPackage,
|
||||
StringPackage->FontId,
|
||||
FALSE,
|
||||
GlobalFont,
|
||||
&LocalFont
|
||||
);
|
||||
if (!Referred) {
|
||||
@@ -962,7 +962,7 @@ SetStringWorker (
|
||||
// Update the FontId of the specified string block to input font info.
|
||||
//
|
||||
switch (BlockType) {
|
||||
case EFI_HII_SIBT_STRING_SCSU_FONT:
|
||||
case EFI_HII_SIBT_STRING_SCSU_FONT:
|
||||
case EFI_HII_SIBT_STRINGS_SCSU_FONT:
|
||||
case EFI_HII_SIBT_STRING_UCS2_FONT:
|
||||
case EFI_HII_SIBT_STRINGS_UCS2_FONT:
|
||||
@@ -973,7 +973,7 @@ SetStringWorker (
|
||||
// When modify the font info of these blocks, the block type should be updated
|
||||
// to contain font info thus the whole structure should be revised.
|
||||
// It is recommended to use tool to modify the block type not in the code.
|
||||
//
|
||||
//
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
@@ -1004,7 +1004,7 @@ SetStringWorker (
|
||||
}
|
||||
*BlockPtr++ = 0;
|
||||
|
||||
|
||||
|
||||
TmpSize = OldBlockSize - (StringTextPtr - StringPackage->StringBlock) - AsciiStrSize ((CHAR8 *) StringTextPtr);
|
||||
CopyMem (
|
||||
BlockPtr,
|
||||
@@ -1107,9 +1107,9 @@ SetStringWorker (
|
||||
|
||||
/**
|
||||
This function adds the string String to the group of strings owned by PackageList, with the
|
||||
specified font information StringFontInfo and returns a new string id.
|
||||
The new string identifier is guaranteed to be unique within the package list.
|
||||
That new string identifier is reserved for all languages in the package list.
|
||||
specified font information StringFontInfo and returns a new string id.
|
||||
The new string identifier is guaranteed to be unique within the package list.
|
||||
That new string identifier is reserved for all languages in the package list.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_HII_STRING_PROTOCOL instance.
|
||||
@@ -1341,7 +1341,7 @@ HiiNewString (
|
||||
// Calculate the length of the string blocks, including string block to record
|
||||
// printable language full name and EFI_HII_SIBT_END_BLOCK.
|
||||
//
|
||||
Ucs2BlockSize = (UINT32) (StrSize ((CHAR16 *) LanguageName) +
|
||||
Ucs2BlockSize = (UINT32) (StrSize ((CHAR16 *) LanguageName) +
|
||||
(*StringId - 1) * sizeof (EFI_HII_SIBT_STRING_UCS2_BLOCK) - sizeof (CHAR16));
|
||||
|
||||
BlockSize = Ucs2BlockSize + sizeof (EFI_HII_SIBT_END_BLOCK);
|
||||
@@ -1519,7 +1519,7 @@ HiiNewString (
|
||||
PackageListNode->PackageListHdr.PackageLength += FontBlockSize + Ucs2FontBlockSize;
|
||||
|
||||
//
|
||||
// Increase the FontId to make it unique since we already add
|
||||
// Increase the FontId to make it unique since we already add
|
||||
// a EFI_HII_SIBT_FONT block to this string package.
|
||||
//
|
||||
StringPackage->FontId++;
|
||||
@@ -1671,16 +1671,16 @@ HiiGetString (
|
||||
//
|
||||
// Second search: to match the StringId in other available languages if exist.
|
||||
//
|
||||
for (Link = PackageListNode->StringPkgHdr.ForwardLink;
|
||||
for (Link = PackageListNode->StringPkgHdr.ForwardLink;
|
||||
Link != &PackageListNode->StringPkgHdr;
|
||||
Link = Link->ForwardLink
|
||||
) {
|
||||
StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
|
||||
StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
|
||||
Status = GetStringWorker (Private, StringPackage, StringId, NULL, NULL, NULL);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
return EFI_INVALID_LANGUAGE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
@@ -1940,7 +1940,7 @@ HiiGetSecondaryLanguages (
|
||||
|
||||
Private = HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS (This);
|
||||
|
||||
PackageListNode = NULL;
|
||||
PackageListNode = NULL;
|
||||
for (Link = Private->DatabaseList.ForwardLink; Link != &Private->DatabaseList; Link = Link->ForwardLink) {
|
||||
DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE);
|
||||
if (DatabaseRecord->Handle == PackageList) {
|
||||
@@ -1951,7 +1951,7 @@ HiiGetSecondaryLanguages (
|
||||
if (PackageListNode == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
Languages = NULL;
|
||||
ResultSize = 0;
|
||||
for (Link1 = PackageListNode->StringPkgHdr.ForwardLink;
|
||||
|
Reference in New Issue
Block a user