2007-12-05 08:07:13 +01:00
|
|
|
/** @file
|
2008-04-09 09:07:50 +02:00
|
|
|
|
2009-06-11 16:17:23 +02:00
|
|
|
This library class defines a set of interfaces for how to process capsule image updates.
|
2007-12-05 08:07:13 +01:00
|
|
|
|
2016-09-21 03:42:40 +02:00
|
|
|
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
2010-03-17 21:48:52 +01:00
|
|
|
This program and the accompanying materials are licensed and made available under
|
|
|
|
the terms and conditions of the BSD License that accompanies this distribution.
|
|
|
|
The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php.
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
2007-12-05 08:07:13 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __CAPSULE_LIB_H__
|
|
|
|
#define __CAPSULE_LIB_H__
|
|
|
|
|
|
|
|
/**
|
2009-01-04 04:20:55 +01:00
|
|
|
The firmware checks whether the capsule image is supported
|
2010-03-17 21:48:52 +01:00
|
|
|
by the CapsuleGuid in CapsuleHeader or if there is other specific information in
|
|
|
|
the capsule image.
|
2016-09-21 03:42:40 +02:00
|
|
|
|
|
|
|
Caution: This function may receive untrusted input.
|
|
|
|
|
2010-03-17 21:48:52 +01:00
|
|
|
@param CapsuleHeader Pointer to the UEFI capsule image to be checked.
|
2008-02-25 07:29:00 +01:00
|
|
|
|
2007-12-05 08:07:13 +01:00
|
|
|
@retval EFI_SUCESS Input capsule is supported by firmware.
|
|
|
|
@retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.
|
|
|
|
**/
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
SupportCapsuleImage (
|
|
|
|
IN EFI_CAPSULE_HEADER *CapsuleHeader
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-12-05 08:07:13 +01:00
|
|
|
|
|
|
|
/**
|
2009-06-11 16:17:23 +02:00
|
|
|
The firmware-specific implementation processes the capsule image
|
2009-01-04 04:20:55 +01:00
|
|
|
if it recognized the format of this capsule image.
|
2016-09-21 03:42:40 +02:00
|
|
|
|
|
|
|
Caution: This function may receive untrusted input.
|
|
|
|
|
2010-03-17 21:48:52 +01:00
|
|
|
@param CapsuleHeader Pointer to the UEFI capsule image to be processed.
|
2008-02-25 07:29:00 +01:00
|
|
|
|
2010-03-17 21:48:52 +01:00
|
|
|
@retval EFI_SUCESS Capsule Image processed successfully.
|
2007-12-05 08:07:13 +01:00
|
|
|
@retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.
|
|
|
|
**/
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
ProcessCapsuleImage (
|
|
|
|
IN EFI_CAPSULE_HEADER *CapsuleHeader
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-12-05 08:07:13 +01:00
|
|
|
|
2016-09-21 03:42:40 +02:00
|
|
|
/**
|
|
|
|
|
|
|
|
This routine is called to process capsules.
|
|
|
|
|
|
|
|
Caution: This function may receive untrusted input.
|
|
|
|
|
|
|
|
The capsules reported in EFI_HOB_UEFI_CAPSULE are processed.
|
|
|
|
If there is no EFI_HOB_UEFI_CAPSULE, this routine does nothing.
|
|
|
|
|
|
|
|
This routine should be called twice in BDS.
|
|
|
|
1) The first call must be before EndOfDxe. The system capsules is processed.
|
|
|
|
If device capsule FMP protocols are exposted at this time and device FMP
|
|
|
|
capsule has zero EmbeddedDriverCount, the device capsules are processed.
|
|
|
|
Each individual capsule result is recorded in capsule record variable.
|
|
|
|
System may reset in this function, if reset is required by capsule and
|
|
|
|
all capsules are processed.
|
|
|
|
If not all capsules are processed, reset will be defered to second call.
|
|
|
|
|
|
|
|
2) The second call must be after EndOfDxe and after ConnectAll, so that all
|
|
|
|
device capsule FMP protocols are exposed.
|
|
|
|
The system capsules are skipped. If the device capsules are NOT processed
|
|
|
|
in first call, they are processed here.
|
|
|
|
Each individual capsule result is recorded in capsule record variable.
|
|
|
|
System may reset in this function, if reset is required by capsule
|
|
|
|
processed in first call and second call.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS There is no error when processing capsules.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES No enough resource to process capsules.
|
|
|
|
|
|
|
|
**/
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
ProcessCapsules (
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2007-12-05 08:07:13 +01:00
|
|
|
#endif
|