/** @file\r
Implements write firmware file.\r
\r
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
{\r
UINT8 FvFileAlignment;\r
UINT8 FfsFileAlignment;\r
+ UINT8 FfsFileAlignment2;\r
\r
FvFileAlignment = (UINT8) (FvFileAttrib & EFI_FV_FILE_ATTRIB_ALIGNMENT);\r
FfsFileAlignment = 0;\r
+ FfsFileAlignment2 = 0;\r
\r
switch (FvFileAlignment) {\r
case 0:\r
case 16:\r
FfsFileAlignment = 7;\r
break;\r
+\r
+ case 17:\r
+ FfsFileAlignment = 0;\r
+ FfsFileAlignment2 = 1;\r
+ break;\r
+ case 18:\r
+ FfsFileAlignment = 1;\r
+ FfsFileAlignment2 = 1;\r
+ break;\r
+ case 19:\r
+ FfsFileAlignment = 2;\r
+ FfsFileAlignment2 = 1;\r
+ break;\r
+ case 20:\r
+ FfsFileAlignment = 3;\r
+ FfsFileAlignment2 = 1;\r
+ break;\r
+ case 21:\r
+ FfsFileAlignment = 4;\r
+ FfsFileAlignment2 = 1;\r
+ break;\r
+ case 22:\r
+ FfsFileAlignment = 5;\r
+ FfsFileAlignment2 = 1;\r
+ break;\r
+ case 23:\r
+ FfsFileAlignment = 6;\r
+ FfsFileAlignment2 = 1;\r
+ break;\r
+ case 24:\r
+ FfsFileAlignment = 7;\r
+ FfsFileAlignment2 = 1;\r
+ break;\r
}\r
\r
- *FfsFileAttrib = (UINT8) (FfsFileAlignment << 3);\r
+ *FfsFileAttrib = (UINT8) ((FfsFileAlignment << 3) | (FfsFileAlignment2 << 1));\r
\r
return ;\r
}\r