1 | /** @file
|
---|
2 | DXE capsule process.
|
---|
3 | Dummy function for runtime module, because CapsuleDxeRuntime
|
---|
4 | does not need call ProcessCapsules().
|
---|
5 |
|
---|
6 | Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
7 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
8 |
|
---|
9 | **/
|
---|
10 |
|
---|
11 | #include <PiDxe.h>
|
---|
12 | #include <Library/CapsuleLib.h>
|
---|
13 |
|
---|
14 | /**
|
---|
15 | Function indicate the current completion progress of the firmware
|
---|
16 | update. Platform may override with own specific progress function.
|
---|
17 |
|
---|
18 | @param[in] Completion A value between 1 and 100 indicating the current
|
---|
19 | completion progress of the firmware update
|
---|
20 |
|
---|
21 | @retval EFI_SUCESS The capsule update progress was updated.
|
---|
22 | @retval EFI_INVALID_PARAMETER Completion is greater than 100%.
|
---|
23 | **/
|
---|
24 | EFI_STATUS
|
---|
25 | EFIAPI
|
---|
26 | UpdateImageProgress (
|
---|
27 | IN UINTN Completion
|
---|
28 | )
|
---|
29 | {
|
---|
30 | return EFI_SUCCESS;
|
---|
31 | }
|
---|
32 |
|
---|
33 | /**
|
---|
34 |
|
---|
35 | This routine is called to process capsules.
|
---|
36 |
|
---|
37 | Caution: This function may receive untrusted input.
|
---|
38 |
|
---|
39 | The capsules reported in EFI_HOB_UEFI_CAPSULE are processed.
|
---|
40 | If there is no EFI_HOB_UEFI_CAPSULE, this routine does nothing.
|
---|
41 |
|
---|
42 | This routine should be called twice in BDS.
|
---|
43 | 1) The first call must be before EndOfDxe. The system capsules is processed.
|
---|
44 | If device capsule FMP protocols are exposted at this time and device FMP
|
---|
45 | capsule has zero EmbeddedDriverCount, the device capsules are processed.
|
---|
46 | Each individual capsule result is recorded in capsule record variable.
|
---|
47 | System may reset in this function, if reset is required by capsule and
|
---|
48 | all capsules are processed.
|
---|
49 | If not all capsules are processed, reset will be defered to second call.
|
---|
50 |
|
---|
51 | 2) The second call must be after EndOfDxe and after ConnectAll, so that all
|
---|
52 | device capsule FMP protocols are exposed.
|
---|
53 | The system capsules are skipped. If the device capsules are NOT processed
|
---|
54 | in first call, they are processed here.
|
---|
55 | Each individual capsule result is recorded in capsule record variable.
|
---|
56 | System may reset in this function, if reset is required by capsule
|
---|
57 | processed in first call and second call.
|
---|
58 |
|
---|
59 | @retval EFI_SUCCESS There is no error when processing capsules.
|
---|
60 | @retval EFI_OUT_OF_RESOURCES No enough resource to process capsules.
|
---|
61 |
|
---|
62 | **/
|
---|
63 | EFI_STATUS
|
---|
64 | EFIAPI
|
---|
65 | ProcessCapsules (
|
---|
66 | VOID
|
---|
67 | )
|
---|
68 | {
|
---|
69 | return EFI_UNSUPPORTED;
|
---|
70 | }
|
---|