]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/GenFv/GenFvInternalLib.h
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / C / GenFv / GenFvInternalLib.h
index 21993b5e7be493d081eb8932d5b2c8e49ccc4905..6cfa37064544cf3f41847812f8dbe88ff5036d00 100644 (file)
@@ -1,22 +1,15 @@
 /** @file\r
+This file contains describes the public interfaces to the GenFvImage Library.\r
+The basic purpose of the library is to create Firmware Volume images.\r
 \r
-Copyright (c) 2004 - 2013, 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, 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
+http://opensource.org/licenses/bsd-license.php\r
 \r
-Module Name:\r
-  \r
-  GenFvInternalLib.h\r
-\r
-Abstract:\r
-\r
-  This file contains describes the public interfaces to the GenFvImage Library.\r
-  The basic purpose of the library is to create Firmware Volume images.\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -78,7 +71,7 @@ Abstract:
 #define EFI_BLOCK_SIZE_STRING             "EFI_BLOCK_SIZE"\r
 #define EFI_GUID_STRING                   "EFI_GUID"\r
 #define EFI_FV_FILESYSTEMGUID_STRING      "EFI_FV_GUID"\r
-#define EFI_FV_NAMEGUID_STRING            "EFI_FVNAME_GUID" \r
+#define EFI_FV_NAMEGUID_STRING            "EFI_FVNAME_GUID"\r
 #define EFI_CAPSULE_GUID_STRING           "EFI_CAPSULE_GUID"\r
 #define EFI_CAPSULE_HEADER_SIZE_STRING    "EFI_CAPSULE_HEADER_SIZE"\r
 #define EFI_CAPSULE_FLAGS_STRING          "EFI_CAPSULE_FLAGS"\r
@@ -112,38 +105,38 @@ Abstract:
 #define EFI_FVB2_WRITE_LOCK_CAP_STRING     "EFI_WRITE_LOCK_CAP"\r
 #define EFI_FVB2_WRITE_LOCK_STATUS_STRING  "EFI_WRITE_LOCK_STATUS"\r
 \r
-#define EFI_FVB2_ALIGNMENT_1_STRING       "EFI_FVB2_ALIGNMENT_1"   \r
-#define EFI_FVB2_ALIGNMENT_2_STRING       "EFI_FVB2_ALIGNMENT_2"   \r
-#define EFI_FVB2_ALIGNMENT_4_STRING       "EFI_FVB2_ALIGNMENT_4"   \r
-#define EFI_FVB2_ALIGNMENT_8_STRING       "EFI_FVB2_ALIGNMENT_8"   \r
-#define EFI_FVB2_ALIGNMENT_16_STRING      "EFI_FVB2_ALIGNMENT_16"  \r
-#define EFI_FVB2_ALIGNMENT_32_STRING      "EFI_FVB2_ALIGNMENT_32"  \r
-#define EFI_FVB2_ALIGNMENT_64_STRING      "EFI_FVB2_ALIGNMENT_64"  \r
-#define EFI_FVB2_ALIGNMENT_128_STRING     "EFI_FVB2_ALIGNMENT_128" \r
-#define EFI_FVB2_ALIGNMENT_256_STRING     "EFI_FVB2_ALIGNMENT_256" \r
-#define EFI_FVB2_ALIGNMENT_512_STRING     "EFI_FVB2_ALIGNMENT_512" \r
-#define EFI_FVB2_ALIGNMENT_1K_STRING      "EFI_FVB2_ALIGNMENT_1K"  \r
-#define EFI_FVB2_ALIGNMENT_2K_STRING      "EFI_FVB2_ALIGNMENT_2K"  \r
-#define EFI_FVB2_ALIGNMENT_4K_STRING      "EFI_FVB2_ALIGNMENT_4K"  \r
-#define EFI_FVB2_ALIGNMENT_8K_STRING      "EFI_FVB2_ALIGNMENT_8K"  \r
-#define EFI_FVB2_ALIGNMENT_16K_STRING     "EFI_FVB2_ALIGNMENT_16K" \r
-#define EFI_FVB2_ALIGNMENT_32K_STRING     "EFI_FVB2_ALIGNMENT_32K" \r
-#define EFI_FVB2_ALIGNMENT_64K_STRING     "EFI_FVB2_ALIGNMENT_64K" \r
+#define EFI_FVB2_ALIGNMENT_1_STRING       "EFI_FVB2_ALIGNMENT_1"\r
+#define EFI_FVB2_ALIGNMENT_2_STRING       "EFI_FVB2_ALIGNMENT_2"\r
+#define EFI_FVB2_ALIGNMENT_4_STRING       "EFI_FVB2_ALIGNMENT_4"\r
+#define EFI_FVB2_ALIGNMENT_8_STRING       "EFI_FVB2_ALIGNMENT_8"\r
+#define EFI_FVB2_ALIGNMENT_16_STRING      "EFI_FVB2_ALIGNMENT_16"\r
+#define EFI_FVB2_ALIGNMENT_32_STRING      "EFI_FVB2_ALIGNMENT_32"\r
+#define EFI_FVB2_ALIGNMENT_64_STRING      "EFI_FVB2_ALIGNMENT_64"\r
+#define EFI_FVB2_ALIGNMENT_128_STRING     "EFI_FVB2_ALIGNMENT_128"\r
+#define EFI_FVB2_ALIGNMENT_256_STRING     "EFI_FVB2_ALIGNMENT_256"\r
+#define EFI_FVB2_ALIGNMENT_512_STRING     "EFI_FVB2_ALIGNMENT_512"\r
+#define EFI_FVB2_ALIGNMENT_1K_STRING      "EFI_FVB2_ALIGNMENT_1K"\r
+#define EFI_FVB2_ALIGNMENT_2K_STRING      "EFI_FVB2_ALIGNMENT_2K"\r
+#define EFI_FVB2_ALIGNMENT_4K_STRING      "EFI_FVB2_ALIGNMENT_4K"\r
+#define EFI_FVB2_ALIGNMENT_8K_STRING      "EFI_FVB2_ALIGNMENT_8K"\r
+#define EFI_FVB2_ALIGNMENT_16K_STRING     "EFI_FVB2_ALIGNMENT_16K"\r
+#define EFI_FVB2_ALIGNMENT_32K_STRING     "EFI_FVB2_ALIGNMENT_32K"\r
+#define EFI_FVB2_ALIGNMENT_64K_STRING     "EFI_FVB2_ALIGNMENT_64K"\r
 #define EFI_FVB2_ALIGNMENT_128K_STRING    "EFI_FVB2_ALIGNMENT_128K"\r
 #define EFI_FVB2_ALIGNMENT_256K_STRING    "EFI_FVB2_ALIGNMENT_256K"\r
 #define EFI_FVB2_ALIGNMENT_512K_STRING    "EFI_FVB2_ALIGNMENT_512K"\r
-#define EFI_FVB2_ALIGNMENT_1M_STRING      "EFI_FVB2_ALIGNMENT_1M"  \r
-#define EFI_FVB2_ALIGNMENT_2M_STRING      "EFI_FVB2_ALIGNMENT_2M"  \r
-#define EFI_FVB2_ALIGNMENT_4M_STRING      "EFI_FVB2_ALIGNMENT_4M"  \r
-#define EFI_FVB2_ALIGNMENT_8M_STRING      "EFI_FVB2_ALIGNMENT_8M"  \r
-#define EFI_FVB2_ALIGNMENT_16M_STRING     "EFI_FVB2_ALIGNMENT_16M" \r
-#define EFI_FVB2_ALIGNMENT_32M_STRING     "EFI_FVB2_ALIGNMENT_32M" \r
-#define EFI_FVB2_ALIGNMENT_64M_STRING     "EFI_FVB2_ALIGNMENT_64M" \r
+#define EFI_FVB2_ALIGNMENT_1M_STRING      "EFI_FVB2_ALIGNMENT_1M"\r
+#define EFI_FVB2_ALIGNMENT_2M_STRING      "EFI_FVB2_ALIGNMENT_2M"\r
+#define EFI_FVB2_ALIGNMENT_4M_STRING      "EFI_FVB2_ALIGNMENT_4M"\r
+#define EFI_FVB2_ALIGNMENT_8M_STRING      "EFI_FVB2_ALIGNMENT_8M"\r
+#define EFI_FVB2_ALIGNMENT_16M_STRING     "EFI_FVB2_ALIGNMENT_16M"\r
+#define EFI_FVB2_ALIGNMENT_32M_STRING     "EFI_FVB2_ALIGNMENT_32M"\r
+#define EFI_FVB2_ALIGNMENT_64M_STRING     "EFI_FVB2_ALIGNMENT_64M"\r
 #define EFI_FVB2_ALIGNMENT_128M_STRING    "EFI_FVB2_ALIGNMENT_128M"\r
 #define EFI_FVB2_ALIGNMENT_256M_STRING    "EFI_FVB2_ALIGNMENT_256M"\r
 #define EFI_FVB2_ALIGNMENT_512M_STRING    "EFI_FVB2_ALIGNMENT_512M"\r
-#define EFI_FVB2_ALIGNMENT_1G_STRING      "EFI_FVB2_ALIGNMENT_1G"  \r
-#define EFI_FVB2_ALIGNMENT_2G_STRING      "EFI_FVB2_ALIGNMENT_2G"  \r
+#define EFI_FVB2_ALIGNMENT_1G_STRING      "EFI_FVB2_ALIGNMENT_1G"\r
+#define EFI_FVB2_ALIGNMENT_2G_STRING      "EFI_FVB2_ALIGNMENT_2G"\r
 \r
 #define EFI_FV_WEAK_ALIGNMENT_STRING      "EFI_WEAK_ALIGNMENT"\r
 \r
@@ -168,7 +161,7 @@ Abstract:
 // VTF (Firmware Volume Top File) signatures\r
 //\r
 #define IA32_X64_VTF_SIGNATURE_OFFSET    0x14\r
-#define IA32_X64_VTF0_SIGNATURE EFI_SIGNATURE_32('V','T','F',0)\r
+#define IA32_X64_VTF0_SIGNATURE SIGNATURE_32('V','T','F',0)\r
 \r
 //\r
 // Defines to calculate the offset for PEI CORE entry points\r
@@ -214,7 +207,7 @@ Abstract:
 //\r
 typedef struct {\r
   UINTN Size;\r
-  CHAR8 ComponentName[_MAX_PATH];\r
+  CHAR8 ComponentName[MAX_LONG_FILE_PATH];\r
 } COMPONENT_INFO;\r
 \r
 //\r
@@ -227,12 +220,12 @@ typedef struct {
   BOOLEAN                 FvFileSystemGuidSet;\r
   EFI_GUID                FvNameGuid;\r
   BOOLEAN                 FvNameGuidSet;\r
-  CHAR8                   FvExtHeaderFile[_MAX_PATH];\r
+  CHAR8                   FvExtHeaderFile[MAX_LONG_FILE_PATH];\r
   UINTN                   Size;\r
   EFI_FVB_ATTRIBUTES_2    FvAttributes;\r
-  CHAR8                   FvName[_MAX_PATH];\r
+  CHAR8                   FvName[MAX_LONG_FILE_PATH];\r
   EFI_FV_BLOCK_MAP_ENTRY  FvBlocks[MAX_NUMBER_OF_FV_BLOCKS];\r
-  CHAR8                   FvFiles[MAX_NUMBER_OF_FILES_IN_FV][_MAX_PATH];\r
+  CHAR8                   FvFiles[MAX_NUMBER_OF_FILES_IN_FV][MAX_LONG_FILE_PATH];\r
   UINT32                  SizeofFvFiles[MAX_NUMBER_OF_FILES_IN_FV];\r
   BOOLEAN                 IsPiFvImage;\r
   INT8                    ForceRebase;\r
@@ -242,8 +235,8 @@ typedef struct {
   EFI_GUID                CapGuid;\r
   UINT32                  HeaderSize;\r
   UINT32                  Flags;\r
-  CHAR8                   CapName[_MAX_PATH];\r
-  CHAR8                   CapFiles[MAX_NUMBER_OF_FILES_IN_CAP][_MAX_PATH];\r
+  CHAR8                   CapName[MAX_LONG_FILE_PATH];\r
+  CHAR8                   CapFiles[MAX_NUMBER_OF_FILES_IN_CAP][MAX_LONG_FILE_PATH];\r
 } CAP_INFO;\r
 \r
 #pragma pack(1)\r
@@ -343,7 +336,7 @@ EFI_STATUS
 FindApResetVectorPosition (\r
   IN  MEMORY_FILE  *FvImage,\r
   OUT UINT8        **Pointer\r
-  ); \r
+  );\r
 \r
 EFI_STATUS\r
 CalculateFvSize (\r
@@ -351,9 +344,9 @@ CalculateFvSize (
   );\r
 \r
 EFI_STATUS\r
-FfsRebase ( \r
-  IN OUT  FV_INFO               *FvInfo, \r
-  IN      CHAR8                 *FileName,           \r
+FfsRebase (\r
+  IN OUT  FV_INFO               *FvInfo,\r
+  IN      CHAR8                 *FileName,\r
   IN OUT  EFI_FFS_FILE_HEADER   *FfsFile,\r
   IN      UINTN                 XipOffset,\r
   IN      FILE                  *FvMapFile\r
@@ -372,7 +365,7 @@ GenerateCapImage (
 \r
 Routine Description:\r
 \r
-  This is the main function which will be called from application to \r
+  This is the main function which will be called from application to\r
   generate UEFI Capsule image.\r
 \r
 Arguments:\r
@@ -395,14 +388,14 @@ EFI_STATUS
 GenerateFvImage (\r
   IN CHAR8                *InfFileImage,\r
   IN UINTN                InfFileSize,\r
-  IN CHAR8                *FvFileName,  \r
+  IN CHAR8                *FvFileName,\r
   IN CHAR8                *MapFileName\r
   )\r
 /*++\r
 \r
 Routine Description:\r
 \r
-  This is the main function which will be called from application to \r
+  This is the main function which will be called from application to\r
   generate Firmware Image conforms to PI spec.\r
 \r
 Arguments:\r
@@ -411,9 +404,9 @@ Arguments:
   InfFileSize    Size of the contents of the InfFileImage buffer.\r
   FvFileName     Requested name for the FV file.\r
   MapFileName    Fv map file to log fv driver information.\r
-    \r
+\r
 Returns:\r
\r
+\r
   EFI_SUCCESS             Function completed successfully.\r
   EFI_OUT_OF_RESOURCES    Could not allocate required resources.\r
   EFI_ABORTED             Error encountered.\r