clean up for IPF ICC tool chain.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6445 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2008-11-10 13:27:09 +00:00
parent d51cf796da
commit 98b16b9dad
8 changed files with 14 additions and 88 deletions

View File

@ -229,7 +229,6 @@ UninstallDefaultConfigAccessProtocol (
{
EFI_STATUS Status;
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
CONFIG_ACCESS_PRIVATE *ConfigAccessInstance;
HiiLibDestroyHiiDriverHandle (ThunkContext->UefiHiiDriverHandle);
@ -247,8 +246,6 @@ UninstallDefaultConfigAccessProtocol (
);
ASSERT_EFI_ERROR (Status);
ConfigAccessInstance = CONFIG_ACCESS_PRIVATE_FROM_PROTOCOL (ConfigAccess);
}
@ -487,7 +484,7 @@ ThunkRouteConfig (
EFI_STATUS Status;
CONFIG_ACCESS_PRIVATE *ConfigAccess;
FORMSET_STORAGE *BufferStorage;
UINT8 *Data;
VOID *Data;
UINTN DataSize;
UINTN DataSize2;
UINTN LastModifiedByteIndex;

View File

@ -109,7 +109,7 @@ HiiGetGlyph (
for (Ypos = 0; Ypos < EFI_GLYPH_HEIGHT; Ypos++) {
for (Xpos = 0; Xpos < EFI_GLYPH_WIDTH; Xpos++) {
if (CompareMem (&Blt->Image.Bitmap[Ypos * EFI_GLYPH_WIDTH + Xpos], &mSysFGColor, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)) == 0) {
mNarrowGlyphBuffer.GlyphCol1[Ypos] |= 1 << (EFI_GLYPH_WIDTH - 1 - Xpos);
mNarrowGlyphBuffer.GlyphCol1[Ypos] = (UINT8) (mNarrowGlyphBuffer.GlyphCol1[Ypos] | (1 << (EFI_GLYPH_WIDTH - 1 - Xpos)));
}
}
}

View File

@ -42,7 +42,7 @@ AllocateHiiHandle (
for (Index = 0; Index < sizeof (mHandle) * 8; Index++) {
if ((mHandle[Index / 8] & (1 << (Index % 8))) == 0) {
mHandle[Index / 8] |= (1 << (Index % 8));
mHandle[Index / 8] = (UINT8) (mHandle[Index / 8] | (1 << (Index % 8)));
*Handle = (FRAMEWORK_EFI_HII_HANDLE) Index;
ASSERT (*Handle != 0);
return EFI_SUCCESS;
@ -62,5 +62,5 @@ FreeHiiHandle (
Num = (UINT16) Handle;
ASSERT ((mHandle [Num / 8] & (1 << (Num % 8))) != 0);
mHandle [Num / 8] &= (~(1 << (Num % 8)));
mHandle [Num / 8] = (UINT8) (mHandle [Num / 8] & (~(1 << (Num % 8))));
}

View File

@ -268,7 +268,7 @@ F2UCreateGotoOpCode (
// We only map FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE and FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED to
// UEFI IFR Opcode flags. The rest flags are obsolete.
//
UOpcode.Question.Flags = (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
UOpcode.Question.Flags = (UINT8) (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
return AppendToUpdateBuffer ((UINT8 *) &UOpcode, sizeof(UOpcode), UefiData);
@ -328,7 +328,7 @@ F2UCreateOneOfOptionOpCode (
// #define EFI_IFR_OPTION_DEFAULT 0x10
// #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
//
UOpcode.Flags |= (UINT8) ((FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_DEFAULT | FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING)) << 4);
UOpcode.Flags = (UINT8) (UOpcode.Flags | (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_DEFAULT | FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING)) << 4);
switch (Width) {
case 1:
@ -716,7 +716,7 @@ F2UCreateCheckBoxOpCode (
// FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED,
// to UEFI IFR Opcode Question flags. The rest flags are obsolete.
//
UOpcode.Question.Flags = (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
UOpcode.Question.Flags = (UINT8) (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
//
// We also map 2 flags:
@ -724,7 +724,7 @@ F2UCreateCheckBoxOpCode (
// FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING,
// to UEFI IFR CheckBox Opcode default flags.
//
UOpcode.Flags = (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_DEFAULT | FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING));
UOpcode.Flags = (UINT8) (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_DEFAULT | FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING));
return AppendToUpdateBuffer ((UINT8 *) &UOpcode, sizeof(UOpcode), UefiData);
}
@ -830,7 +830,7 @@ F2UCreateNumericOpCode (
UOpcode.Question.VarStoreId = VarStoreId;
UOpcode.Question.VarStoreInfo.VarOffset = FwOpcode->QuestionId;
UOpcode.Question.Flags = (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
UOpcode.Question.Flags = (UINT8) (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
//
// Framework Numeric values are all in UINT16 and displayed as decimal.
@ -961,7 +961,7 @@ F2UCreateStringOpCode (
UOpcode.Question.VarStoreId = FRAMEWORK_RESERVED_VARSTORE_ID;
UOpcode.Question.VarStoreInfo.VarOffset = FwOpcode->QuestionId;
UOpcode.Question.Flags = (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
UOpcode.Question.Flags = (UINT8) (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
UOpcode.MinSize = FwOpcode->MinSize;
UOpcode.MaxSize = FwOpcode->MaxSize;

View File

@ -38,7 +38,7 @@ ConvertIso639ToRfc3066 (
if (AsciiLanguage [Index] == 0) {
break;
} else if (AsciiLanguage [Index] >= 'A' && AsciiLanguage [Index] <= 'Z') {
AsciiLanguage [Index] = AsciiLanguage [Index] - 'A' + 'a';
AsciiLanguage [Index] = (CHAR8) (AsciiLanguage [Index] - 'A' + 'a');
}
}

View File

@ -339,6 +339,7 @@ GetBufferTypeDefaultId (
if (Storage->Type == EFI_HII_VARSTORE_BUFFER) {
Status = GetBufferTypeDefaultIdAndStorageId (DefaultStore, Storage, FormSet, UefiDefaultsListHead);
ASSERT_EFI_ERROR (Status);
}
StorageLink = GetNextNode (&FormSet->StorageListHead, StorageLink);

View File

@ -509,13 +509,6 @@ ParseOpCodes (
UINT16 NumberOfStatement;
UINT16 NumberOfExpression;
EFI_IMAGE_ID *ImageId;
BOOLEAN SuppressForOption;
BOOLEAN InScopeOptionSuppress;
BOOLEAN InScopeDisable;
UINT16 DepthOfDisable;
BOOLEAN OpCodeDisabled;
BOOLEAN SingleOpCodeExpression;
BOOLEAN InScopeDefault;
EFI_HII_VALUE *Value;
LIST_ENTRY *OneOfOptinMapEntryListHead;
EFI_IFR_GUID_OPTIONKEY *OptionMap;
@ -525,15 +518,8 @@ ParseOpCodes (
EFI_IFR_ONE_OF *OneOfOpcode;
mInScopeSubtitle = FALSE;
SuppressForOption = FALSE;
mInScopeSuppress = FALSE;
InScopeOptionSuppress = FALSE;
mInScopeGrayOut = FALSE;
InScopeDisable = FALSE;
DepthOfDisable = 0;
OpCodeDisabled = FALSE;
SingleOpCodeExpression = FALSE;
InScopeDefault = FALSE;
CurrentDefault = NULL;
CurrentOption = NULL;
@ -580,31 +566,6 @@ ParseOpCodes (
PushScope (Operand);
}
if (OpCodeDisabled) {
//
// DisableIf Expression is evaluated to be TRUE, try to find its end.
// Here only cares the EFI_IFR_DISABLE_IF and EFI_IFR_END
//
if (Operand == EFI_IFR_DISABLE_IF_OP) {
DepthOfDisable++;
} else if (Operand == EFI_IFR_END_OP) {
Status = PopScope (&ScopeOpCode);
if (EFI_ERROR (Status)) {
return Status;
}
if (ScopeOpCode == EFI_IFR_DISABLE_IF_OP) {
if (DepthOfDisable == 0) {
InScopeDisable = FALSE;
OpCodeDisabled = FALSE;
} else {
DepthOfDisable--;
}
}
}
continue;
}
if (IsExpressionOpCode (Operand)) {
continue;
}
@ -801,13 +762,9 @@ ParseOpCodes (
break;
}
if ((Operand == EFI_IFR_ONE_OF_OP) && Scope) {
SuppressForOption = TRUE;
}
if (Operand == EFI_IFR_ONE_OF_OP) {
OneOfOpcode = (EFI_IFR_ONE_OF *) OpCodeData;
OneOfType = OneOfOpcode->Flags & EFI_IFR_NUMERIC_SIZE;
OneOfType = (UINT8) (OneOfOpcode->Flags & EFI_IFR_NUMERIC_SIZE);
}
break;
@ -826,9 +783,6 @@ ParseOpCodes (
CurrentStatement->HiiValue.Type = EFI_IFR_TYPE_OTHER;
CurrentStatement->BufferValue = AllocateZeroPool (CurrentStatement->StorageWidth);
if (Scope) {
SuppressForOption = TRUE;
}
break;
case EFI_IFR_CHECKBOX_OP:
@ -913,9 +867,6 @@ ParseOpCodes (
//
InsertTailList (&CurrentStatement->DefaultListHead, &CurrentDefault->Link);
if (Scope) {
InScopeDefault = TRUE;
}
break;
//
@ -1110,32 +1061,10 @@ ParseOpCodes (
//
break;
case EFI_IFR_SUPPRESS_IF_OP:
if (SuppressForOption) {
InScopeOptionSuppress = FALSE;
} else {
mInScopeSuppress = FALSE;
}
break;
case EFI_IFR_GRAY_OUT_IF_OP:
mInScopeGrayOut = FALSE;
break;
case EFI_IFR_DISABLE_IF_OP:
InScopeDisable = FALSE;
OpCodeDisabled = FALSE;
break;
case EFI_IFR_ONE_OF_OP:
case EFI_IFR_ORDERED_LIST_OP:
SuppressForOption = FALSE;
break;
case EFI_IFR_DEFAULT_OP:
InScopeDefault = FALSE;
break;
default:
if (IsExpressionOpCode (ScopeOpCode)) {
}

View File

@ -411,7 +411,6 @@ GetFormsetDefaultVarstoreId (
{
LIST_ENTRY *StorageList;
FORMSET_STORAGE *Storage;
EFI_VARSTORE_ID FirstVarStoreId;
//
// VarStoreId 0 is invalid in UEFI IFR.
@ -436,7 +435,7 @@ GetFormsetDefaultVarstoreId (
StorageList = GetFirstNode (&FormSet->StorageListHead);
if (!IsNull (&FormSet->StorageListHead, StorageList)) {
Storage = FORMSET_STORAGE_FROM_LINK (StorageList);
FirstVarStoreId = Storage->VarStoreId;
FormSet->DefaultVarStoreId = Storage->VarStoreId;
}
}