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