MdeModulePkg/DxeCapsuleLibNull: Add ProcessCapsules() interface.
[mirror_edk2.git] / MdeModulePkg / Library / DxeCapsuleLibNull / DxeCapsuleLibNull.c
CommitLineData
5d69642d 1/** @file\r
109e9a61 2 Null Dxe Capsule Library instance does nothing and returns unsupport status.\r
d0e24078 3\r
bf468a6c 4Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
cd5ebaa0 5This program and the accompanying materials\r
d0e24078
LG
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
60c93673 14#include <Uefi.h>\r
d0e24078
LG
15#include <Library/CapsuleLib.h>\r
16\r
17/**\r
109e9a61
LG
18 The firmware checks whether the capsule image is supported \r
19 by the CapsuleGuid in CapsuleHeader or other specific information in capsule image.\r
bf468a6c
JY
20\r
21 Caution: This function may receive untrusted input.\r
22\r
2ae8963c
LG
23 @param CapsuleHeader Point to the UEFI capsule image to be checked.\r
24 \r
d0e24078
LG
25 @retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.\r
26**/\r
27EFI_STATUS\r
28EFIAPI\r
29SupportCapsuleImage (\r
30 IN EFI_CAPSULE_HEADER *CapsuleHeader\r
31 )\r
32{\r
33 return EFI_UNSUPPORTED;\r
34}\r
35\r
36/**\r
109e9a61
LG
37 The firmware specific implementation processes the capsule image\r
38 if it recognized the format of this capsule image.\r
bf468a6c
JY
39\r
40 Caution: This function may receive untrusted input.\r
41\r
2ae8963c
LG
42 @param CapsuleHeader Point to the UEFI capsule image to be processed. \r
43 \r
d0e24078
LG
44 @retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.\r
45**/\r
46EFI_STATUS\r
47EFIAPI\r
48ProcessCapsuleImage (\r
49 IN EFI_CAPSULE_HEADER *CapsuleHeader\r
50 )\r
51{\r
52 return EFI_UNSUPPORTED;\r
53}\r
54\r
bf468a6c
JY
55/**\r
56\r
57 This routine is called to process capsules.\r
58\r
59 Caution: This function may receive untrusted input.\r
60\r
61 The capsules reported in EFI_HOB_UEFI_CAPSULE are processed.\r
62 If there is no EFI_HOB_UEFI_CAPSULE, this routine does nothing.\r
63\r
64 This routine should be called twice in BDS.\r
65 1) The first call must be before EndOfDxe. The system capsules is processed.\r
66 If device capsule FMP protocols are exposted at this time and device FMP\r
67 capsule has zero EmbeddedDriverCount, the device capsules are processed.\r
68 Each individual capsule result is recorded in capsule record variable.\r
69 System may reset in this function, if reset is required by capsule and\r
70 all capsules are processed.\r
71 If not all capsules are processed, reset will be defered to second call.\r
72\r
73 2) The second call must be after EndOfDxe and after ConnectAll, so that all\r
74 device capsule FMP protocols are exposed.\r
75 The system capsules are skipped. If the device capsules are NOT processed\r
76 in first call, they are processed here.\r
77 Each individual capsule result is recorded in capsule record variable.\r
78 System may reset in this function, if reset is required by capsule\r
79 processed in first call and second call.\r
80\r
81 @retval EFI_SUCCESS There is no error when processing capsules.\r
82 @retval EFI_OUT_OF_RESOURCES No enough resource to process capsules.\r
83\r
84**/\r
85EFI_STATUS\r
86EFIAPI\r
87ProcessCapsules (\r
88 VOID\r
89 )\r
90{\r
91 return EFI_UNSUPPORTED;\r
92}\r
d0e24078 93\r