TianoCore EDK2 master
Loading...
Searching...
No Matches
CapsuleApp.h
Go to the documentation of this file.
1
9#ifndef _CAPSULE_APP_H_
10#define _CAPSULE_APP_H_
11
12#include <Uefi.h>
13#include <Library/BaseLib.h>
14#include <Library/DebugLib.h>
19#include <Library/UefiLib.h>
20#include <Library/PrintLib.h>
23#include <Library/SortLib.h>
29#include <Protocol/Shell.h>
31#include <Guid/GlobalVariable.h>
32#include <Guid/CapsuleReport.h>
34#include <Guid/FmpCapsule.h>
35#include <Guid/FileInfo.h>
37#include <Guid/CapsuleVendor.h>
38#include <Guid/Gpt.h>
40
41#define CAPSULE_HEADER_SIZE 0x20
42
43#define NESTED_CAPSULE_HEADER_SIZE SIZE_4KB
44#define SYSTEM_FIRMWARE_FLAG 0x50000
45#define DEVICE_FIRMWARE_FLAG 0x78010
46
47#define MAJOR_VERSION 1
48#define MINOR_VERSION 0
49
50#define MAX_CAPSULE_NUM 10
51
52//
53// (20 * (6+5+2))+1) unicode characters from EFI FAT spec (doubled for bytes)
54//
55#define MAX_FILE_NAME_SIZE 522
56#define MAX_FILE_NAME_LEN (MAX_FILE_NAME_SIZE / sizeof(CHAR16))
57
58extern UINTN Argc;
59extern CHAR16 **Argv;
60
68GetArg (
69 VOID
70 );
71
80 VOID
81 );
82
96 IN CHAR16 *FileName,
97 OUT UINTN *BufferSize,
98 OUT VOID **Buffer
99 );
100
114 IN CHAR16 *FileName,
115 IN UINTN BufferSize,
116 IN VOID *Buffer
117 );
118
129 IN CHAR16 *CapsuleName
130 );
131
140 VOID
141 );
142
146VOID
148 VOID
149 );
150
160VOID
162 IN EFI_GUID *ImageTypeId,
163 IN UINTN ImageIndex,
164 IN CHAR16 *ImageName
165 );
166
170VOID
172 VOID
173 );
174
180VOID
182 IN BOOLEAN DumpCapsuleInfo
183 );
184
188VOID
190 VOID
191 );
192
207 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
208 OUT EFI_DEVICE_PATH_PROTOCOL **FullPath,
210 );
211
227 IN VOID **CapsuleBuffer,
228 IN UINTN *CapsuleBufferSize,
229 IN CHAR16 **FilePath,
230 IN CHAR16 *Map,
231 IN UINTN CapsuleNum
232 );
233
234#endif
UINT64 UINTN
EFI_STATUS ReadFileToBuffer(IN CHAR16 *FileName, OUT UINTN *BufferSize, OUT VOID **Buffer)
Definition: AppSupport.c:81
EFI_STATUS WriteFileFromBuffer(IN CHAR16 *FileName, IN UINTN BufferSize, IN VOID *Buffer)
Definition: AppSupport.c:159
VOID DumpProvisionedCapsule(IN BOOLEAN DumpCapsuleInfo)
Definition: CapsuleDump.c:911
EFI_STATUS GetEfiSysPartitionFromBootOptionFilePath(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT EFI_DEVICE_PATH_PROTOCOL **FullPath, OUT EFI_SIMPLE_FILE_SYSTEM_PROTOCOL **Fs)
VOID DumpEsrtData(VOID)
Definition: CapsuleDump.c:444
EFI_STATUS GetArg(VOID)
EFI_SHELL_PROTOCOL * GetShellProtocol(VOID)
Definition: AppSupport.c:49
VOID DumpAllEfiSysPartition(VOID)
EFI_STATUS DumpCapsuleStatusVariable(VOID)
Definition: CapsuleDump.c:233
EFI_STATUS DumpCapsule(IN CHAR16 *CapsuleName)
Definition: CapsuleDump.c:175
VOID DumpFmpImage(IN EFI_GUID *ImageTypeId, IN UINTN ImageIndex, IN CHAR16 *ImageName)
Definition: CapsuleDump.c:1420
EFI_STATUS ProcessCapsuleOnDisk(IN VOID **CapsuleBuffer, IN UINTN *CapsuleBufferSize, IN CHAR16 **FilePath, IN CHAR16 *Map, IN UINTN CapsuleNum)
VOID DumpFmpData(VOID)
Definition: CapsuleDump.c:1125
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Base.h:213