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