]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c
2 Null Dxe Capsule Library instance does nothing and returns unsupport status.
4 Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include <Library/CapsuleLib.h>
12 The firmware checks whether the capsule image is supported
13 by the CapsuleGuid in CapsuleHeader or other specific information in capsule image.
15 Caution: This function may receive untrusted input.
17 @param CapsuleHeader Point to the UEFI capsule image to be checked.
19 @retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.
24 IN EFI_CAPSULE_HEADER
*CapsuleHeader
27 return EFI_UNSUPPORTED
;
31 The firmware specific implementation processes the capsule image
32 if it recognized the format of this capsule image.
34 Caution: This function may receive untrusted input.
36 @param CapsuleHeader Point to the UEFI capsule image to be processed.
38 @retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.
43 IN EFI_CAPSULE_HEADER
*CapsuleHeader
46 return EFI_UNSUPPORTED
;
51 This routine is called to process capsules.
53 Caution: This function may receive untrusted input.
55 The capsules reported in EFI_HOB_UEFI_CAPSULE are processed.
56 If there is no EFI_HOB_UEFI_CAPSULE, this routine does nothing.
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.
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.
75 @retval EFI_SUCCESS There is no error when processing capsules.
76 @retval EFI_OUT_OF_RESOURCES No enough resource to process capsules.
85 return EFI_UNSUPPORTED
;
90 This routine is called to check if CapsuleOnDisk flag in OsIndications Variable
93 @retval TRUE Flag is enabled
94 @retval FALSE Flag is not enabled
99 CoDCheckCapsuleOnDiskFlag(
107 This routine is called to clear CapsuleOnDisk flags including OsIndications and BootNext variable.
109 @retval EFI_SUCCESS All Capsule On Disk flags are cleared
114 CoDClearCapsuleOnDiskFlag(
118 return EFI_UNSUPPORTED
;
122 Relocate Capsule on Disk from EFI system partition.
124 Two solution to deliver Capsule On Disk:
125 Solution A: If PcdCapsuleInRamSupport is enabled, relocate Capsule On Disk to memory and call UpdateCapsule().
126 Solution B: If PcdCapsuleInRamSupport is disabled, relocate Capsule On Disk to a platform-specific NV storage
127 device with BlockIo protocol.
129 Device enumeration like USB costs time, user can input MaxRetry to tell function to retry.
130 Function will stall 100ms between each retry.
133 Capsule Delivery Supported Flag in OsIndication variable and BootNext variable will be cleared.
134 Solution B: Content corruption. Block IO write directly touches low level write. Orignal partitions, file
135 systems of the relocation device will be corrupted.
137 @param[in] MaxRetry Max Connection Retry. Stall 100ms between each connection try to ensure
138 devices like USB can get enumerated. Input 0 means no retry.
140 @retval EFI_SUCCESS Capsule on Disk images are successfully relocated.
149 return EFI_UNSUPPORTED
;
153 Remove the temp file from the root of EFI System Partition.
154 Device enumeration like USB costs time, user can input MaxRetry to tell function to retry.
155 Function will stall 100ms between each retry.
157 @param[in] MaxRetry Max Connection Retry. Stall 100ms between each connection try to ensure
158 devices like USB can get enumerated. Input 0 means no retry.
160 @retval EFI_SUCCESS Remove the temp file successfully.
169 return EFI_UNSUPPORTED
;