]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Include/EfiCapsule.h
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Include / EfiCapsule.h
CommitLineData
3eb9473e 1/*++\r
2\r
3e99020d 3Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
f57387d5 4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 EfiCapsule.h\r
15\r
16Abstract:\r
17\r
18 Defines for the EFI Capsule functionality\r
19 \r
20--*/\r
21\r
22#ifndef _EFI_CAPSULE_H_\r
23#define _EFI_CAPSULE_H_\r
24\r
25\r
26#define CAPSULE_BLOCK_DESCRIPTOR_SIGNATURE EFI_SIGNATURE_32 ('C', 'B', 'D', 'S')\r
27\r
28typedef struct {\r
29 EFI_GUID OemGuid;\r
30 UINT32 HeaderSize;\r
31 //\r
32 // UINT8 OemHdrData[];\r
33 //\r
34} EFI_CAPSULE_OEM_HEADER;\r
35\r
36#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
37\r
38#define MAX_SUPPORT_CAPSULE_NUM 50\r
39#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000\r
40#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000 \r
41\r
42typedef struct {\r
43 UINT64 Length; \r
44 union { \r
45 EFI_PHYSICAL_ADDRESS DataBlock; \r
46 EFI_PHYSICAL_ADDRESS ContinuationPointer; \r
47 } Union;\r
48} EFI_CAPSULE_BLOCK_DESCRIPTOR;\r
49\r
50typedef struct {\r
51 EFI_GUID CapsuleGuid;\r
52 UINT32 HeaderSize;\r
53 UINT32 Flags;\r
54 UINT32 CapsuleImageSize;\r
55} EFI_CAPSULE_HEADER;\r
56\r
57typedef struct {\r
58 UINT32 CapsuleArrayNumber;\r
59 VOID* CapsulePtr[1];\r
60} EFI_CAPSULE_TABLE;\r
61\r
3e99020d
LG
62//\r
63// This struct is deprecated because VendorTable entries physical address will not be fixed up when \r
64// transitioning from preboot to runtime phase. So we don't need CapsuleInfoTable to record capsule\r
65// GUIDs any more for runtime convert.\r
66//\r
3eb9473e 67typedef struct {\r
68 UINT32 CapsuleGuidNumber;\r
69 EFI_GUID CapsuleGuidPtr[1];\r
70} EFI_CAPSULE_INFO_TABLE;\r
71\r
72//\r
73// This GUID is used for collecting all capsules' Guids who install in ConfigTable.\r
3e99020d 74// This GUID is deprecated as well.\r
3eb9473e 75//\r
76#define EFI_CAPSULE_INFO_GUID \\r
77 { \\r
7ccf38a3 78 0x8B34EAC7, 0x2690, 0x460B, {0x8B, 0xA5, 0xD5, 0xCF, 0x32, 0x83, 0x17, 0x35} \\r
3eb9473e 79 }\r
80\r
81#else\r
82\r
83typedef struct {\r
84 EFI_GUID CapsuleGuid;\r
85 UINT32 HeaderSize;\r
86 UINT32 Flags;\r
87 UINT32 CapsuleImageSize;\r
88 UINT32 SequenceNumber;\r
89 EFI_GUID InstanceId;\r
90 UINT32 OffsetToSplitInformation;\r
91 UINT32 OffsetToCapsuleBody;\r
92 UINT32 OffsetToOemDefinedHeader;\r
93 UINT32 OffsetToAuthorInformation;\r
94 UINT32 OffsetToRevisionInformation;\r
95 UINT32 OffsetToShortDescription;\r
96 UINT32 OffsetToLongDescription;\r
97 UINT32 OffsetToApplicableDevices;\r
98} EFI_CAPSULE_HEADER;\r
99\r
100//\r
101// An array of these describe the blocks that make up a capsule for\r
102// a capsule update.\r
103//\r
104typedef struct {\r
105 UINT64 Length; // length of the data block\r
106 EFI_PHYSICAL_ADDRESS Data; // physical address of the data block\r
107 UINT32 Signature; // CBDS\r
108 UINT32 CheckSum; // to sum this structure to 0\r
109} EFI_CAPSULE_BLOCK_DESCRIPTOR;\r
110\r
111#endif\r
112\r
113//\r
114// Bits in the flags field of the capsule header\r
115//\r
116#define EFI_CAPSULE_HEADER_FLAG_SETUP 0x00000001 // supports setup changes\r
117//\r
118// This is the GUID of the capsule header of the image on disk.\r
119//\r
120#define EFI_CAPSULE_GUID \\r
121 { \\r
7ccf38a3 122 0x3B6686BD, 0x0D76, 0x4030, {0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0} \\r
3eb9473e 123 }\r
124\r
125//\r
126// This is the GUID of the file created by the capsule application that contains\r
127// the path to the device(s) to update.\r
128//\r
129#define EFI_PATH_FILE_NAME_GUID \\r
130 { \\r
7ccf38a3 131 0x7644C181, 0xFA6E, 0x46DA, {0x80, 0xCB, 0x04, 0xB9, 0x90, 0x40, 0x62, 0xE8} \\r
3eb9473e 132 }\r
133//\r
134// This is the GUID of the configuration results file created by the capsule\r
135// application.\r
136//\r
137#define EFI_CONFIG_FILE_NAME_GUID \\r
138 { \\r
7ccf38a3 139 0x98B8D59B, 0xE8BA, 0x48EE, {0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB} \\r
3eb9473e 140 }\r
141\r
142#endif // #ifndef _EFI_CAPSULE_H_\r