]>
Commit | Line | Data |
---|---|---|
0537d50f | 1 | /** @file\r |
504214c4 | 2 | \r |
e9b67286 | 3 | This library class defines a set of interfaces for how to process capsule image updates.\r |
0537d50f | 4 | \r |
d1102dba | 5 | Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
0537d50f LG |
7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef __CAPSULE_LIB_H__\r | |
11 | #define __CAPSULE_LIB_H__\r | |
12 | \r | |
13 | /**\r | |
d1102dba LG |
14 | The firmware checks whether the capsule image is supported\r |
15 | by the CapsuleGuid in CapsuleHeader or if there is other specific information in\r | |
64a80549 | 16 | the capsule image.\r |
0fb30bc9 JY |
17 | \r |
18 | Caution: This function may receive untrusted input.\r | |
19 | \r | |
64a80549 | 20 | @param CapsuleHeader Pointer to the UEFI capsule image to be checked.\r |
d1102dba | 21 | \r |
0537d50f LG |
22 | @retval EFI_SUCESS Input capsule is supported by firmware.\r |
23 | @retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.\r | |
24 | **/\r | |
25 | EFI_STATUS\r | |
26 | EFIAPI\r | |
27 | SupportCapsuleImage (\r | |
28 | IN EFI_CAPSULE_HEADER *CapsuleHeader\r | |
ed66e1bc | 29 | );\r |
0537d50f LG |
30 | \r |
31 | /**\r | |
e9b67286 | 32 | The firmware-specific implementation processes the capsule image\r |
109e9a61 | 33 | if it recognized the format of this capsule image.\r |
0fb30bc9 JY |
34 | \r |
35 | Caution: This function may receive untrusted input.\r | |
36 | \r | |
d1102dba LG |
37 | @param CapsuleHeader Pointer to the UEFI capsule image to be processed.\r |
38 | \r | |
39 | @retval EFI_SUCESS Capsule Image processed successfully.\r | |
0537d50f LG |
40 | @retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.\r |
41 | **/\r | |
42 | EFI_STATUS\r | |
43 | EFIAPI\r | |
44 | ProcessCapsuleImage (\r | |
45 | IN EFI_CAPSULE_HEADER *CapsuleHeader\r | |
ed66e1bc | 46 | );\r |
0537d50f | 47 | \r |
0fb30bc9 JY |
48 | /**\r |
49 | \r | |
50 | This routine is called to process capsules.\r | |
51 | \r | |
52 | Caution: This function may receive untrusted input.\r | |
53 | \r | |
54 | The capsules reported in EFI_HOB_UEFI_CAPSULE are processed.\r | |
55 | If there is no EFI_HOB_UEFI_CAPSULE, this routine does nothing.\r | |
56 | \r | |
57 | This routine should be called twice in BDS.\r | |
58 | 1) The first call must be before EndOfDxe. The system capsules is processed.\r | |
59 | If device capsule FMP protocols are exposted at this time and device FMP\r | |
60 | capsule has zero EmbeddedDriverCount, the device capsules are processed.\r | |
61 | Each individual capsule result is recorded in capsule record variable.\r | |
62 | System may reset in this function, if reset is required by capsule and\r | |
63 | all capsules are processed.\r | |
64 | If not all capsules are processed, reset will be defered to second call.\r | |
65 | \r | |
66 | 2) The second call must be after EndOfDxe and after ConnectAll, so that all\r | |
67 | device capsule FMP protocols are exposed.\r | |
68 | The system capsules are skipped. If the device capsules are NOT processed\r | |
69 | in first call, they are processed here.\r | |
70 | Each individual capsule result is recorded in capsule record variable.\r | |
71 | System may reset in this function, if reset is required by capsule\r | |
72 | processed in first call and second call.\r | |
73 | \r | |
74 | @retval EFI_SUCCESS There is no error when processing capsules.\r | |
75 | @retval EFI_OUT_OF_RESOURCES No enough resource to process capsules.\r | |
76 | \r | |
77 | **/\r | |
78 | EFI_STATUS\r | |
79 | EFIAPI\r | |
80 | ProcessCapsules (\r | |
81 | VOID\r | |
82 | );\r | |
83 | \r | |
0537d50f | 84 | #endif\r |