Sync BaseTools Branch (version r2321) to EDKII main trunk.

Signed-off-by: lgao4
Reviewed-by: gikidy


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12372 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2011-09-18 12:17:25 +00:00
parent e7fe402863
commit b36d134faf
102 changed files with 2221 additions and 1060 deletions

View File

@@ -56,7 +56,7 @@ Returns:
--*/
{
printf ("%s v%d.%d - Utility to break a file into two pieces at the specified offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
printf ("%s v%d.%d %s - Utility to break a file into two pieces at the specified offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");
}

View File

@@ -979,6 +979,14 @@ Returns:
ImageContext,
Section->VirtualAddress + Section->Misc.VirtualSize - 1
);
//
// If the base start or end address resolved to 0, then fail.
//
if ((Base == NULL) || (End == NULL)) {
ImageContext->ImageError = IMAGE_ERROR_SECTION_NOT_LOADED;
return RETURN_LOAD_ERROR;
}
if (ImageContext->IsTeImage) {
Base = (CHAR8 *) ((UINTN) Base + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);
End = (CHAR8 *) ((UINTN) End + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);
@@ -987,13 +995,6 @@ Returns:
if (End > MaxEnd) {
MaxEnd = End;
}
//
// If the base start or end address resolved to 0, then fail.
//
if ((Base == NULL) || (End == NULL)) {
ImageContext->ImageError = IMAGE_ERROR_SECTION_NOT_LOADED;
return RETURN_LOAD_ERROR;
}
//
// Read the section

View File

@@ -23,6 +23,7 @@ Abstract:
#define _EFI_COMMON_LIB_H
#include <Common/UefiBaseTypes.h>
#include <Common/BuildVersion.h>
#define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination
//
// Function declarations

View File

@@ -83,7 +83,7 @@ Returns:
--*/
{
printf ("%s v%d.%d -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
printf ("%s v%d.%d %s -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");
}

View File

@@ -1173,7 +1173,7 @@ Returns:
Nothing.
--*/
{
fprintf (stdout, "%s Version %d.%d\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
static

View File

@@ -28,6 +28,7 @@ Abstract:
#include "ParseInf.h"
#include "EfiUtilityMsgs.h"
#include "CommonLib.h"
//
// Utility Name
@@ -541,7 +542,7 @@ Returns:
--*/
{
printf ("%s v%d.%d -Utility to retrieve and update the boot sector or MBR.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
printf ("%s v%d.%d %s -Utility to retrieve and update the boot sector or MBR.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
printf ("Copyright (c) 2009 - 2010 Intel Corporation. All rights reserved.\n");
}

View File

@@ -55,7 +55,7 @@ Returns:
--*/
{
fprintf (stdout, "%s Version %d.%d\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
VOID

View File

@@ -87,7 +87,7 @@ Returns:
--*/
{
fprintf (stdout, "%s Version %d.%d\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
STATIC

View File

@@ -40,7 +40,6 @@ Abstract:
//
#define UTILITY_MAJOR_VERSION 0
#define UTILITY_MINOR_VERSION 1
#define GENFV_UPDATE_TIME " updated on 2010/2/1"
EFI_GUID mEfiFirmwareFileSystem2Guid = EFI_FIRMWARE_FILE_SYSTEM2_GUID;
@@ -65,7 +64,7 @@ Returns:
--*/
{
fprintf (stdout, "%s Version %d.%d %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, GENFV_UPDATE_TIME);
fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
STATIC

View File

@@ -1085,7 +1085,11 @@ Returns:
// Rebase the PE or TE image in FileBuffer of FFS file for XIP
// Rebase for the debug genfvmap tool
//
FfsRebase (FvInfo, FvInfo->FvFiles[Index], (EFI_FFS_FILE_HEADER *) FileBuffer, (UINTN) *VtfFileImage - (UINTN) FvImage->FileImage, FvMapFile);
Status = FfsRebase (FvInfo, FvInfo->FvFiles[Index], (EFI_FFS_FILE_HEADER *) FileBuffer, (UINTN) *VtfFileImage - (UINTN) FvImage->FileImage, FvMapFile);
if (EFI_ERROR (Status)) {
Error (NULL, 0, 3000, "Invalid", "Could not rebase %s.", FvInfo->FvFiles[Index]);
return Status;
}
//
// copy VTF File
//
@@ -1124,7 +1128,11 @@ Returns:
// Rebase the PE or TE image in FileBuffer of FFS file for XIP.
// Rebase Bs and Rt drivers for the debug genfvmap tool.
//
FfsRebase (FvInfo, FvInfo->FvFiles[Index], (EFI_FFS_FILE_HEADER *) FileBuffer, (UINTN) FvImage->CurrentFilePointer - (UINTN) FvImage->FileImage, FvMapFile);
Status = FfsRebase (FvInfo, FvInfo->FvFiles[Index], (EFI_FFS_FILE_HEADER *) FileBuffer, (UINTN) FvImage->CurrentFilePointer - (UINTN) FvImage->FileImage, FvMapFile);
if (EFI_ERROR (Status)) {
Error (NULL, 0, 3000, "Invalid", "Could not rebase %s.", FvInfo->FvFiles[Index]);
return Status;
}
//
// Copy the file
//
@@ -3020,7 +3028,7 @@ Returns:
return EFI_OUT_OF_RESOURCES;
}
memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~((INT64)ImageContext.SectionAlignment - 1));
ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~((UINTN) ImageContext.SectionAlignment - 1));
Status = PeCoffLoaderLoadImage (&ImageContext);
if (EFI_ERROR (Status)) {
@@ -3247,7 +3255,7 @@ Returns:
return EFI_OUT_OF_RESOURCES;
}
memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~(ImageContext.SectionAlignment - 1));
ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~((UINTN) ImageContext.SectionAlignment - 1));
Status = PeCoffLoaderLoadImage (&ImageContext);
if (EFI_ERROR (Status)) {

View File

@@ -147,7 +147,7 @@ Returns:
--*/
{
fprintf (stdout, "%s Version %d.%d\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
STATIC
@@ -658,7 +658,10 @@ PeCoffConvertImageToXip (
SectionHeader->SizeOfRawData
);
}
SectionHeader->SizeOfRawData = SectionHeader->Misc.VirtualSize;
//
// Make the size of raw data in section header alignment.
//
SectionHeader->SizeOfRawData = (SectionHeader->Misc.VirtualSize + PeHdr->Pe32.OptionalHeader.FileAlignment - 1) & (~(PeHdr->Pe32.OptionalHeader.FileAlignment - 1));
SectionHeader->PointerToRawData = SectionHeader->VirtualAddress;
}

View File

@@ -91,7 +91,7 @@ Returns:
--*/
{
printf ("%s v%d.%d -Utility to generate the EfiLoader image containing page table.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
printf ("%s v%d.%d %s -Utility to generate the EfiLoader image containing page table.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
printf ("Copyright (c) 2008 - 2011 Intel Corporation. All rights reserved.\n");
}

View File

@@ -118,7 +118,7 @@ Returns:
--*/
{
fprintf (stdout, "%s Version %d.%d\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
STATIC

View File

@@ -2383,7 +2383,7 @@ Returns:
--*/
{
fprintf (stdout, "%s Version %d.%d\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
VOID

View File

@@ -275,7 +275,7 @@ Version (
VOID
)
{
printf ("%s v%d.%d -Utility to retrieve and update the boot sector or MBR.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
printf ("%s v%d.%d %s-Utility to retrieve and update the boot sector or MBR.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
printf ("Copyright (c) 2007-2010 Intel Corporation. All rights reserved.\n");
}

View File

@@ -0,0 +1,3 @@
//This file is for build version number auto generation
//
#define __BUILD_VERSION "Build 2318"

View File

@@ -27,6 +27,7 @@
#include "Sdk/C/7zVersion.h"
#include "Sdk/C/LzmaDec.h"
#include "Sdk/C/LzmaEnc.h"
#include "CommonLib.h"
const char *kCantReadMessage = "Can not read input file";
const char *kCantWriteMessage = "Can not write output file";
@@ -82,7 +83,7 @@ int PrintUserError(char *buffer)
void PrintVersion(char *buffer)
{
sprintf (buffer, "%s Version %d.%d", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
sprintf (buffer, "%s Version %d.%d %s ", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
#define IN_BUF_SIZE (1 << 16)

View File

@@ -1,12 +1,12 @@
## @file
#
# 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
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
## @file
#
# 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
# 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.
#
@@ -22,4 +22,6 @@ all: $(MAKEROOT)/bin $(APPLICATION)
$(APPLICATION): $(OBJECTS)
$(LINKER) -o $(APPLICATION) $(LFLAGS) $(OBJECTS) -L$(MAKEROOT)/libs $(LIBS)
$(OBJECTS): ../Include/Common/BuildVersion.h
include $(MAKEROOT)/Makefiles/footer.makefile

View File

@@ -1,12 +1,12 @@
## @file
#
# 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
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
## @file
#
# 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
# 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.
!INCLUDE ..\Makefiles\ms.common
@@ -19,6 +19,8 @@ $(APPLICATION) : $(OBJECTS)
-@if not exist $(BIN_PATH) mkdir $(BIN_PATH)
$(LD) /nologo /debug /incremental:no /nodefaultlib:libc.lib /out:$@ $(LIBS) $**
$(OBJECTS) : ..\Include\Common\BuildVersion.h
.PHONY:clean
.PHONY:cleanall

View File

@@ -26,6 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "ParseInf.h"
#include "CommonLib.h"
#include "EfiUtilityMsgs.h"
//
// Utility Name
//
@@ -57,7 +58,7 @@ Returns:
--*/
{
printf ("%s v%d.%d -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
printf ("%s v%d.%d %s -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");
}

View File

@@ -1664,7 +1664,7 @@ Returns:
--*/
{
fprintf (stdout, "%s Version %d.%d\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
VOID

View File

@@ -30,7 +30,21 @@ LINKER = $(CXX)
EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
include $(MAKEROOT)/Makefiles/app.makefile
MAKEROOT ?= ../..
include $(MAKEROOT)/Makefiles/header.makefile
APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
.PHONY:all
all: $(MAKEROOT)/bin $(APPLICATION)
$(APPLICATION): $(OBJECTS)
$(LINKER) -o $(APPLICATION) $(LFLAGS) $(OBJECTS) -L$(MAKEROOT)/libs $(LIBS)
VfrCompiler.o: ../Include/Common/BuildVersion.h
include $(MAKEROOT)/Makefiles/footer.makefile
VfrSyntax.cpp EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h: Pccts/antlr/antlr VfrSyntax.g
Pccts/antlr/antlr -CC -e3 -ck 3 -k 2 -fl VfrParser.dlg -ft VfrTokens.h -o . VfrSyntax.g

View File

@@ -403,7 +403,7 @@ CVfrCompiler::Usage (
UINT32 Index;
CONST CHAR8 *Help[] = {
" ",
"VfrCompile version " VFR_COMPILER_VERSION VFR_COMPILER_UPDATE_TIME,
"VfrCompile version " VFR_COMPILER_VERSION __BUILD_VERSION VFR_COMPILER_UPDATE_TIME,
"Copyright (c) 2004-2011 Intel Corporation. All rights reserved.",
" ",
"Usage: VfrCompile [options] VfrFile",
@@ -728,7 +728,7 @@ CVfrCompiler::GenRecordListFile (
goto Err1;
}
fprintf (pOutFile, "//\n// VFR compiler version " VFR_COMPILER_VERSION "\n//\n");
fprintf (pOutFile, "//\n// VFR compiler version " VFR_COMPILER_VERSION __BUILD_VERSION "\n//\n");
LineNo = 0;
while (!feof (pInFile)) {
if (fgets (LineBuf, MAX_VFR_LINE_LEN, pInFile) != NULL) {

View File

@@ -561,22 +561,24 @@ CFormPkg::DeclarePendingQuestion (
CHAR8 *VarStr;
UINT32 ArrayIdx;
CHAR8 FName[MAX_NAME_LEN];
CHAR8 *SName;
CHAR8 *NewStr;
EFI_VFR_RETURN_CODE ReturnCode;
EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID;
//
// Declare all questions as Numeric in DisableIf True
//
// DisableIf
CIfrDisableIf DIObj;
DIObj.SetLineNo (LineNo);
//TrueOpcode
CIfrTrue TObj (LineNo);
// Declare Numeric qeustion for each undefined question.
for (pNode = PendingAssignList; pNode != NULL; pNode = pNode->mNext) {
if (pNode->mFlag == PENDING) {
//
// declare this question as Numeric in SuppressIf True
//
// SuppressIf
CIfrSuppressIf SIObj;
SIObj.SetLineNo (LineNo);
//TrueOpcode
CIfrTrue TObj (LineNo);
//Numeric qeustion
CIfrNumeric CNObj;
EFI_VARSTORE_INFO Info;
EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;
@@ -639,7 +641,16 @@ CFormPkg::DeclarePendingQuestion (
ReturnCode = lCVfrDataStorage.GetEfiVarStoreInfo (&Info);
} else if (VarStoreType == EFI_VFR_VARSTORE_BUFFER) {
VarStr = pNode->mKey;
ReturnCode = lCVfrVarDataTypeDB.GetDataFieldInfo (VarStr, Info.mInfo.mVarOffset, Info.mVarType, Info.mVarTotalSize);
//convert VarStr with store name to VarStr with structure name
ReturnCode = lCVfrDataStorage.GetBufferVarStoreDataTypeName (FName, &SName);
if (ReturnCode == VFR_RETURN_SUCCESS) {
NewStr = new CHAR8[strlen (VarStr) + strlen (SName) + 1];
NewStr[0] = '\0';
strcpy (NewStr, SName);
strcat (NewStr, VarStr + strlen (FName));
ReturnCode = lCVfrVarDataTypeDB.GetDataFieldInfo (NewStr, Info.mInfo.mVarOffset, Info.mVarType, Info.mVarTotalSize);
delete NewStr;
}
} else {
ReturnCode = VFR_RETURN_UNSUPPORTED;
}
@@ -657,7 +668,7 @@ CFormPkg::DeclarePendingQuestion (
// For undefined Efi VarStore type question
// Append the extended guided opcode to contain VarName
//
if (VarStoreType == EFI_VFR_VARSTORE_EFI) {
if (VarStoreType == EFI_VFR_VARSTORE_EFI || VfrCompatibleMode) {
CIfrVarEqName CVNObj (QId, Info.mInfo.mVarName);
CVNObj.SetLineNo (LineNo);
}
@@ -667,13 +678,15 @@ CFormPkg::DeclarePendingQuestion (
//
CIfrEnd CEObj;
CEObj.SetLineNo (LineNo);
//
// End for SuppressIf
//
CIfrEnd SEObj;
SEObj.SetLineNo (LineNo);
}
}
//
// End for DisableIf
//
CIfrEnd SEObj;
SEObj.SetLineNo (LineNo);
return VFR_RETURN_SUCCESS;
}

View File

@@ -1387,19 +1387,21 @@ vfrFormDefinition :
CIfrLabel LObj3;
LObj3.SetLineNo(E->getLine());
LObj3.SetNumber (0xffff); //add end label for UEFI, label number hardcode 0xffff
//
// Declare undefined Question
//
if (gCFormPkg.HavePendingUnassigned()) {
gCFormPkg.DeclarePendingQuestion (
gCVfrVarDataTypeDB,
mCVfrDataStorage,
mCVfrQuestionDB,
&mFormsetGuid,
E->getLine()
);
}
}
//
// Declare undefined Question so that they can be used in expression.
//
if (gCFormPkg.HavePendingUnassigned()) {
gCFormPkg.DeclarePendingQuestion (
gCVfrVarDataTypeDB,
mCVfrDataStorage,
mCVfrQuestionDB,
&mFormsetGuid,
E->getLine()
);
}
//
// mCVfrQuestionDB.PrintAllQuestion();
//
@@ -2110,6 +2112,7 @@ vfrStatementNumeric :
<<
CIfrNumeric NObj;
UINT32 DataTypeSize;
BOOLEAN IsSupported;
>>
L:Numeric << NObj.SetLineNo(L->getLine()); >>
vfrQuestionHeader[NObj] "," << // check data type
@@ -2125,7 +2128,23 @@ vfrStatementNumeric :
}
vfrSetMinMaxStep[NObj]
vfrStatementQuestionOptionList
E:EndNumeric << CRT_END_OP (E); >>
E:EndNumeric <<
IsSupported = FALSE;
switch (_GET_CURRQEST_DATATYPE()) {
case EFI_IFR_TYPE_NUM_SIZE_8:
case EFI_IFR_TYPE_NUM_SIZE_16:
case EFI_IFR_TYPE_NUM_SIZE_32:
case EFI_IFR_TYPE_NUM_SIZE_64:
IsSupported = TRUE;
break;
default:
break;
}
if (!IsSupported) {
_PCATCH (VFR_RETURN_INVALID_PARAMETER, L->getLine(), "Numeric question only support UINT8, UINT16, UINT32 and UINT64 data type.");
}
CRT_END_OP (E);
>>
";"
;
@@ -2170,6 +2189,7 @@ vfrStatementOneOf :
<<
CIfrOneOf OObj;
UINT32 DataTypeSize;
BOOLEAN IsSupported;
>>
L:OneOf << OObj.SetLineNo(L->getLine()); >>
vfrQuestionHeader[OObj] "," << //check data type
@@ -2184,7 +2204,23 @@ vfrStatementOneOf :
vfrSetMinMaxStep[OObj]
}
vfrStatementQuestionOptionList
E:EndOneOf << CRT_END_OP (E); >>
E:EndOneOf <<
IsSupported = FALSE;
switch (_GET_CURRQEST_DATATYPE()) {
case EFI_IFR_TYPE_NUM_SIZE_8:
case EFI_IFR_TYPE_NUM_SIZE_16:
case EFI_IFR_TYPE_NUM_SIZE_32:
case EFI_IFR_TYPE_NUM_SIZE_64:
IsSupported = TRUE;
break;
default:
break;
}
if (!IsSupported) {
_PCATCH (VFR_RETURN_INVALID_PARAMETER, L->getLine(), "OneOf question only support UINT8, UINT16, UINT32 and UINT64 data type.");
}
CRT_END_OP (E);
>>
";"
;

View File

@@ -30,6 +30,7 @@ Abstract:
#include <Common/UefiCapsule.h>
#include <Common/PiFirmwareFile.h>
#include <Common/PiFirmwareVolume.h>
#include <Guid/PiFirmwareFileSystem.h>
#include <IndustryStandard/PeImage.h>
#include <Protocol/GuidedSectionExtraction.h>
@@ -172,10 +173,11 @@ Returns:
//
// Print utility header
//
printf ("%s Tiano Firmware Volume FFS image info. Version %d.%d, %s\n",
printf ("%s Tiano Firmware Volume FFS image info. Version %d.%d %s, %s\n",
UTILITY_NAME,
UTILITY_MAJOR_VERSION,
UTILITY_MINOR_VERSION,
__BUILD_VERSION,
__DATE__
);