Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly includes:

1. Fix !include issues
  2. Fix Trim to skip the postfix 'U' for hexadecimal and decimal numbers
  3. Fix building error C2733 when building C++ code.
  4. Add GCC46 tool chain definition
  5. Add new RVCT and RVCTLINUX tool chains

Signed-off-by: lgao4


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12782 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2011-11-25 06:21:03 +00:00
parent c32dcd284c
commit 2bcc713e74
62 changed files with 503 additions and 3525 deletions

View File

@ -553,7 +553,7 @@ Returns:
EFI_FIRMWARE_VOLUME_HEADER *hdr = (EFI_FIRMWARE_VOLUME_HEADER*)Fv;
EFI_FFS_FILE_HEADER *fhdr = NULL;
EFI_FVB_ATTRIBUTES FvbAttributes;
EFI_FVB_ATTRIBUTES_2 FvbAttributes;
UINTN offset;
UINTN fsize;
UINTN newSize;
@ -869,7 +869,7 @@ Returns:
EFI_FIRMWARE_VOLUME_HEADER *hdr = (EFI_FIRMWARE_VOLUME_HEADER*)Fv;
EFI_FFS_FILE_HEADER *fhdr = NULL;
EFI_FVB_ATTRIBUTES FvbAttributes;
EFI_FVB_ATTRIBUTES_2 FvbAttributes;
UINTN fsize;
EFI_STATUS Status;

View File

@ -84,7 +84,7 @@ CHAR8 *mFvbAlignmentName[] = {
EFI_FVB2_ALIGNMENT_64K_STRING,
EFI_FVB2_ALIGNMENT_128K_STRING,
EFI_FVB2_ALIGNMENT_256K_STRING,
EFI_FVB2_ALIGNMNET_512K_STRING,
EFI_FVB2_ALIGNMENT_512K_STRING,
EFI_FVB2_ALIGNMENT_1M_STRING,
EFI_FVB2_ALIGNMENT_2M_STRING,
EFI_FVB2_ALIGNMENT_4M_STRING,
@ -1535,7 +1535,7 @@ Returns:
//
Status = FindApResetVectorPosition (FvImage, &BytePointer);
if (EFI_ERROR (Status)) {
Error (NULL, 0, 3000, "Invalid", "Cannot find the appropriate location in FvImage to add Ap reset vector!");
Error (NULL, 0, 3000, "Invalid", "FV image does not have enough space to place AP reset vector. The FV image needs to reserve at least 4KB of unused space.");
return EFI_ABORTED;
}
}

View File

@ -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
@ -130,7 +130,7 @@ Abstract:
#define EFI_FVB2_ALIGNMENT_64K_STRING "EFI_FVB2_ALIGNMENT_64K"
#define EFI_FVB2_ALIGNMENT_128K_STRING "EFI_FVB2_ALIGNMENT_128K"
#define EFI_FVB2_ALIGNMENT_256K_STRING "EFI_FVB2_ALIGNMENT_256K"
#define EFI_FVB2_ALIGNMNET_512K_STRING "EFI_FVB2_ALIGNMENT_512K"
#define EFI_FVB2_ALIGNMENT_512K_STRING "EFI_FVB2_ALIGNMENT_512K"
#define EFI_FVB2_ALIGNMENT_1M_STRING "EFI_FVB2_ALIGNMENT_1M"
#define EFI_FVB2_ALIGNMENT_2M_STRING "EFI_FVB2_ALIGNMENT_2M"
#define EFI_FVB2_ALIGNMENT_4M_STRING "EFI_FVB2_ALIGNMENT_4M"
@ -226,7 +226,7 @@ typedef struct {
BOOLEAN FvNameGuidSet;
CHAR8 FvExtHeaderFile[_MAX_PATH];
UINTN Size;
EFI_FVB_ATTRIBUTES FvAttributes;
EFI_FVB_ATTRIBUTES_2 FvAttributes;
CHAR8 FvName[_MAX_PATH];
EFI_FV_BLOCK_MAP_ENTRY FvBlocks[MAX_NUMBER_OF_FV_BLOCKS];
CHAR8 FvFiles[MAX_NUMBER_OF_FILES_IN_FV][_MAX_PATH];

View File

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

View File

@ -1,7 +1,7 @@
/** @file
The firmware volume related definitions in PI.
Copyright (c) 2006 - 2008, 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
@ -14,7 +14,7 @@
File Name: PiFirmwareVolume.h
@par Revision Reference:
Version 1.0.
Version 1.2C
**/
@ -33,7 +33,7 @@ typedef UINT32 EFI_FV_FILE_ATTRIBUTES;
#define EFI_FV_FILE_ATTRIB_FIXED 0x00000100
#define EFI_FV_FILE_ATTRIB_MEMORY_MAPPED 0x00000200
typedef UINT32 EFI_FVB_ATTRIBUTES;
typedef UINT32 EFI_FVB_ATTRIBUTES_2;
//
// Attributes bit definitions
@ -73,7 +73,7 @@ typedef UINT32 EFI_FVB_ATTRIBUTES;
#define EFI_FVB2_ALIGNMENT_64K 0x00100000
#define EFI_FVB2_ALIGNMENT_128K 0x00110000
#define EFI_FVB2_ALIGNMENT_256K 0x00120000
#define EFI_FVB2_ALIGNMNET_512K 0x00130000
#define EFI_FVB2_ALIGNMENT_512K 0x00130000
#define EFI_FVB2_ALIGNMENT_1M 0x00140000
#define EFI_FVB2_ALIGNMENT_2M 0x00150000
#define EFI_FVB2_ALIGNMENT_4M 0x00160000
@ -101,7 +101,7 @@ typedef struct {
EFI_GUID FileSystemGuid;
UINT64 FvLength;
UINT32 Signature;
EFI_FVB_ATTRIBUTES Attributes;
EFI_FVB_ATTRIBUTES_2 Attributes;
UINT16 HeaderLength;
UINT16 Checksum;
UINT16 ExtHeaderOffset;
@ -139,8 +139,20 @@ typedef struct {
// Array of GUIDs.
// Each GUID represents an OEM file type.
//
EFI_GUID Types[1];
// EFI_GUID Types[1];
//
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;
#define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002
typedef struct {
EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr;
EFI_GUID FormatType;
//
// An arry of bytes of length Length.
//
// UINT8 Data[1];
//
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE;
#endif

View File

@ -670,6 +670,25 @@ CFormPkg::DeclarePendingQuestion (
Info.mVarType = EFI_IFR_TYPE_NUM_SIZE_8;
}
CNObj.SetFlags (0, Info.mVarType);
//
// Use maximum value not to limit the vaild value for the undefined question.
//
switch (Info.mVarType) {
case EFI_IFR_TYPE_NUM_SIZE_64:
CNObj.SetMinMaxStepData ((UINT64) 0, (UINT64) -1 , (UINT64) 0);
break;
case EFI_IFR_TYPE_NUM_SIZE_32:
CNObj.SetMinMaxStepData ((UINT32) 0, (UINT32) -1 , (UINT32) 0);
break;
case EFI_IFR_TYPE_NUM_SIZE_16:
CNObj.SetMinMaxStepData ((UINT16) 0, (UINT16) -1 , (UINT16) 0);
break;
case EFI_IFR_TYPE_NUM_SIZE_8:
CNObj.SetMinMaxStepData ((UINT8) 0, (UINT8) -1 , (UINT8) 0);
break;
default:
break;
}
//
// For undefined Efi VarStore type question

View File

@ -1989,6 +1989,7 @@ vfrStatementDate :
Prompt "=" "STRING_TOKEN" "\(" DP:Number "\)" ","
Help "=" "STRING_TOKEN" "\(" DH:Number "\)" ","
minMaxDateStepDefault[Val.date, 2]
{ G:FLAGS "=" vfrDateFlags[DObj, G->getLine()] "," }
<<
mCVfrQuestionDB.RegisterOldDateQuestion (VarIdStr[0], VarIdStr[1], VarIdStr[2], QId);
DObj.SetQuestionId (QId);
@ -2449,6 +2450,7 @@ vfrStatementTime :
Prompt "=" "STRING_TOKEN" "\(" SP:Number "\)" ","
Help "=" "STRING_TOKEN" "\(" SH:Number "\)" ","
minMaxTimeStepDefault[Val.time, 2]
{ G:FLAGS "=" vfrTimeFlags[TObj, G->getLine()] "," }
<<
mCVfrQuestionDB.RegisterOldTimeQuestion (VarIdStr[0], VarIdStr[1], VarIdStr[2], QId);
TObj.SetQuestionId (QId);
@ -3216,7 +3218,7 @@ vfrExpressionBuildInFunction [UINT32 & RootLevel, UINT32 & ExpOpCount] :
| ideqvalExp[$RootLevel, $ExpOpCount]
| ideqidExp[$RootLevel, $ExpOpCount]
| ideqvallistExp[$RootLevel, $ExpOpCount]
| questionref13Exp[$RootLevel, $ExpOpCount]
| questionref1Exp[$RootLevel, $ExpOpCount]
| rulerefExp[$RootLevel, $ExpOpCount]
| stringref1Exp[$RootLevel, $ExpOpCount]
| pushthisExp[$RootLevel, $ExpOpCount]
@ -3451,50 +3453,26 @@ ideqvallistExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
>>
;
questionref13Exp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
questionref1Exp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
<<
UINT8 Type = 0x1;
EFI_STRING_ID DevPath = EFI_STRING_ID_INVALID;
EFI_GUID Guid = {0,};
EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;
UINT32 BitMask;
CHAR8 *QName = NULL;
UINT32 LineNo = 0;
>>
L:QuestionRef
(
(
<< Type = 0x3; >>
{
Path "=" "STRING_TOKEN" "\(" S:Number "\)" << Type = 0x4; DevPath = _STOSID(S->getText()); >>
}
{
Uuid "=" guidDefinition[Guid] << Type = 0x5; >>
}
)
|
(
"\("
(
"\("
(
QN:StringIdentifier <<
QName = QN->getText();
LineNo = QN->getLine();
LineNo = QN->getLine();
mCVfrQuestionDB.GetQuestionId (QN->getText(), NULL, QId, BitMask);
>>
| ID:Number << QId = _STOQID(ID->getText()); >>
)
"\)"
)
)
"\)"
<<
switch (Type) {
case 0x1: {CIfrQuestionRef1 QR1Obj(L->getLine()); _SAVE_OPHDR_COND (QR1Obj, ($ExpOpCount == 0), L->getLine()); QR1Obj.SetQuestionId (QId, QName, LineNo); break;}
case 0x3: {CIfrQuestionRef3 QR3Obj(L->getLine()); _SAVE_OPHDR_COND (QR3Obj, ($ExpOpCount == 0), L->getLine()); break;}
case 0x4: {CIfrQuestionRef3_2 QR3_2Obj(L->getLine()); _SAVE_OPHDR_COND (QR3_2Obj, ($ExpOpCount == 0), L->getLine()); QR3_2Obj.SetDevicePath (DevPath); break;}
case 0x5: {CIfrQuestionRef3_3 QR3_3Obj(L->getLine()); _SAVE_OPHDR_COND (QR3_3Obj, ($ExpOpCount == 0), L->getLine()); QR3_3Obj.SetDevicePath (DevPath); QR3_3Obj.SetGuid (&Guid); break;}
}
$ExpOpCount++;
>>
{ CIfrQuestionRef1 QR1Obj(L->getLine()); _SAVE_OPHDR_COND (QR1Obj, ($ExpOpCount == 0), L->getLine()); QR1Obj.SetQuestionId (QId, QName, LineNo); } $ExpOpCount++; >>
;
rulerefExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
@ -3626,7 +3604,7 @@ vfrExpressionConstant[UINT32 & RootLevel, UINT32 & ExpOpCount] :
vfrExpressionUnaryOp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
lengthExp[$RootLevel, $ExpOpCount]
| bitwisenotExp[$RootLevel, $ExpOpCount]
| question2refExp[$RootLevel, $ExpOpCount]
| question23refExp[$RootLevel, $ExpOpCount]
| stringref2Exp[$RootLevel, $ExpOpCount]
| toboolExp[$RootLevel, $ExpOpCount]
| tostringExp[$RootLevel, $ExpOpCount]
@ -3648,10 +3626,30 @@ bitwisenotExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
<< { CIfrBitWiseNot BWNObj(L->getLine()); $ExpOpCount++; } >>
;
question2refExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
question23refExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
<<
UINT8 Type = 0x1;
EFI_STRING_ID DevPath = EFI_STRING_ID_INVALID;
EFI_GUID Guid = {0,};
>>
L:QuestionRefVal
"\(" vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount] "\)"
<< { CIfrQuestionRef2 QR2Obj(L->getLine()); $ExpOpCount++; } >>
"\("
{
DevicePath "=" "STRING_TOKEN" "\(" S:Number "\)" "," << Type = 0x2; DevPath = _STOSID(S->getText()); >>
}
{
Uuid "=" guidDefinition[Guid] "," << Type = 0x3; >>
}
vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
"\)"
<<
switch (Type) {
case 0x1: {CIfrQuestionRef2 QR2Obj(L->getLine()); _SAVE_OPHDR_COND (QR2Obj, ($ExpOpCount == 0), L->getLine()); break;}
case 0x2: {CIfrQuestionRef3_2 QR3_2Obj(L->getLine()); _SAVE_OPHDR_COND (QR3_2Obj, ($ExpOpCount == 0), L->getLine()); QR3_2Obj.SetDevicePath (DevPath); break;}
case 0x3: {CIfrQuestionRef3_3 QR3_3Obj(L->getLine()); _SAVE_OPHDR_COND (QR3_3Obj, ($ExpOpCount == 0), L->getLine()); QR3_3Obj.SetDevicePath (DevPath); QR3_3Obj.SetGuid (&Guid); break;}
}
$ExpOpCount++;
>>
;
stringref2Exp[UINT32 & RootLevel, UINT32 & ExpOpCount] :

View File

@ -1,6 +1,6 @@
/** @file
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
@ -845,8 +845,8 @@ Returns:
printf (" EFI_FVB2_ALIGNMENT_256K\n");
}
if (VolumeHeader.Attributes & EFI_FVB2_ALIGNMNET_512K) {
printf (" EFI_FVB2_ALIGNMNET_512K\n");
if (VolumeHeader.Attributes & EFI_FVB2_ALIGNMENT_512K) {
printf (" EFI_FVB2_ALIGNMENT_512K\n");
}
if (VolumeHeader.Attributes & EFI_FVB2_ALIGNMENT_1M) {