summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-29 06:59:30 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-29 06:59:30 +0000
commit0d2711a69397d2971079121df4326d84736c181e (patch)
tree0d3c93b9db1df5a30a0d15ec9d70c75768c1f67c /BaseTools/Source/C
parent421fb3b504cfe18033c49a40fcd46bab45a0fb50 (diff)
downloadedk2-0d2711a69397d2971079121df4326d84736c181e.zip
edk2-0d2711a69397d2971079121df4326d84736c181e.tar.gz
edk2-0d2711a69397d2971079121df4326d84736c181e.tar.bz2
Sync BaseTools Trunk (version r2387) to EDKII main trunk.
Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r--BaseTools/Source/C/Common/BasePeCoff.c2
-rw-r--r--BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c4
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.c6
-rw-r--r--BaseTools/Source/C/GenFw/Elf32Convert.c10
-rw-r--r--BaseTools/Source/C/GenFw/Elf64Convert.c14
-rw-r--r--BaseTools/Source/C/GenSec/GenSec.c4
-rw-r--r--BaseTools/Source/C/GenVtf/GenVtf.c18
-rw-r--r--BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c4
-rw-r--r--BaseTools/Source/C/Include/Common/BuildVersion.h2
-rw-r--r--BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c21
-rw-r--r--BaseTools/Source/C/Makefiles/ms.app22
-rw-r--r--BaseTools/Source/C/Split/Split.c5
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp7
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.h8
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g33
-rw-r--r--BaseTools/Source/C/VolInfo/VolInfo.c1
16 files changed, 78 insertions, 83 deletions
diff --git a/BaseTools/Source/C/Common/BasePeCoff.c b/BaseTools/Source/C/Common/BasePeCoff.c
index 54bd099..816f309 100644
--- a/BaseTools/Source/C/Common/BasePeCoff.c
+++ b/BaseTools/Source/C/Common/BasePeCoff.c
@@ -979,6 +979,7 @@ Returns:
ImageContext,
Section->VirtualAddress + Section->Misc.VirtualSize - 1
);
+
//
// If the base start or end address resolved to 0, then fail.
//
@@ -987,6 +988,7 @@ Returns:
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);
diff --git a/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c b/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c
index 0168596..f83c532 100644
--- a/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c
+++ b/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, 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
@@ -181,7 +181,6 @@ Returns:
CHAR8* OutputFileName = NULL;
CHAR8* InputFileNames[MAX_PE_IMAGES + 1];
UINT8 InputFileCount = 0;
- BOOLEAN QuietFlag = FALSE;
UINT64 DebugLevel = 0;
UINT64 VerboseLevel = 0;
EFI_STATUS Status = EFI_SUCCESS;
@@ -220,7 +219,6 @@ Returns:
}
if ((stricmp (argv[0], "-q") == 0) || (stricmp (argv[0], "--quiet") == 0)) {
- QuietFlag = TRUE;
argc --;
argv ++;
continue;
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index 9fdcb47..45a2c80 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, 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
@@ -2801,7 +2801,6 @@ Returns:
PE_COFF_LOADER_IMAGE_CONTEXT OrigImageContext;
EFI_PHYSICAL_ADDRESS XipBase;
EFI_PHYSICAL_ADDRESS NewPe32BaseAddress;
- EFI_PHYSICAL_ADDRESS *BaseToUpdate;
UINTN Index;
EFI_FILE_SECTION_POINTER CurrentPe32Section;
EFI_FFS_FILE_STATE SavedState;
@@ -2818,7 +2817,6 @@ Returns:
Index = 0;
MemoryImagePointer = NULL;
- BaseToUpdate = NULL;
TEImageHeader = NULL;
ImgHdr = NULL;
SectionHeader = NULL;
@@ -2992,7 +2990,6 @@ Returns:
}
NewPe32BaseAddress = XipBase + (UINTN) CurrentPe32Section.Pe32Section + sizeof (EFI_PE32_SECTION) - (UINTN)FfsFile;
- BaseToUpdate = &XipBase;
break;
case EFI_FV_FILETYPE_DRIVER:
@@ -3008,7 +3005,6 @@ Returns:
return EFI_ABORTED;
}
NewPe32BaseAddress = XipBase + (UINTN) CurrentPe32Section.Pe32Section + sizeof (EFI_PE32_SECTION) - (UINTN)FfsFile;
- BaseToUpdate = &XipBase;
break;
default:
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 42ae35b..ddb45ac 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -738,10 +738,6 @@ WriteRelocations32 (
UINT8 *Targ;
Elf32_Phdr *DynamicSegment;
Elf32_Phdr *TargetSegment;
- Elf_Sym *Sym;
- Elf_Shdr *SymtabShdr;
- UINT8 *Symtab;
-
for (Index = 0, FoundRelocations = FALSE; Index < mEhdr->e_shnum; Index++) {
Elf_Shdr *RelShdr = GetShdrByIndex(Index);
@@ -750,16 +746,10 @@ WriteRelocations32 (
if (IsTextShdr(SecShdr) || IsDataShdr(SecShdr)) {
UINT32 RelIdx;
- SymtabShdr = GetShdrByIndex (RelShdr->sh_link);
- Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset;
FoundRelocations = TRUE;
for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) {
Elf_Rel *Rel = (Elf_Rel *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx);
- Elf_Shdr *SymShdr;
- Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize);
- SymShdr = GetShdrByIndex (Sym->st_shndx);
-
if (mEhdr->e_machine == EM_386) {
switch (ELF_R_TYPE(Rel->r_info)) {
case R_386_NONE:
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index fbe6ff8..e7c5d49 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -637,28 +637,16 @@ WriteRelocations64 (
UINT32 Index;
EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
EFI_IMAGE_DATA_DIRECTORY *Dir;
- BOOLEAN FoundRelocations;
- Elf_Sym *Sym;
- Elf_Shdr *SymtabShdr;
- UINT8 *Symtab;
-
- for (Index = 0, FoundRelocations = FALSE; Index < mEhdr->e_shnum; Index++) {
+ for (Index = 0; Index < mEhdr->e_shnum; Index++) {
Elf_Shdr *RelShdr = GetShdrByIndex(Index);
if ((RelShdr->sh_type == SHT_REL) || (RelShdr->sh_type == SHT_RELA)) {
Elf_Shdr *SecShdr = GetShdrByIndex (RelShdr->sh_info);
if (IsTextShdr(SecShdr) || IsDataShdr(SecShdr)) {
UINT64 RelIdx;
- SymtabShdr = GetShdrByIndex (RelShdr->sh_link);
- Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset;
- FoundRelocations = TRUE;
for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) {
Elf_Rela *Rel = (Elf_Rela *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx);
- Elf_Shdr *SymShdr;
-
- Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize);
- SymShdr = GetShdrByIndex (Sym->st_shndx);
if (mEhdr->e_machine == EM_X86_64) {
switch (ELF_R_TYPE(Rel->r_info)) {
diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c
index ffa0ee6..79e8e1b 100644
--- a/BaseTools/Source/C/GenSec/GenSec.c
+++ b/BaseTools/Source/C/GenSec/GenSec.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, 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
@@ -915,7 +915,6 @@ Returns:
{
UINT32 Index;
UINT32 InputFileNum;
- FILE *InFile;
FILE *OutFile;
CHAR8 **InputFileName;
CHAR8 *OutputFileName;
@@ -944,7 +943,6 @@ Returns:
SectionName = NULL;
CompressionName = NULL;
StringBuffer = "";
- InFile = NULL;
OutFile = NULL;
VersionNumber = 0;
InputFileNum = 0;
diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c
index e56544e..eaf2f56 100644
--- a/BaseTools/Source/C/GenVtf/GenVtf.c
+++ b/BaseTools/Source/C/GenVtf/GenVtf.c
@@ -1,6 +1,6 @@
/**
-Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 1999 - 2011, 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
@@ -1141,7 +1141,6 @@ Returns:
EFI_STATUS Status;
UINT64 CompStartAddress;
UINT64 FileSize;
- UINT64 NumByteRead;
UINT64 NumAdjustByte;
UINT8 *Buffer;
FILE *Fp;
@@ -1189,7 +1188,7 @@ Returns:
//
// Read first 64 bytes of PAL header and use it to find version info
//
- NumByteRead = fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
+ fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
//
// PAL header contains the version info. Currently, we will use the header
@@ -1200,7 +1199,7 @@ Returns:
}
}
- NumByteRead = fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
+ fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
fclose (Fp);
//
@@ -1329,7 +1328,6 @@ Returns:
UINT64 AbsAddress;
UINTN RelativeAddress;
UINT64 FileSize;
- UINT64 NumByteRead;
UINT8 *Buffer;
FILE *Fp;
FIT_TABLE *PalFitPtr;
@@ -1367,7 +1365,7 @@ Returns:
//
// Read, Get version Info and discard the PAL header.
//
- NumByteRead = fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
+ fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
//
// Extract the version info from header of PAL_A. Once done, discrad this buffer
@@ -1379,7 +1377,7 @@ Returns:
//
// Read PAL_A file in a buffer
//
- NumByteRead = fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
+ fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
fclose (Fp);
PalStartAddress = Fv1EndAddress - (SIZE_TO_OFFSET_PAL_A_END + FileSize);
@@ -1759,7 +1757,6 @@ Returns:
UINT8 *Buffer;
UINT8 *LocalVtfBuffer;
UINTN FileSize;
- UINTN NumByteRead;
FILE *Fp;
if (!strcmp (FileName, "")) {
@@ -1784,7 +1781,7 @@ Returns:
return EFI_OUT_OF_RESOURCES;
}
- NumByteRead = fread (Buffer, sizeof (UINT8), FileSize, Fp);
+ fread (Buffer, sizeof (UINT8), FileSize, Fp);
LocalVtfBuffer = (UINT8 *) Vtf1EndBuffer - SIZE_IA32_RESET_VECT;
memcpy (LocalVtfBuffer, Buffer, FileSize);
@@ -2121,7 +2118,6 @@ Returns:
FILE *Fp;
UINT64 *StartAddressPtr;
UINTN FirstFwVSize;
- UINTN NumByte;
StartAddressPtr = malloc (sizeof (UINT64));
if (StartAddressPtr == NULL) {
@@ -2141,7 +2137,7 @@ Returns:
FirstFwVSize = _filelength (fileno (Fp));
fseek (Fp, (long) (FirstFwVSize - (UINTN) (SIZE_IA32_RESET_VECT + SIZE_SALE_ENTRY_POINT)), SEEK_SET);
- NumByte = fwrite ((VOID *) StartAddressPtr, sizeof (UINT64), 1, Fp);
+ fwrite ((VOID *) StartAddressPtr, sizeof (UINT64), 1, Fp);
if (Fp) {
fclose (Fp);
diff --git a/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c b/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c
index 1ce22fc..b0ec271 100644
--- a/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c
+++ b/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, 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
@@ -305,7 +305,6 @@ main (
char *argv[]
)
{
- CHAR8 *AppName;
INTN Index;
BOOLEAN ProcessMbr;
ERROR_STATUS Status;
@@ -319,7 +318,6 @@ main (
ZeroMem(&InputPathInfo, sizeof(PATH_INFO));
ZeroMem(&OutputPathInfo, sizeof(PATH_INFO));
- AppName = *argv;
argv ++;
argc --;
diff --git a/BaseTools/Source/C/Include/Common/BuildVersion.h b/BaseTools/Source/C/Include/Common/BuildVersion.h
index ec4acc3..6619780 100644
--- a/BaseTools/Source/C/Include/Common/BuildVersion.h
+++ b/BaseTools/Source/C/Include/Common/BuildVersion.h
@@ -1,3 +1,3 @@
//This file is for build version number auto generation
//
-#define __BUILD_VERSION "Build 2361"
+#define __BUILD_VERSION "Build 2386"
diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
index 529fd98..7272272 100644
--- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
+++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
@@ -1,5 +1,18 @@
-/* LzmaEnc.c -- LZMA Encoder
-2009-02-02 : Igor Pavlov : Public domain */
+/** @file
+ Based on LZMA SDK 4.65:
+ LzmaEnc.c -- LZMA Encoder
+ 2009-02-02 : Igor Pavlov : Public domain
+
+ Copyright (c) 2011, 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 <string.h>
@@ -1919,11 +1932,13 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize
static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
{
UInt32 beforeSize = kNumOpts;
+ #ifdef COMPRESS_MF_MT
Bool btMode;
+ #endif
if (!RangeEnc_Alloc(&p->rc, alloc))
return SZ_ERROR_MEM;
- btMode = (p->matchFinderBase.btMode != 0);
#ifdef COMPRESS_MF_MT
+ btMode = (p->matchFinderBase.btMode != 0);
p->mtMode = (p->multiThread && !p->fastMode && btMode);
#endif
diff --git a/BaseTools/Source/C/Makefiles/ms.app b/BaseTools/Source/C/Makefiles/ms.app
index 84173e5..7812175 100644
--- a/BaseTools/Source/C/Makefiles/ms.app
+++ b/BaseTools/Source/C/Makefiles/ms.app
@@ -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,8 +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
-
+$(OBJECTS) : ..\Include\Common\BuildVersion.h
+
.PHONY:clean
.PHONY:cleanall
diff --git a/BaseTools/Source/C/Split/Split.c b/BaseTools/Source/C/Split/Split.c
index 9b81eeb..544da91 100644
--- a/BaseTools/Source/C/Split/Split.c
+++ b/BaseTools/Source/C/Split/Split.c
@@ -2,7 +2,7 @@
Split a file into two pieces at the request offset.
-Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 1999 - 2011, 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
@@ -26,7 +26,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "ParseInf.h"
#include "CommonLib.h"
#include "EfiUtilityMsgs.h"
-
//
// Utility Name
//
@@ -230,7 +229,6 @@ Returns:
CHAR8 *CurrentDir = NULL;
UINT64 Index;
CHAR8 CharC;
- BOOLEAN QuietFlag = TRUE;
UINT64 DebugLevel = 0;
UINT64 VerboseLevel = 0;
@@ -308,7 +306,6 @@ Returns:
}
if ((stricmp (argv[0], "-q") == 0) || (stricmp (argv[0], "--quiet") == 0)) {
- QuietFlag = TRUE;
argc --;
argv ++;
continue;
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
index f0678ca..94ad55b 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
@@ -662,6 +662,13 @@ CFormPkg::DeclarePendingQuestion (
CNObj.SetQuestionId (QId);
CNObj.SetVarStoreInfo (&Info);
+ //
+ // Numeric doesn't support BOOLEAN data type.
+ // BOOLEAN type has the same data size to UINT8.
+ //
+ if (Info.mVarType == EFI_IFR_TYPE_BOOLEAN) {
+ Info.mVarType = EFI_IFR_TYPE_NUM_SIZE_8;
+ }
CNObj.SetFlags (0, Info.mVarType);
//
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
index f908718..92e47d9 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
@@ -847,7 +847,7 @@ private:
public:
CIfrImage () : CIfrObj (EFI_IFR_IMAGE_OP, (CHAR8 **)&mImage),
- CIfrOpHeader (EFI_IFR_FORM_OP, &mImage->Header) {
+ CIfrOpHeader (EFI_IFR_IMAGE_OP, &mImage->Header) {
mImage->Id = EFI_IMAGE_ID_INVALID;
}
@@ -1061,12 +1061,8 @@ public:
mRef2->FormId = FormId;
}
- EFI_VFR_RETURN_CODE SetQuestionId (IN EFI_QUESTION_ID QuestionId) {
- if (QuestionId == EFI_QUESTION_ID_INVALID) {
- return VFR_RETURN_UNDEFINED;
- }
+ VOID SetQuestionId (IN EFI_QUESTION_ID QuestionId) {
mRef2->QuestionId = QuestionId;
- return VFR_RETURN_SUCCESS;
}
};
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index d9f8dd9..f27f05b 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -524,28 +524,28 @@ vfrFormSetDefinition :
FSObj->SetClassGuid(&DefaultClassGuid);
if (mOverrideClassGuid != NULL) {
FSObj->SetClassGuid(mOverrideClassGuid);
- }
+ }
break;
case 1:
if (mOverrideClassGuid != NULL) {
ClassGuidNum ++;
- }
+ }
FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + ClassGuidNum * sizeof(EFI_GUID));
FSObj->SetClassGuid(&ClassGuid1);
if (mOverrideClassGuid != NULL) {
FSObj->SetClassGuid(mOverrideClassGuid);
- }
+ }
break;
case 2:
if (mOverrideClassGuid != NULL) {
ClassGuidNum ++;
- }
+ }
FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + ClassGuidNum * sizeof(EFI_GUID));
FSObj->SetClassGuid(&ClassGuid1);
FSObj->SetClassGuid(&ClassGuid2);
if (mOverrideClassGuid != NULL) {
FSObj->SetClassGuid(mOverrideClassGuid);
- }
+ }
break;
case 3:
FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + ClassGuidNum * sizeof(EFI_GUID));
@@ -1646,6 +1646,7 @@ vfrStatementGoto :
EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;
UINT32 BitMask;
CIfrQuestionHeader *QHObj = NULL;
+ CIfrOpHeader *OHObj = NULL;
CIfrRef *R1Obj = NULL;
CIfrRef2 *R2Obj = NULL;
CIfrRef3 *R3Obj = NULL;
@@ -1682,8 +1683,13 @@ vfrStatementGoto :
FormId "=" F3:Number "," << RefType = 2; FId = _STOFID(F3->getText()); >>
Question "="
(
- QN3:StringIdentifier "," << mCVfrQuestionDB.GetQuestionId (QN3->getText (), NULL, QId, BitMask); >>
- | QN3:Number "," << QId = _STOQID(QN3->getText()); >>
+ QN3:StringIdentifier "," <<
+ mCVfrQuestionDB.GetQuestionId (QN3->getText (), NULL, QId, BitMask);
+ if (QId == EFI_QUESTION_ID_INVALID) {
+ _PCATCH(VFR_RETURN_UNDEFINED, QN3);
+ }
+ >>
+ | QN4:Number "," << QId = _STOQID(QN4->getText()); >>
)
)
|
@@ -1700,6 +1706,7 @@ vfrStatementGoto :
{
R5Obj = new CIfrRef5;
QHObj = R5Obj;
+ OHObj = R5Obj;
R5Obj->SetLineNo(G->getLine());
break;
}
@@ -1707,6 +1714,7 @@ vfrStatementGoto :
{
R4Obj = new CIfrRef4;
QHObj = R4Obj;
+ OHObj = R4Obj;
R4Obj->SetLineNo(G->getLine());
R4Obj->SetDevicePath (DevPath);
R4Obj->SetFormSetId (FSId);
@@ -1718,6 +1726,7 @@ vfrStatementGoto :
{
R3Obj = new CIfrRef3;
QHObj = R3Obj;
+ OHObj = R3Obj;
R3Obj->SetLineNo(G->getLine());
R3Obj->SetFormSetId (FSId);
R3Obj->SetFormId (FId);
@@ -1728,15 +1737,17 @@ vfrStatementGoto :
{
R2Obj = new CIfrRef2;
QHObj = R2Obj;
+ OHObj = R2Obj;
R2Obj->SetLineNo(G->getLine());
R2Obj->SetFormId (FId);
- _PCATCH(R2Obj->SetQuestionId (QId), QN3);
+ R2Obj->SetQuestionId (QId);
break;
}
case 1:
{
R1Obj = new CIfrRef;
QHObj = R1Obj;
+ OHObj = R1Obj;
R1Obj->SetLineNo(G->getLine());
R1Obj->SetFormId (FId);
break;
@@ -1745,11 +1756,14 @@ vfrStatementGoto :
}
>>
vfrQuestionHeader[*QHObj, QUESTION_REF]
- { "," vfrStatementStatTagList }
{ "," F:FLAGS "=" vfrGotoFlags[QHObj, F->getLine()] }
{
"," Key "=" KN:Number << AssignQuestionKey (*QHObj, KN); >>
}
+ {
+ E:","
+ vfrStatementQuestionOptionList << OHObj->SetScope(1); CRT_END_OP (E);>>
+ }
";" << if (R1Obj != NULL) {delete R1Obj;} if (R2Obj != NULL) {delete R2Obj;} if (R3Obj != NULL) {delete R3Obj;} if (R4Obj != NULL) {delete R4Obj;} if (R5Obj != NULL) {delete R5Obj;}>>
;
@@ -3615,6 +3629,7 @@ vfrExpressionUnaryOp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
| question2refExp[$RootLevel, $ExpOpCount]
| stringref2Exp[$RootLevel, $ExpOpCount]
| toboolExp[$RootLevel, $ExpOpCount]
+ | tostringExp[$RootLevel, $ExpOpCount]
| unintExp[$RootLevel, $ExpOpCount]
| toupperExp[$RootLevel, $ExpOpCount]
| tolwerExp[$RootLevel, $ExpOpCount]
diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c
index 78c6cf6..f514ba8 100644
--- a/BaseTools/Source/C/VolInfo/VolInfo.c
+++ b/BaseTools/Source/C/VolInfo/VolInfo.c
@@ -30,7 +30,6 @@ 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>