]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Tools/Source/GenFvImage/GenFvImageLib.h
clean up the un-suitable ';' location when declaring the functions. The regular is...
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / GenFvImage / GenFvImageLib.h
1 /*++
2
3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 GenFvImageLib.h
15
16 Abstract:
17
18 This file contains describes the public interfaces to the GenFvImage Library.
19 The basic purpose of the library is to create Firmware Volume images.
20
21 --*/
22
23 #ifndef _EFI_GEN_FV_IMAGE_LIB_H
24 #define _EFI_GEN_FV_IMAGE_LIB_H
25
26 //
27 // Include files
28 //
29 #include <windows.h>
30 #include "ParseInf.h"
31
32 //
33 // Following definition is used for FIT in IPF
34 //
35 #define COMP_TYPE_FIT_PEICORE 0x10
36 #define COMP_TYPE_FIT_UNUSED 0x7F
37
38 #define FIT_TYPE_MASK 0x7F
39 #define CHECKSUM_BIT_MASK 0x80
40
41 #pragma pack(1)
42
43 typedef struct {
44 UINT64 CompAddress;
45 UINT32 CompSize;
46 UINT16 CompVersion;
47 UINT8 CvAndType;
48 UINT8 CheckSum;
49 } FIT_TABLE;
50
51 #pragma pack()
52 //
53 // Exported function prototypes
54 //
55 EFI_STATUS
56 GenerateFvImage (
57 IN CHAR8 *InfFileImage,
58 IN UINTN InfFileSize,
59 OUT UINT8 **FvImage,
60 OUT UINTN *FvImageSize,
61 OUT CHAR8 **FvFileName,
62 OUT UINT8 **SymImage,
63 OUT UINTN *SymImageSize,
64 OUT CHAR8 **SymFileName
65 );
66
67 /*++
68
69 Routine Description:
70
71 This is the main function which will be called from application.
72
73 Arguments:
74
75 InfFileImage Buffer containing the INF file contents.
76 InfFileSize Size of the contents of the InfFileImage buffer.
77 FvImage Pointer to the FV image created.
78 FvImageSize Size of the FV image created and pointed to by FvImage.
79 FvFileName Requested name for the FV file.
80 SymImage Pointer to the Sym image created.
81 SymImageSize Size of the Sym image created and pointed to by SymImage.
82 SymFileName Requested name for the Sym file.
83
84 Returns:
85
86 EFI_SUCCESS Function completed successfully.
87 EFI_OUT_OF_RESOURCES Could not allocate required resources.
88 EFI_ABORTED Error encountered.
89 EFI_INVALID_PARAMETER A required parameter was NULL.
90
91 --*/
92 EFI_STATUS
93 UpdatePeiCoreEntryInFit (
94 IN FIT_TABLE *FitTablePtr,
95 IN UINT64 PeiCorePhysicalAddress
96 );
97
98 /*++
99
100 Routine Description:
101
102 This function is used to update the Pei Core address in FIT, this can be used by Sec core to pass control from
103 Sec to Pei Core
104
105 Arguments:
106
107 FitTablePtr - The pointer of FIT_TABLE.
108 PeiCorePhysicalAddress - The address of Pei Core entry.
109
110 Returns:
111
112 EFI_SUCCESS - The PEI_CORE FIT entry was updated successfully.
113 EFI_NOT_FOUND - Not found the PEI_CORE FIT entry.
114
115 --*/
116 VOID
117 UpdateFitCheckSum (
118 IN FIT_TABLE *FitTablePtr
119 );
120
121 /*++
122
123 Routine Description:
124
125 This function is used to update the checksum for FIT.
126
127
128 Arguments:
129
130 FitTablePtr - The pointer of FIT_TABLE.
131
132 Returns:
133
134 None.
135
136 --*/
137 #endif