3 The API to create the binary.
5 Copyright (c) 2011-2019, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef _BINARY_CREATE_H_
11 #define _BINARY_CREATE_H_ 1
15 #include "Decompress.h"
16 #include "CommonLib.h"
17 #include "EfiUtilityMsgs.h"
18 #include "FirmwareVolumeBufferLib.h"
20 #include "ParseGuidedSectionTools.h"
21 #include "StringFuncs.h"
23 #include <Common/UefiBaseTypes.h>
24 #include <Common/UefiInternalFormRepresentation.h>
25 #include <Common/UefiCapsule.h>
26 #include <Common/PiFirmwareFile.h>
27 #include <Common/PiFirmwareVolume.h>
28 #include <Guid/PiFirmwareFileSystem.h>
29 #include <IndustryStandard/PeImage.h>
30 #include <Protocol/GuidedSectionExtraction.h>
32 //1AE42876-008F-4161-B2B7-1C0D15C5EF43
33 #define EFI_FFS_BFV_FOR_MULTIPLATFORM_GUID \
34 { 0x1ae42876, 0x008f, 0x4161, { 0xb2, 0xb7, 0x1c, 0xd, 0x15, 0xc5, 0xef, 0x43 }}
36 extern EFI_GUID gEfiFfsBfvForMultiPlatformGuid
;
38 // {003E7B41-98A2-4BE2-B27A-6C30C7655225}
39 #define EFI_FFS_BFV_FOR_MULTIPLATFORM_GUID2 \
40 { 0x3e7b41, 0x98a2, 0x4be2, { 0xb2, 0x7a, 0x6c, 0x30, 0xc7, 0x65, 0x52, 0x25 }}
42 extern EFI_GUID gEfiFfsBfvForMultiPlatformGuid2
;
44 typedef UINT64 SKU_ID
;
59 // Full size, it must be at 8 byte alignment.
63 // HeaderSize includes HeaderSize fields and DefaultInfo arrays
67 // DefaultInfo arrays those have the same default setting.
69 PCD_DEFAULT_INFO DefaultInfo
[1];
71 // Default data is stored as variable storage or the array of DATA_DELTA.
75 #define PCD_NV_STORE_DEFAULT_BUFFER_SIGNATURE SIGNATURE_32('N', 'S', 'D', 'B')
79 // PCD_NV_STORE_DEFAULT_BUFFER_SIGNATURE
83 // Length of the taken default buffer
87 // Length of the total reserved buffer
91 // Reserved for 8 byte alignment
94 // one or more PCD_DEFAULT_DATA
95 } PCD_NV_STORE_DEFAULT_BUFFER_HEADER
;
98 // NvStoreDefaultValueBuffer layout:
99 // +-------------------------------------+
100 // | PCD_NV_STORE_DEFAULT_BUFFER_HEADER |
101 // +-------------------------------------+
102 // | PCD_DEFAULT_DATA (DEFAULT, Standard)|
103 // +-------------------------------------+
104 // | PCD_DATA_DELTA (DEFAULT, Standard)|
105 // +-------------------------------------+
107 // +-------------------------------------+
108 // | PCD_DEFAULT_DATA (SKU A, Standard) |
109 // +-------------------------------------+
110 // | PCD_DATA_DELTA (SKU A, Standard) |
111 // +-------------------------------------+
113 // +-------------------------------------+
126 Create the Ras section in FFS
128 @param[in] InputFilePath The input file path and name.
129 @param[in] OutputFilePath The output file path and name.
136 IN CHAR8
* InputFilePath
,
137 IN CHAR8
* OutputFilePath
141 Create the Ras type of FFS
143 @param[in] InputFilePath .efi file, it's optional unless process PE/TE section.
144 @param[in] OutputFilePath .te or .pe file
151 IN CHAR8
** InputFilePaths
,
152 IN CHAR8
* OutputFilePath
,
153 IN BOOLEAN SizeOptimized