]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[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
d1102dba 4Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
d0e24078
LG
6\r
7**/\r
60c93673 8#include <Uefi.h>\r
d0e24078
LG
9#include <Library/CapsuleLib.h>\r
10\r
11/**\r
d1102dba 12 The firmware checks whether the capsule image is supported\r
109e9a61 13 by the CapsuleGuid in CapsuleHeader or other specific information in capsule image.\r
bf468a6c
JY
14\r
15 Caution: This function may receive untrusted input.\r
16\r
2ae8963c 17 @param CapsuleHeader Point to the UEFI capsule image to be checked.\r
d1102dba 18\r
d0e24078
LG
19 @retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.\r
20**/\r
21EFI_STATUS\r
22EFIAPI\r
23SupportCapsuleImage (\r
24 IN EFI_CAPSULE_HEADER *CapsuleHeader\r
25 )\r
26{\r
27 return EFI_UNSUPPORTED;\r
28}\r
29\r
30/**\r
109e9a61
LG
31 The firmware specific implementation processes the capsule image\r
32 if it recognized the format of this capsule image.\r
bf468a6c
JY
33\r
34 Caution: This function may receive untrusted input.\r
35\r
d1102dba
LG
36 @param CapsuleHeader Point to the UEFI capsule image to be processed.\r
37\r
d0e24078
LG
38 @retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.\r
39**/\r
40EFI_STATUS\r
41EFIAPI\r
42ProcessCapsuleImage (\r
43 IN EFI_CAPSULE_HEADER *CapsuleHeader\r
44 )\r
45{\r
46 return EFI_UNSUPPORTED;\r
47}\r
48\r
bf468a6c
JY
49/**\r
50\r
51 This routine is called to process capsules.\r
52\r
53 Caution: This function may receive untrusted input.\r
54\r
55 The capsules reported in EFI_HOB_UEFI_CAPSULE are processed.\r
56 If there is no EFI_HOB_UEFI_CAPSULE, this routine does nothing.\r
57\r
58 This routine should be called twice in BDS.\r
59 1) The first call must be before EndOfDxe. The system capsules is processed.\r
60 If device capsule FMP protocols are exposted at this time and device FMP\r
61 capsule has zero EmbeddedDriverCount, the device capsules are processed.\r
62 Each individual capsule result is recorded in capsule record variable.\r
63 System may reset in this function, if reset is required by capsule and\r
64 all capsules are processed.\r
65 If not all capsules are processed, reset will be defered to second call.\r
66\r
67 2) The second call must be after EndOfDxe and after ConnectAll, so that all\r
68 device capsule FMP protocols are exposed.\r
69 The system capsules are skipped. If the device capsules are NOT processed\r
70 in first call, they are processed here.\r
71 Each individual capsule result is recorded in capsule record variable.\r
72 System may reset in this function, if reset is required by capsule\r
73 processed in first call and second call.\r
74\r
75 @retval EFI_SUCCESS There is no error when processing capsules.\r
76 @retval EFI_OUT_OF_RESOURCES No enough resource to process capsules.\r
77\r
78**/\r
79EFI_STATUS\r
80EFIAPI\r
81ProcessCapsules (\r
82 VOID\r
83 )\r
84{\r
85 return EFI_UNSUPPORTED;\r
86}\r
d0e24078 87\r