2 Include the required header files for Capsule Runtime Service drivers.
4 Copyright (c) 2006 - 2008, Intel Corporation. <BR>
5 All rights reserved. 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
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.
15 #ifndef _CAPSULE_RUNTIME_H_
16 #define _CAPSULE_RUNTIME_H_
21 #include <Protocol/Capsule.h>
22 #include <Guid/CapsuleVendor.h>
24 #include <Library/UefiDriverEntryPoint.h>
25 #include <Library/UefiRuntimeLib.h>
26 #include <Library/DebugLib.h>
27 #include <Library/PcdLib.h>
28 #include <Library/UefiBootServicesTableLib.h>
29 #include <Library/CapsuleLib.h>
32 Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended
33 consumption, the firmware may process the capsule immediately. If the payload should persist
34 across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must
35 be passed into ResetSystem() and will cause the capsule to be processed by the firmware as
36 part of the reset process.
38 @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
39 being passed into update capsule.
40 @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
42 @param ScatterGatherList Physical pointer to a set of
43 EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the
44 location in physical memory of a set of capsules.
46 @retval EFI_SUCCESS Valid capsule was passed. If
47 CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the
48 capsule has been successfully processed by the firmware.
49 @retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error.
50 @retval EFI_INVALID_PARAMETER CapsuleCount is Zero, or CapsuleImage is not valid.
51 For across reset capsule image, ScatterGatherList is NULL.
52 @retval EFI_UNSUPPORTED CapsuleImage is not recognized by the firmware.
58 IN EFI_CAPSULE_HEADER
**CapsuleHeaderArray
,
59 IN UINTN CapsuleCount
,
60 IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
64 Returns if the capsule can be supported via UpdateCapsule().
66 @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
67 being passed into update capsule.
68 @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
70 @param MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can
71 support as an argument to UpdateCapsule() via
72 CapsuleHeaderArray and ScatterGatherList.
73 @param ResetType Returns the type of reset required for the capsule update.
75 @retval EFI_SUCCESS Valid answer returned.
76 @retval EFI_UNSUPPORTED The capsule image is not supported on this platform, and
77 MaximumCapsuleSize and ResetType are undefined.
78 @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL, or ResetTyep is NULL,
79 Or CapsuleCount is Zero, or CapsuleImage is not valid.
84 QueryCapsuleCapabilities(
85 IN EFI_CAPSULE_HEADER
**CapsuleHeaderArray
,
86 IN UINTN CapsuleCount
,
87 OUT UINT64
*MaxiumCapsuleSize
,
88 OUT EFI_RESET_TYPE
*ResetType