]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Guid/Capsule.h
6dfdb11a617209ca2e02065fc7de2d14e513b31d
[mirror_edk2.git] / IntelFrameworkPkg / Include / Guid / Capsule.h
1 /** @file
2 Framework Capule related Definition.
3
4 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 @par Revision Reference:
8 Capsule Spec Version 0.9
9 **/
10
11 #ifndef _CAPSULE_GUID_H__
12 #define _CAPSULE_GUID_H__
13
14 //
15 // This is the GUID of the capsule header of the image on disk.
16 //
17 #define EFI_CAPSULE_GUID \
18 { \
19 0x3B6686BD, 0x0D76, 0x4030, {0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0 } \
20 }
21
22 //
23 // This is the GUID of the configuration results file created by the capsule
24 // application.
25 //
26 #define EFI_CONFIG_FILE_NAME_GUID \
27 { \
28 0x98B8D59B, 0xE8BA, 0x48EE, {0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB } \
29 }
30
31 ///
32 /// Bits in the flags field of the capsule header.
33 /// This flag is set if the capsule can support setup changes, and cleared if it cannot.
34 ///
35 #define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001
36
37 #define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE SIGNATURE_32 ('C', 'B', 'D', 'S')
38
39 //
40 // An array of these structs describe the blocks that make up a capsule for
41 // a capsule update.
42 //
43 typedef struct {
44 UINT64 Length; ///< Length of the data block.
45 EFI_PHYSICAL_ADDRESS Data; ///< Physical address of the data block.
46 UINT32 Signature; ///< CBDS.
47 UINT32 CheckSum; ///< To sum this structure to 0.
48 } FRAMEWORK_EFI_CAPSULE_BLOCK_DESCRIPTOR;
49
50 typedef struct {
51 EFI_GUID OemGuid;
52 UINT32 HeaderSize;
53 //
54 // UINT8 OemHdrData[];
55 //
56 } EFI_CAPSULE_OEM_HEADER;
57
58 typedef struct {
59 ///
60 /// A defined GUID that indicates the start of a capsule.
61 ///
62 EFI_GUID CapsuleGuid;
63 ///
64 /// The size of the EFI_CAPSULE_HEADER structure.
65 ///
66 UINT32 HeaderSize;
67 ///
68 /// A bit-mapped list describing the capsule's attributes.
69 /// All undefined bits should be written as zero (0).
70 ///
71 UINT32 Flags;
72 ///
73 /// The length in bytes (27,415 for an image containing 27,415 bytes) of the entire image
74 /// including all headers. If this value is greater than the size of the data presented in
75 /// the capsule body, the image is separated across multiple media. If this
76 /// value is less than the size of the data, it is an error.
77 ///
78 UINT32 CapsuleImageSize;
79 ///
80 /// A zero-based number that enables a capsule to be split into pieces and then
81 /// recombined for easier transfer across media with limited size. The lower the
82 /// SequenceNumber, the earlier in the final image that the part of the capsule is to
83 /// appear. In capsules that are not split, this value shall be zero.
84 ///
85 UINT32 SequenceNumber;
86 ///
87 /// Used to group the various pieces of a split capsule to ensure that they comprise the
88 /// same base image. It is valid for this item to be zero, in which case the capsule cannot
89 /// be split into components.
90 ///
91 EFI_GUID InstanceId;
92 ///
93 /// The offset in bytes from the beginning of the header to the start of an EFI string that
94 /// contains a description of the identity of the subcapsules that make up the capsule. If
95 /// the capsule is not split, this value should be zero. The same string should be
96 /// presented for all subcapsules that constitute the same capsule.
97 ///
98 UINT32 OffsetToSplitInformation;
99 ///
100 /// The offset in bytes from the beginning of the header to the start of the part of the
101 /// capsule that is to be transferred to DXE.
102 ///
103 UINT32 OffsetToCapsuleBody;
104 ///
105 /// The offset in bytes from the beginning of the header to the start of the OEM-defined
106 /// header. This value must be less than OffsetToCapsuleBody.
107 ///
108 UINT32 OffsetToOemDefinedHeader;
109 ///
110 /// The offset in bytes from the beginning of the header to the start of human-readable
111 /// text that describes the entity that created the capsule. This value must be less than OffsetToCapsuleBody.
112 ///
113 UINT32 OffsetToAuthorInformation;
114 ///
115 /// The offset in bytes from the beginning of the header to the start of human-readable
116 /// text that describes the revision of the capsule and/or the capsule's contents. This
117 /// value must be less than OffsetToCapsuleBody.
118 ///
119 UINT32 OffsetToRevisionInformation;
120 ///
121 /// The offset in bytes from the beginning of the header to the start of a one-line (less
122 /// than 40 Unicode characters in any language) description of the capsule. It is intended
123 /// to be used by OS-present applications when providing a list of capsules from which
124 /// the user can choose. This value must be less than OffsetToCapsuleBody.
125 ///
126 UINT32 OffsetToShortDescription;
127 ///
128 /// The offset in bytes from the beginning of the header to the start of an EFI string
129 ///
130 UINT32 OffsetToLongDescription;
131 ///
132 /// This field is reserved for future use by this specification. For future compatibility,
133 /// this field must be set to zero
134 ///
135 UINT32 OffsetToApplicableDevices;
136 } FRAMEWORK_EFI_CAPSULE_HEADER;
137
138 extern EFI_GUID gEfiCapsuleGuid;
139 extern EFI_GUID gEfiConfigFileNameGuid;
140
141 #endif