]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Framework/Include/EfiCapsule.h
f2e996a794d37e59f98305c8b7675c2ae8d3aa25
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Include / EfiCapsule.h
1 /*++
2
3 Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
4 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 EfiCapsule.h
15
16 Abstract:
17
18 Defines for the EFI Capsule functionality
19
20 --*/
21
22 #ifndef _EFI_CAPSULE_H_
23 #define _EFI_CAPSULE_H_
24
25
26 #define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE EFI_SIGNATURE_32 ('C', 'B', 'D', 'S')
27
28 typedef struct {
29 EFI_GUID OemGuid;
30 UINT32 HeaderSize;
31 //
32 // UINT8 OemHdrData[];
33 //
34 } EFI_CAPSULE_OEM_HEADER;
35
36 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
37
38 #define MAX_SUPPORT_CAPSULE_NUM 50
39 #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000
40 #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000
41
42 typedef struct {
43 UINT64 Length;
44 union {
45 EFI_PHYSICAL_ADDRESS DataBlock;
46 EFI_PHYSICAL_ADDRESS ContinuationPointer;
47 } Union;
48 } EFI_CAPSULE_BLOCK_DESCRIPTOR;
49
50 typedef struct {
51 EFI_GUID CapsuleGuid;
52 UINT32 HeaderSize;
53 UINT32 Flags;
54 UINT32 CapsuleImageSize;
55 } EFI_CAPSULE_HEADER;
56
57 typedef struct {
58 UINT32 CapsuleArrayNumber;
59 VOID* CapsulePtr[1];
60 } EFI_CAPSULE_TABLE;
61
62 typedef struct {
63 UINT32 CapsuleGuidNumber;
64 EFI_GUID CapsuleGuidPtr[1];
65 } EFI_CAPSULE_INFO_TABLE;
66
67 //
68 // This GUID is used for collecting all capsules' Guids who install in ConfigTable.
69 //
70 #define EFI_CAPSULE_INFO_GUID \
71 { \
72 0x8B34EAC7, 0x2690, 0x460B, {0x8B, 0xA5, 0xD5, 0xCF, 0x32, 0x83, 0x17, 0x35} \
73 }
74
75 #else
76
77 typedef struct {
78 EFI_GUID CapsuleGuid;
79 UINT32 HeaderSize;
80 UINT32 Flags;
81 UINT32 CapsuleImageSize;
82 UINT32 SequenceNumber;
83 EFI_GUID InstanceId;
84 UINT32 OffsetToSplitInformation;
85 UINT32 OffsetToCapsuleBody;
86 UINT32 OffsetToOemDefinedHeader;
87 UINT32 OffsetToAuthorInformation;
88 UINT32 OffsetToRevisionInformation;
89 UINT32 OffsetToShortDescription;
90 UINT32 OffsetToLongDescription;
91 UINT32 OffsetToApplicableDevices;
92 } EFI_CAPSULE_HEADER;
93
94 //
95 // An array of these describe the blocks that make up a capsule for
96 // a capsule update.
97 //
98 typedef struct {
99 UINT64 Length; // length of the data block
100 EFI_PHYSICAL_ADDRESS Data; // physical address of the data block
101 UINT32 Signature; // CBDS
102 UINT32 CheckSum; // to sum this structure to 0
103 } EFI_CAPSULE_BLOCK_DESCRIPTOR;
104
105 #endif
106
107 //
108 // Bits in the flags field of the capsule header
109 //
110 #define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001 // supports setup changes
111 //
112 // This is the GUID of the capsule header of the image on disk.
113 //
114 #define EFI_CAPSULE_GUID \
115 { \
116 0x3B6686BD, 0x0D76, 0x4030, {0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0} \
117 }
118
119 //
120 // This is the GUID of the file created by the capsule application that contains
121 // the path to the device(s) to update.
122 //
123 #define EFI_PATH_FILE_NAME_GUID \
124 { \
125 0x7644C181, 0xFA6E, 0x46DA, {0x80, 0xCB, 0x04, 0xB9, 0x90, 0x40, 0x62, 0xE8} \
126 }
127 //
128 // This is the GUID of the configuration results file created by the capsule
129 // application.
130 //
131 #define EFI_CONFIG_FILE_NAME_GUID \
132 { \
133 0x98B8D59B, 0xE8BA, 0x48EE, {0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB} \
134 }
135
136 #endif // #ifndef _EFI_CAPSULE_H_