From e8a47801a1dfdb148b1bfcd5bdc8ebc3bf51f92d Mon Sep 17 00:00:00 2001
From: Liming Gao <liming.gao@intel.com>
Date: Mon, 18 Nov 2013 07:41:21 +0000
Subject: Sync BaseTool trunk (version r2610) into EDKII BaseTools.

Signed-off-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14856 6f19259b-4bc3-4df7-8a09-765794883524
---
 BaseTools/Source/C/Include/Common/BuildVersion.h   |  2 +-
 BaseTools/Source/C/Include/Common/PiFirmwareFile.h | 78 +++++++++++++++++++++-
 .../Source/C/Include/Common/PiFirmwareVolume.h     |  3 +-
 3 files changed, 80 insertions(+), 3 deletions(-)

(limited to 'BaseTools/Source/C/Include/Common')

diff --git a/BaseTools/Source/C/Include/Common/BuildVersion.h b/BaseTools/Source/C/Include/Common/BuildVersion.h
index f524cefc9b..b84bd05714 100644
--- a/BaseTools/Source/C/Include/Common/BuildVersion.h
+++ b/BaseTools/Source/C/Include/Common/BuildVersion.h
@@ -14,4 +14,4 @@
 
 **/
 
-#define __BUILD_VERSION "Build 2601"
+#define __BUILD_VERSION "Build 2610"
diff --git a/BaseTools/Source/C/Include/Common/PiFirmwareFile.h b/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
index e66f40ca43..1790c3a1e8 100644
--- a/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
+++ b/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
@@ -1,7 +1,7 @@
 /** @file
   The firmware file related definitions in PI.
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2013, 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
@@ -64,6 +64,7 @@ typedef UINT8 EFI_FFS_FILE_STATE;
 // 
 // FFS File Attributes.
 // 
+#define FFS_ATTRIB_LARGE_FILE         0x01
 #define FFS_ATTRIB_FIXED              0x04
 #define FFS_ATTRIB_DATA_ALIGNMENT     0x38
 #define FFS_ATTRIB_CHECKSUM           0x40
@@ -104,6 +105,17 @@ typedef struct {
   EFI_FFS_FILE_STATE      State;
 } EFI_FFS_FILE_HEADER;
 
+typedef struct {
+  EFI_GUID                Name;
+  EFI_FFS_INTEGRITY_CHECK IntegrityCheck;
+  EFI_FV_FILETYPE         Type;
+  EFI_FFS_FILE_ATTRIBUTES Attributes;
+  UINT8                   Size[3];
+  EFI_FFS_FILE_STATE      State;
+  UINT32                  ExtendedSize;
+} EFI_FFS_FILE_HEADER2;
+
+#define MAX_FFS_SIZE        0x1000000
 
 typedef UINT8 EFI_SECTION_TYPE;
 
@@ -142,11 +154,20 @@ typedef struct {
   EFI_SECTION_TYPE  Type;
 } EFI_COMMON_SECTION_HEADER;
 
+typedef struct {
+  UINT8             Size[3];
+  EFI_SECTION_TYPE  Type;
+  UINT32            ExtendedSize;
+} EFI_COMMON_SECTION_HEADER2;
+
+#define MAX_SECTION_SIZE        0x1000000
+
 //
 // Leaf section type that contains an 
 // IA-32 16-bit executable image.
 // 
 typedef EFI_COMMON_SECTION_HEADER EFI_COMPATIBILITY16_SECTION;
+typedef EFI_COMMON_SECTION_HEADER2 EFI_COMPATIBILITY16_SECTION2;
 
 //
 // CompressionType of EFI_COMPRESSION_SECTION.
@@ -163,15 +184,23 @@ typedef struct {
   UINT8                       CompressionType;
 } EFI_COMPRESSION_SECTION;
 
+typedef struct {
+  EFI_COMMON_SECTION_HEADER2  CommonHeader;
+  UINT32                      UncompressedLength;
+  UINT8                       CompressionType;
+} EFI_COMPRESSION_SECTION2;
+
 //
 // Leaf section which could be used to determine the dispatch order of DXEs.
 // 
 typedef EFI_COMMON_SECTION_HEADER EFI_DXE_DEPEX_SECTION;
+typedef EFI_COMMON_SECTION_HEADER2 EFI_DXE_DEPEX_SECTION2;
 
 //
 // Leaf section witch contains a PI FV.
 // 
 typedef EFI_COMMON_SECTION_HEADER EFI_FIRMWARE_VOLUME_IMAGE_SECTION;
+typedef EFI_COMMON_SECTION_HEADER2 EFI_FIRMWARE_VOLUME_IMAGE_SECTION2;
 
 //
 // Leaf section which contains a single GUID.
@@ -181,6 +210,11 @@ typedef struct {
   EFI_GUID                    SubTypeGuid;
 } EFI_FREEFORM_SUBTYPE_GUID_SECTION;
 
+typedef struct {
+  EFI_COMMON_SECTION_HEADER2  CommonHeader;
+  EFI_GUID                    SubTypeGuid;
+} EFI_FREEFORM_SUBTYPE_GUID_SECTION2;
+
 //
 // Attributes of EFI_GUID_DEFINED_SECTION
 // 
@@ -196,30 +230,42 @@ typedef struct {
   UINT16                      Attributes;
 } EFI_GUID_DEFINED_SECTION;
 
+typedef struct {
+  EFI_COMMON_SECTION_HEADER2  CommonHeader;
+  EFI_GUID                    SectionDefinitionGuid;
+  UINT16                      DataOffset;
+  UINT16                      Attributes;
+} EFI_GUID_DEFINED_SECTION2;
+
 //
 // Leaf section which contains PE32+ image.
 // 
 typedef EFI_COMMON_SECTION_HEADER EFI_PE32_SECTION;
+typedef EFI_COMMON_SECTION_HEADER2 EFI_PE32_SECTION2;
 
 //
 // Leaf section which contains PIC image.
 // 
 typedef EFI_COMMON_SECTION_HEADER EFI_PIC_SECTION;
+typedef EFI_COMMON_SECTION_HEADER2 EFI_PIC_SECTION2;
 
 //
 // Leaf section which used to determine the dispatch order of PEIMs.
 // 
 typedef EFI_COMMON_SECTION_HEADER EFI_PEI_DEPEX_SECTION;
+typedef EFI_COMMON_SECTION_HEADER2 EFI_PEI_DEPEX_SECTION2;
 
 //
 // Leaf section which constains the position-independent-code image.
 // 
 typedef EFI_COMMON_SECTION_HEADER EFI_TE_SECTION;
+typedef EFI_COMMON_SECTION_HEADER2 EFI_TE_SECTION2;
 
 //
 // Leaf section which contains an array of zero or more bytes.
 // 
 typedef EFI_COMMON_SECTION_HEADER EFI_RAW_SECTION;
+typedef EFI_COMMON_SECTION_HEADER2 EFI_RAW_SECTION2;
 
 //
 // Leaf section which contains a unicode string that 
@@ -234,6 +280,14 @@ typedef struct {
   CHAR16                      FileNameString[1];
 } EFI_USER_INTERFACE_SECTION;
 
+typedef struct {
+  EFI_COMMON_SECTION_HEADER2  CommonHeader;
+
+  //
+  // Array of unicode string.
+  // 
+  CHAR16                      FileNameString[1];
+} EFI_USER_INTERFACE_SECTION2;
 
 //
 // Leaf section which contains a numeric build number and
@@ -245,6 +299,11 @@ typedef struct {
   CHAR16                      VersionString[1];
 } EFI_VERSION_SECTION;
 
+typedef struct {
+  EFI_COMMON_SECTION_HEADER2  CommonHeader;
+  UINT16                      BuildNumber;
+  CHAR16                      VersionString[1];
+} EFI_VERSION_SECTION2;
 
 #define SECTION_SIZE(SectionHeaderPtr) \
     ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) SectionHeaderPtr)->Size) & 0x00ffffff))
@@ -266,6 +325,23 @@ typedef union {
   EFI_FIRMWARE_VOLUME_IMAGE_SECTION *FVImageSection;
   EFI_FREEFORM_SUBTYPE_GUID_SECTION *FreeformSubtypeSection;
   EFI_RAW_SECTION                   *RawSection;
+  //
+  // For section whose size is equal or greater than 0x1000000
+  //
+  EFI_COMMON_SECTION_HEADER2         *CommonHeader2;
+  EFI_COMPRESSION_SECTION2           *CompressionSection2;
+  EFI_GUID_DEFINED_SECTION2          *GuidDefinedSection2;
+  EFI_PE32_SECTION2                  *Pe32Section2;
+  EFI_PIC_SECTION2                   *PicSection2;
+  EFI_TE_SECTION2                    *TeSection2;
+  EFI_PEI_DEPEX_SECTION2             *PeimHeaderSection2;
+  EFI_DXE_DEPEX_SECTION2             *DependencySection2;
+  EFI_VERSION_SECTION2               *VersionSection2;
+  EFI_USER_INTERFACE_SECTION2        *UISection2;
+  EFI_COMPATIBILITY16_SECTION2       *Code16Section2;
+  EFI_FIRMWARE_VOLUME_IMAGE_SECTION2 *FVImageSection2;
+  EFI_FREEFORM_SUBTYPE_GUID_SECTION2 *FreeformSubtypeSection2;
+  EFI_RAW_SECTION2                   *RawSection2;
 } EFI_FILE_SECTION_POINTER;
 
 #endif
diff --git a/BaseTools/Source/C/Include/Common/PiFirmwareVolume.h b/BaseTools/Source/C/Include/Common/PiFirmwareVolume.h
index 0c8e29e1ce..ea06eee695 100644
--- a/BaseTools/Source/C/Include/Common/PiFirmwareVolume.h
+++ b/BaseTools/Source/C/Include/Common/PiFirmwareVolume.h
@@ -1,7 +1,7 @@
 /** @file
   The firmware volume related definitions in PI.
 
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2013, 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
@@ -54,6 +54,7 @@ typedef UINT32  EFI_FVB_ATTRIBUTES_2;
 #define EFI_FVB2_WRITE_LOCK_CAP     0x00004000
 #define EFI_FVB2_WRITE_LOCK_STATUS  0x00008000
 #define EFI_FVB2_ALIGNMENT          0x001F0000
+#define EFI_FVB2_WEAK_ALIGNMENT     0x80000000
 #define EFI_FVB2_ALIGNMENT_1        0x00000000
 #define EFI_FVB2_ALIGNMENT_2        0x00010000
 #define EFI_FVB2_ALIGNMENT_4        0x00020000
-- 
cgit v1.2.3