]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Guid/CapsuleReport.h
MdePkg: UEFI JSON Capsule Support
[mirror_edk2.git] / MdePkg / Include / Guid / CapsuleReport.h
1 /** @file
2 Guid & data structure used for Capsule process result variables
3
4 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 @par Revision Reference:
8 GUIDs defined in UEFI 2.4 spec.
9
10 **/
11
12
13 #ifndef _CAPSULE_REPORT_GUID_H__
14 #define _CAPSULE_REPORT_GUID_H__
15
16 //
17 // This is the GUID for capsule result variable.
18 //
19 #define EFI_CAPSULE_REPORT_GUID \
20 { \
21 0x39b68c46, 0xf7fb, 0x441b, {0xb6, 0xec, 0x16, 0xb0, 0xf6, 0x98, 0x21, 0xf3 } \
22 }
23
24
25 typedef struct {
26
27 ///
28 /// Size in bytes of the variable including any data beyond header as specified by CapsuleGuid
29 ///
30 UINT32 VariableTotalSize;
31
32 ///
33 /// For alignment
34 ///
35 UINT32 Reserved;
36
37 ///
38 /// Guid from EFI_CAPSULE_HEADER
39 ///
40 EFI_GUID CapsuleGuid;
41
42 ///
43 /// Timestamp using system time when processing completed
44 ///
45 EFI_TIME CapsuleProcessed;
46
47 ///
48 /// Result of the capsule processing. Exact interpretation of any error code may depend
49 /// upon type of capsule processed
50 ///
51 EFI_STATUS CapsuleStatus;
52 } EFI_CAPSULE_RESULT_VARIABLE_HEADER;
53
54
55 typedef struct {
56
57 ///
58 /// Version of this structure, currently 0x00000001
59 ///
60 UINT16 Version;
61
62 ///
63 /// The index of the payload within the FMP capsule which was processed to generate this report
64 /// Starting from zero
65 ///
66 UINT8 PayloadIndex;
67
68 ///
69 /// The UpdateImageIndex from EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER
70 /// (after unsigned conversion from UINT8 to UINT16).
71 ///
72 UINT8 UpdateImageIndex;
73
74 ///
75 /// The UpdateImageTypeId Guid from EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER.
76 ///
77 EFI_GUID UpdateImageTypeId;
78
79 ///
80 /// In case of capsule loaded from disk, the zero-terminated array containing file name of capsule that was processed.
81 /// In case of capsule submitted directly to UpdateCapsule() there is no file name, and this field is required to contain a single 16-bit zero character
82 /// which is included in VariableTotalSize.
83 ///
84 /// CHAR16 CapsuleFileName[];
85 ///
86
87 ///
88 /// This field will contain a zero-terminated CHAR16 string containing the text representation of the device path of device publishing Firmware Management Protocol
89 /// (if present). In case where device path is not present and the target is not otherwise known to firmware, or when payload was blocked by policy, or skipped,
90 /// this field is required to contain a single 16-bit zero character which is included in VariableTotalSize.
91 ///
92 /// CHAR16 CapsuleTarget[];
93 ///
94 } EFI_CAPSULE_RESULT_VARIABLE_FMP;
95
96 typedef struct {
97
98 ///
99 /// Version of this structure, currently 0x00000001
100 ///
101 UINT32 Version;
102
103 ///
104 /// The unique identifier of the capsule whose processing result is recorded in this variable.
105 /// 0x00000000 - 0xEFFFFFFF - Implementation Reserved
106 /// 0xF0000000 - 0xFFFFFFFF - Specification Reserved
107 /// #define REDFISH_DEFINED_JSON_SCHEMA 0xF000000
108 /// The JSON payload shall conform to a Redfish-defined JSON schema, see DMTF-Redfish
109 /// Specification.
110 ///
111 UINT32 CapsuleId;
112
113 ///
114 /// The length of Resp in bytes.
115 ///
116 UINT32 RespLength;
117
118 ///
119 /// Variable length buffer containing the replied JSON payload to the caller who delivered JSON
120 /// capsule to system. The definition of the JSON schema used in the replied payload is beyond
121 /// the scope of this specification.
122 ///
123 UINT8 Resp[];
124 } EFI_CAPSULE_RESULT_VARIABLE_JSON;
125
126 extern EFI_GUID gEfiCapsuleReportGuid;
127
128 #endif