]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.h
2 Defines several datastructures used by Capsule On Disk feature.
3 They are mainly used for FAT files.
5 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef _CAPSULES_ON_DISK_H_
11 #define _CAPSULES_ON_DISK_H_
14 #include <Pi/PiMultiPhase.h>
16 #include <Library/UefiLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/BaseLib.h>
19 #include <Library/UefiBootServicesTableLib.h>
20 #include <Library/UefiRuntimeServicesTableLib.h>
21 #include <Library/UefiRuntimeLib.h>
22 #include <Library/BaseMemoryLib.h>
23 #include <Library/MemoryAllocationLib.h>
24 #include <Library/FileHandleLib.h>
25 #include <Library/CapsuleLib.h>
26 #include <Library/DevicePathLib.h>
27 #include <Library/PrintLib.h>
28 #include <Library/UefiBootManagerLib.h>
30 #include <Protocol/SimpleFileSystem.h>
31 #include <Protocol/DiskIo.h>
32 #include <Protocol/BlockIo.h>
34 #include <Guid/CapsuleVendor.h>
35 #include <Guid/FileInfo.h>
36 #include <Guid/GlobalVariable.h>
39 // This data structure is the part of FILE_INFO_ENTRY
41 #define FILE_INFO_SIGNATURE SIGNATURE_32 ('F', 'L', 'I', 'F')
44 // LoadOptionNumber of the boot option where the capsules is relocated.
46 #define COD_RELOCATION_LOAD_OPTION_VAR_NAME L"CodRelocationLoadOption"
49 // (20 * (6+5+2))+1) unicode characters from EFI FAT spec (doubled for bytes)
51 #define MAX_FILE_NAME_SIZE 522
52 #define MAX_FILE_NAME_LEN (MAX_FILE_NAME_SIZE / sizeof(CHAR16))
53 #define MAX_FILE_INFO_LEN (OFFSET_OF(EFI_FILE_INFO, FileName) + MAX_FILE_NAME_LEN)
57 LIST_ENTRY Link
; /// Linked list members.
58 EFI_FILE_INFO
*FileInfo
; /// Pointer to the FileInfo struct for this file or NULL.
59 CHAR16
*FileNameFirstPart
; /// Text to the left of right-most period in the file name. String is capitialized
60 CHAR16
*FileNameSecondPart
; /// Text to the right of right-most period in the file name.String is capitialized. Maybe NULL
69 // The file info of the image comes from.
70 // if FileInfo == NULL. means image does not come from file
72 EFI_FILE_INFO
*FileInfo
;
75 #endif // _CAPSULES_ON_DISK_H_