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@18262
6f19259b-4bc3-4df7-8a09-
765794883524
/** @file\r
EFI Firmware Volume routines which work on a Fv image in buffers.\r
\r
-Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
return 0;\r
}\r
if (Ffs->Attributes & FFS_ATTRIB_LARGE_FILE) {\r
- return ((EFI_FFS_FILE_HEADER2 *)Ffs)->ExtendedSize;\r
+ return (UINT32) ((EFI_FFS_FILE_HEADER2 *)Ffs)->ExtendedSize;\r
}\r
return FvBufExpand3ByteSize(Ffs->Size);\r
}\r
/** @file\r
These functions assist in parsing and manipulating a Firmware Volume.\r
\r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
return 0;\r
}\r
if (FfsHeader->Attributes & FFS_ATTRIB_LARGE_FILE) {\r
- return ((EFI_FFS_FILE_HEADER2 *)FfsHeader)->ExtendedSize;\r
+ return (UINT32) ((EFI_FFS_FILE_HEADER2 *)FfsHeader)->ExtendedSize;\r
} else {\r
return GetLength(FfsHeader->Size);\r
}\r
The firmware file related definitions in PI.\r
\r
@par Revision Reference:\r
- Version 1.0.\r
+ Version 1.4.\r
\r
- Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
EFI_FFS_FILE_ATTRIBUTES Attributes;\r
UINT8 Size[3];\r
EFI_FFS_FILE_STATE State;\r
- UINT32 ExtendedSize;\r
+ UINT64 ExtendedSize;\r
} EFI_FFS_FILE_HEADER2;\r
\r
#define MAX_FFS_SIZE 0x1000000\r