]>
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 LG |
5 | Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r |
6 | This program and the accompanying materials are licensed and made available under\r | |
7 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
64a80549 | 8 | The full text of the license may be found at\r |
d1102dba | 9 | http://opensource.org/licenses/bsd-license.php.\r |
64a80549 | 10 | \r |
d1102dba | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
64a80549 | 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
0537d50f LG |
13 | \r |
14 | **/\r | |
15 | \r | |
16 | #ifndef __CAPSULE_LIB_H__\r | |
17 | #define __CAPSULE_LIB_H__\r | |
18 | \r | |
19 | /**\r | |
d1102dba LG |
20 | The firmware checks whether the capsule image is supported\r |
21 | by the CapsuleGuid in CapsuleHeader or if there is other specific information in\r | |
64a80549 | 22 | the capsule image.\r |
0fb30bc9 JY |
23 | \r |
24 | Caution: This function may receive untrusted input.\r | |
25 | \r | |
64a80549 | 26 | @param CapsuleHeader Pointer to the UEFI capsule image to be checked.\r |
d1102dba | 27 | \r |
0537d50f LG |
28 | @retval EFI_SUCESS Input capsule is supported by firmware.\r |
29 | @retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.\r | |
30 | **/\r | |
31 | EFI_STATUS\r | |
32 | EFIAPI\r | |
33 | SupportCapsuleImage (\r | |
34 | IN EFI_CAPSULE_HEADER *CapsuleHeader\r | |
ed66e1bc | 35 | );\r |
0537d50f LG |
36 | \r |
37 | /**\r | |
e9b67286 | 38 | The firmware-specific implementation processes the capsule image\r |
109e9a61 | 39 | if it recognized the format of this capsule image.\r |
0fb30bc9 JY |
40 | \r |
41 | Caution: This function may receive untrusted input.\r | |
42 | \r | |
d1102dba LG |
43 | @param CapsuleHeader Pointer to the UEFI capsule image to be processed.\r |
44 | \r | |
45 | @retval EFI_SUCESS Capsule Image processed successfully.\r | |
0537d50f LG |
46 | @retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.\r |
47 | **/\r | |
48 | EFI_STATUS\r | |
49 | EFIAPI\r | |
50 | ProcessCapsuleImage (\r | |
51 | IN EFI_CAPSULE_HEADER *CapsuleHeader\r | |
ed66e1bc | 52 | );\r |
0537d50f | 53 | \r |
0fb30bc9 JY |
54 | /**\r |
55 | \r | |
56 | This routine is called to process capsules.\r | |
57 | \r | |
58 | Caution: This function may receive untrusted input.\r | |
59 | \r | |
60 | The capsules reported in EFI_HOB_UEFI_CAPSULE are processed.\r | |
61 | If there is no EFI_HOB_UEFI_CAPSULE, this routine does nothing.\r | |
62 | \r | |
63 | This routine should be called twice in BDS.\r | |
64 | 1) The first call must be before EndOfDxe. The system capsules is processed.\r | |
65 | If device capsule FMP protocols are exposted at this time and device FMP\r | |
66 | capsule has zero EmbeddedDriverCount, the device capsules are processed.\r | |
67 | Each individual capsule result is recorded in capsule record variable.\r | |
68 | System may reset in this function, if reset is required by capsule and\r | |
69 | all capsules are processed.\r | |
70 | If not all capsules are processed, reset will be defered to second call.\r | |
71 | \r | |
72 | 2) The second call must be after EndOfDxe and after ConnectAll, so that all\r | |
73 | device capsule FMP protocols are exposed.\r | |
74 | The system capsules are skipped. If the device capsules are NOT processed\r | |
75 | in first call, they are processed here.\r | |
76 | Each individual capsule result is recorded in capsule record variable.\r | |
77 | System may reset in this function, if reset is required by capsule\r | |
78 | processed in first call and second call.\r | |
79 | \r | |
80 | @retval EFI_SUCCESS There is no error when processing capsules.\r | |
81 | @retval EFI_OUT_OF_RESOURCES No enough resource to process capsules.\r | |
82 | \r | |
83 | **/\r | |
84 | EFI_STATUS\r | |
85 | EFIAPI\r | |
86 | ProcessCapsules (\r | |
87 | VOID\r | |
88 | );\r | |
89 | \r | |
0537d50f | 90 | #endif\r |