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

BaseTool Branch:
  https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100

Signed-off-by: lgao4
Reviewed-by: hchen30

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12214 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2011-08-26 07:46:26 +00:00
parent ba944801a9
commit 4234283c3a
186 changed files with 37663 additions and 3133 deletions

View File

@@ -96,6 +96,11 @@ struct SBufferNode {
struct SBufferNode *mNext;
};
typedef struct {
BOOLEAN CompatibleMode;
EFI_GUID *OverrideClassGuid;
} INPUT_INFO_TO_SYNTAX;
class CFormPkg {
private:
UINT32 mBufferSize;
@@ -144,7 +149,8 @@ public:
);
};
extern CFormPkg gCFormPkg;
extern CFormPkg gCFormPkg;
extern CVfrStringDB gCVfrStringDB;
struct SIfrRecord {
UINT32 mLineNo;
@@ -233,6 +239,15 @@ public:
return FALSE;
}
}
inline bool ShrinkObjBin (IN UINT8 Size) {
if ((mDelayEmit == TRUE) && (mObjBinLen > Size)) {
mObjBinLen -= Size;
return TRUE;
} else {
return FALSE;
}
}
};
/*
@@ -254,7 +269,7 @@ public:
VOID DecLength (UINT8 Size) {
if (mHeader->Length >= Size) {
mHeader -= Size;
mHeader->Length -= Size;
}
}
@@ -755,10 +770,12 @@ private:
EFI_IFR_VARSTORE_EFI *mVarStoreEfi;
public:
CIfrVarStoreEfi () : CIfrObj (EFI_IFR_VARSTORE_EFI_OP, (CHAR8 **)&mVarStoreEfi),
CIfrVarStoreEfi () : CIfrObj (EFI_IFR_VARSTORE_EFI_OP, (CHAR8 **)&mVarStoreEfi, sizeof (EFI_IFR_VARSTORE_EFI), TRUE),
CIfrOpHeader (EFI_IFR_VARSTORE_EFI_OP, &mVarStoreEfi->Header) {
mVarStoreEfi->VarStoreId = EFI_VAROFFSET_INVALID;
mVarStoreEfi->Size = 0;
memset (&mVarStoreEfi->Guid, 0, sizeof (EFI_GUID));
mVarStoreEfi->Name[0] = '\0';
}
VOID SetGuid (IN EFI_GUID *Guid) {
@@ -772,6 +789,36 @@ public:
VOID SetAttributes (IN UINT32 Attributes) {
mVarStoreEfi->Attributes = Attributes;
}
VOID SetSize (IN UINT16 Size) {
mVarStoreEfi->Size = Size;
}
VOID SetName (IN CHAR8 *Name) {
UINT8 Len;
if (Name != NULL) {
Len = (UINT8) strlen (Name);
if (Len != 0) {
if (ExpendObjBin (Len) == TRUE) {
IncLength (Len);
strcpy ((CHAR8 *)(mVarStoreEfi->Name), Name);
}
}
}
}
VOID SetBinaryLength (IN UINT16 Size) {
UINT16 Len;
Len = sizeof (EFI_IFR_VARSTORE_EFI);
if (Size > Len) {
ExpendObjBin(Size - Len);
IncLength(Size - Len);
} else {
ShrinkObjBin(Len - Size);
DecLength(Len - Size);
}
}
};
class CIfrVarStoreNameValue : public CIfrObj, public CIfrOpHeader {
@@ -809,6 +856,17 @@ public:
}
};
class CIfrModal : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_MODAL *mModal;
public:
CIfrModal () : CIfrObj (EFI_IFR_MODAL_TAG_OP, (CHAR8 **)&mModal),
CIfrOpHeader (EFI_IFR_MODAL_TAG_OP, &mModal->Header) {
}
};
class CIfrLocked : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_LOCKED *mLocked;
@@ -1043,8 +1101,8 @@ private:
EFI_IFR_REF4 *mRef4;
public:
CIfrRef4 () : CIfrObj (EFI_IFR_REF_OP, (CHAR8 **)&mRef4, sizeof(EFI_IFR_REF3)),
CIfrOpHeader (EFI_IFR_REF_OP, &mRef4->Header, sizeof (EFI_IFR_REF3)),
CIfrRef4 () : CIfrObj (EFI_IFR_REF_OP, (CHAR8 **)&mRef4, sizeof(EFI_IFR_REF4)),
CIfrOpHeader (EFI_IFR_REF_OP, &mRef4->Header, sizeof(EFI_IFR_REF4)),
CIfrQuestionHeader (&mRef4->Question) {
mRef4->FormId = 0;
mRef4->QuestionId = EFI_QUESTION_ID_INVALID;
@@ -1069,6 +1127,17 @@ public:
}
};
class CIfrRef5 : public CIfrObj, public CIfrOpHeader, public CIfrQuestionHeader {
private:
EFI_IFR_REF5 *mRef5;
public:
CIfrRef5 () : CIfrObj (EFI_IFR_REF_OP, (CHAR8 **)&mRef5, sizeof (EFI_IFR_REF5)),
CIfrOpHeader (EFI_IFR_REF_OP, &mRef5->Header, sizeof (EFI_IFR_REF5)),
CIfrQuestionHeader (&mRef5->Question) {
}
};
class CIfrResetButton : public CIfrObj, public CIfrOpHeader, public CIfrStatementHeader {
private:
EFI_IFR_RESET_BUTTON *mResetButton;
@@ -1481,6 +1550,21 @@ public:
}
};
class CIfrRefreshId : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_REFRESH_ID *mRefreshId;
public:
CIfrRefreshId () : CIfrObj (EFI_IFR_REFRESH_ID_OP, (CHAR8 **)&mRefreshId),
CIfrOpHeader (EFI_IFR_REFRESH_ID_OP, &mRefreshId->Header) {
memset (&mRefreshId->RefreshEventGroupId, 0, sizeof (EFI_GUID));
}
VOID SetRefreshEventGroutId (IN EFI_GUID *RefreshEventGroupId) {
memcpy (&mRefreshId->RefreshEventGroupId, RefreshEventGroupId, sizeof (EFI_GUID));
}
};
class CIfrVarStoreDevice : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_VARSTORE_DEVICE *mVarStoreDevice;