]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Follow PI spec to update ExtendedSize in EFI_FFS_FILE_HEADER2
authorStar Zeng <star.zeng@intel.com>
Mon, 24 Aug 2015 01:43:20 +0000 (01:43 +0000)
committerlzeng14 <lzeng14@Edk2>
Mon, 24 Aug 2015 01:43:20 +0000 (01:43 +0000)
for FFS data above 16 bytes alignment requirement.

PI spec requires FFS header to be at 8 bytes alignment to FV header.
And, FFS data alignment requires the beginning of the file data must
be aligned on a particular boundary, such as 1, 16, 128 bytes or above.
If FFS data alignment requires to be above 16 bytes, and FFS header
must be at 8 byte alignment, so FFS header size must be multiple of 8.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18263 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Pi/PiFirmwareFile.h

index 1f9442918839bba81572eb0b5272857ebab789aa..734344430aa6cdf90b1e3107190e1a5005d9864e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The firmware file related definitions in PI.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under\r
 the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
@@ -11,7 +11,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
   @par Revision Reference:\r
-  PI Version 1.2.\r
+  PI Version 1.4.\r
 \r
 **/\r
 \r
@@ -173,7 +173,7 @@ typedef struct {
   /// If FFS_ATTRIB_LARGE_FILE is set in Attributes, then ExtendedSize exists and Size must be set to zero.\r
   /// If FFS_ATTRIB_LARGE_FILE is not set then EFI_FFS_FILE_HEADER is used.\r
   ///\r
-  UINT32                    ExtendedSize;\r
+  UINT64                    ExtendedSize;\r
 } EFI_FFS_FILE_HEADER2;\r
 \r
 #define IS_FFS_FILE2(FfsFileHeaderPtr) \\r
@@ -183,7 +183,7 @@ typedef struct {
     ((UINT32) (*((UINT32 *) ((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Size) & 0x00ffffff))\r
 \r
 #define FFS_FILE2_SIZE(FfsFileHeaderPtr) \\r
-    (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize)\r
+    ((UINT32) (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize))\r
 \r
 typedef UINT8 EFI_SECTION_TYPE;\r
 \r