ArmPkg: only attempt buildin MmCommunicationDxe for AArch64
[mirror_edk2.git] / SignedCapsulePkg / Include / Guid / EdkiiSystemFmpCapsule.h
CommitLineData
3705cf42
JY
1/** @file\r
2 Guid & data structure used for Delivering Capsules Containing Updates to\r
3 EDKII System Firmware Management Protocol\r
4\r
5 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
fbf06957 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
3705cf42
JY
7\r
8**/\r
9\r
10\r
11#ifndef __EDKII_SYSTEM_FMP_CAPSULE_GUID_H__\r
12#define __EDKII_SYSTEM_FMP_CAPSULE_GUID_H__\r
13\r
14/**\r
15\r
16 1. Capsule Layout is below:\r
17 +------------------------------------------+\r
18 | Capsule Header (OPTIONAL, WFU) | <== ESRT.FwClass (Optional)\r
19 +------------------------------------------+\r
20 | FMP Capsule Header | <== EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID\r
21 +------------------------------------------+\r
22 | FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER | <== PcdSystemFmpCapsuleImageTypeIdGuid\r
23 +------------------------------------------+\r
24 | EFI_FIRMWARE_IMAGE_AUTHENTICATION |\r
25 +------------------------------------------+\r
26 | FMP Payload |\r
27 +------------------------------------------+\r
28\r
29 2. System FMP Payload is below:\r
30 +------------------------------------------+\r
31 | EFI_FIRMWARE_VOLUME |\r
32 | +------------------------------------+ |\r
33 | | FFS (Configure File) | | <== gEdkiiSystemFmpCapsuleConfigFileGuid\r
34 | +------------------------------------+ |\r
35 | | FFS (Driver FV) | | <== gEdkiiSystemFmpCapsuleDriverFvFileGuid\r
36 | +------------------------------------+ |\r
37 | | FFS (System Firmware Image) | | <== PcdEdkiiSystemFirmwareFileGuid\r
38 | | +------------------------------+ | |\r
39 | | | FV Recovery | | |\r
40 | | |------------------------------| | |\r
41 | | | FV Main | | |\r
42 | | +------------------------------+ | |\r
43 | +------------------------------------+ |\r
44 +------------------------------------------+\r
45\r
46 NOTE: There might be multiple FFS (System Firmware Image) exist in the System FMP Capsule.\r
47 Only the one, whose FFS GUID matches PcdEdkiiSystemFirmwareFileGuid, takes effect.\r
48 The other FFS is ignored.\r
49\r
50 3. The format of the recovery configuration is below:\r
51\r
52 [Head]\r
53 NumOfRecovery = <Num> # Decimal\r
54 Recovery0 = <Name1> # String\r
55 Recovery1 = <Name2> # String\r
56 Recovery<Num-1> = <NameX> # String\r
57\r
58 [Name?]\r
59 Length = <Length> # Fv Length (HEX)\r
60 ImageOffset = <ImageOffset> # Fv offset of this SystemFirmware image (HEX)\r
61 FileGuid = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX # PcdEdkiiSystemFirmwareFileGuid\r
62\r
582b6cdd 63 NOTE: The [Name?] entry may have different FileGuid.\r
3705cf42
JY
64 Only the one, whose FileGuid matches PcdEdkiiSystemFirmwareFileGuid, takes effect.\r
65 The other entry is ignored.\r
66\r
67 4. The format of the capsule update configuration is below:\r
68\r
69 [Head]\r
70 NumOfUpdate = <Num> # Decimal\r
71 Update0 = <Name1> # String\r
72 Update1 = <Name2> # String\r
73 Update<Num-1> = <NameX> # String\r
74\r
75 [Name?]\r
76 FirmwareType = 0 # 0 - SystemFirmware, 1 - NvRam\r
77 AddressType = 0 # 0 - relative address, 1 - absolute address.\r
78 BaseAddress = <BaseAddress> # Base address offset on flash (HEX)\r
79 Length = <Length> # Image Length (HEX)\r
80 ImageOffset = <ImageOffset> # Image offset of this SystemFirmware image (HEX)\r
81 FileGuid = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX # PcdEdkiiSystemFirmwareFileGuid\r
82\r
582b6cdd 83 NOTE: The [Name?] entry may have different FileGuid.\r
3705cf42
JY
84 Only the one, whose FileGuid matches PcdEdkiiSystemFirmwareFileGuid, takes effect.\r
85 The other entry is ignored.\r
86\r
87**/\r
88\r
89#define EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR_SIGNATURE SIGNATURE_32('S', 'F', 'I', 'D')\r
90\r
91#pragma pack(1)\r
92typedef struct {\r
93 UINT32 Signature;\r
94 UINT32 HeaderLength; // Length of EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR, excluding NameString\r
95 UINT32 Length; // Length of the data structure, including NameString\r
96 // Below structure is similar as UEFI EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetPackageInfo()\r
97 UINT32 PackageVersion;\r
98 UINT32 PackageVersionNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char\r
99 // Below structure is similar as UEFI EFI_FIRMWARE_IMAGE_DESCRIPTOR\r
100 UINT8 ImageIndex;\r
101 UINT8 Reserved[3];\r
102 EFI_GUID ImageTypeId;\r
103 UINT64 ImageId;\r
104 UINT32 ImageIdNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char\r
105 UINT32 Version;\r
106 UINT32 VersionNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char\r
107 UINT8 Reserved2[4];\r
108 UINT64 Size;\r
109 UINT64 AttributesSupported;\r
110 UINT64 AttributesSetting;\r
111 UINT64 Compatibilities;\r
112 UINT32 LowestSupportedImageVersion;\r
113 UINT32 LastAttemptVersion;\r
114 UINT32 LastAttemptStatus;\r
115 UINT8 Reserved3[4];\r
116 UINT64 HardwareInstance;\r
117 // real string data\r
118//CHAR16 ImageIdNameStr[]; // CHAR16 string including NULL terminate char\r
119//CHAR16 VersionNameStr[]; // CHAR16 string including NULL terminate char\r
120//CHAR16 PackageVersionNameStr[]; // CHAR16 string including NULL terminate char\r
121} EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR;\r
122#pragma pack()\r
123\r
124/**\r
125 System Firmware Image Descriptor is below:\r
126 +----------------------+\r
127 | System Firmware (FV) |\r
128 |+--------------------+|\r
129 || FFS (Freeform) || <== gEdkiiSystemFirmwareImageDescriptorFileGuid\r
130 ||+------------------+||\r
131 ||| SECTION (RAW) |||\r
132 ||| System Firmware |||\r
133 ||| Image Descriptor |||\r
134 ||+------------------+||\r
135 |+--------------------+|\r
136 | |\r
137 | |\r
138 +----------------------+\r
139**/\r
140\r
141extern EFI_GUID gEdkiiSystemFirmwareImageDescriptorFileGuid;\r
142extern EFI_GUID gEdkiiSystemFmpCapsuleConfigFileGuid;\r
143extern EFI_GUID gEdkiiSystemFmpCapsuleDriverFvFileGuid;\r
144\r
145#endif\r