]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Guid/FmpCapsule.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Guid / FmpCapsule.h
1 /** @file
2 Guid & data structure used for Delivering Capsules Containing Updates to Firmware
3 Management Protocol
4
5 Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 @par Revision Reference:
9 GUIDs defined in UEFI 2.4 spec.
10
11 **/
12
13 #ifndef _FMP_CAPSULE_GUID_H__
14 #define _FMP_CAPSULE_GUID_H__
15
16 //
17 // This is the GUID of the capsule for Firmware Management Protocol.
18 //
19 #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID \
20 { \
21 0x6dcbd5ed, 0xe82d, 0x4c44, {0xbd, 0xa1, 0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a } \
22 }
23
24 #pragma pack(1)
25
26 typedef struct {
27 UINT32 Version;
28
29 ///
30 /// The number of drivers included in the capsule and the number of corresponding
31 /// offsets stored in ItemOffsetList array.
32 ///
33 UINT16 EmbeddedDriverCount;
34
35 ///
36 /// The number of payload items included in the capsule and the number of
37 /// corresponding offsets stored in the ItemOffsetList array.
38 ///
39 UINT16 PayloadItemCount;
40
41 ///
42 /// Variable length array of dimension [EmbeddedDriverCount + PayloadItemCount]
43 /// containing offsets of each of the drivers and payload items contained within the capsule
44 ///
45 // UINT64 ItemOffsetList[];
46 } EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER;
47
48 typedef struct {
49 UINT32 Version;
50
51 ///
52 /// Used to identify device firmware targeted by this update. This guid is matched by
53 /// system firmware against ImageTypeId field within a EFI_FIRMWARE_IMAGE_DESCRIPTOR
54 ///
55 EFI_GUID UpdateImageTypeId;
56
57 ///
58 /// Passed as ImageIndex in call to EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetImage()
59 ///
60 UINT8 UpdateImageIndex;
61 UINT8 reserved_bytes[3];
62
63 ///
64 /// Size of the binary update image which immediately follows this structure
65 ///
66 UINT32 UpdateImageSize;
67
68 ///
69 /// Size of the VendorCode bytes which optionally immediately follow binary update image in the capsule
70 ///
71 UINT32 UpdateVendorCodeSize;
72
73 ///
74 /// The HardwareInstance to target with this update. If value is zero it means match all
75 /// HardwareInstances. This field allows update software to target only a single device in
76 /// cases where there are more than one device with the same ImageTypeId GUID.
77 /// This header is outside the signed data of the Authentication Info structure and
78 /// therefore can be modified without changing the Auth data.
79 ///
80 UINT64 UpdateHardwareInstance;
81
82 ///
83 /// A 64-bit bitmask that determines what sections are added to the payload.
84 /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001
85 /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002
86 ///
87 UINT64 ImageCapsuleSupport;
88 } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
89
90 #pragma pack()
91
92 #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x00000001
93 #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000003
94 #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001
95 #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002
96
97 extern EFI_GUID gEfiFmpCapsuleGuid;
98
99 #endif