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