2 This file declares the Device Recovery Module PPI.
4 The interface of this PPI does the following:
5 - Reports the number of recovery DXE capsules that exist on the associated device(s)
6 - Finds the requested firmware binary capsule
7 - Loads that capsule into memory
9 A device can be either a group of devices, such as a block device, or an individual device.
10 The module determines the internal search order, with capsule number 1 as the highest load
11 priority and number N as the lowest priority.
13 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
14 SPDX-License-Identifier: BSD-2-Clause-Patent
16 @par Revision Reference:
17 This PPI is defined in UEFI Platform Initialization Specification 1.2 Volume 1:
18 Pre-EFI Initalization Core Interface
22 #ifndef _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
23 #define _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
25 #define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \
27 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \
30 typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
;
33 Returns the number of DXE capsules residing on the device.
35 This function searches for DXE capsules from the associated device and returns
36 the number and maximum size in bytes of the capsules discovered. Entry 1 is
37 assumed to be the highest load priority and entry N is assumed to be the lowest
40 @param[in] PeiServices General-purpose services that are available
42 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
44 @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On
45 output, *NumberRecoveryCapsules contains
46 the number of recovery capsule images
47 available for retrieval from this PEIM
50 @retval EFI_SUCCESS One or more capsules were discovered.
51 @retval EFI_DEVICE_ERROR A device error occurred.
52 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
57 (EFIAPI
*EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE
)(
58 IN EFI_PEI_SERVICES
**PeiServices
,
59 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
60 OUT UINTN
*NumberRecoveryCapsules
64 Returns the size and type of the requested recovery capsule.
66 This function gets the size and type of the capsule specified by CapsuleInstance.
68 @param[in] PeiServices General-purpose services that are available to every PEIM
69 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
71 @param[in] CapsuleInstance Specifies for which capsule instance to retrieve
72 the information. This parameter must be between
73 one and the value returned by GetNumberRecoveryCapsules()
74 in NumberRecoveryCapsules.
75 @param[out] Size A pointer to a caller-allocated UINTN in which
76 the size of the requested recovery module is
78 @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which
79 the type of the requested recovery capsule is
80 returned. The semantic meaning of the value
81 returned is defined by the implementation.
83 @retval EFI_SUCCESS One or more capsules were discovered.
84 @retval EFI_DEVICE_ERROR A device error occurred.
85 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
90 (EFIAPI
*EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO
)(
91 IN EFI_PEI_SERVICES
**PeiServices
,
92 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
93 IN UINTN CapsuleInstance
,
95 OUT EFI_GUID
*CapsuleType
99 Loads a DXE capsule from some media into memory.
101 This function, by whatever mechanism, retrieves a DXE capsule from some device
102 and loads it into memory. Note that the published interface is device neutral.
104 @param[in] PeiServices General-purpose services that are available
106 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
108 @param[in] CapsuleInstance Specifies which capsule instance to retrieve.
109 @param[out] Buffer Specifies a caller-allocated buffer in which
110 the requested recovery capsule will be returned.
112 @retval EFI_SUCCESS The capsule was loaded correctly.
113 @retval EFI_DEVICE_ERROR A device error occurred.
114 @retval EFI_NOT_FOUND A requested recovery DXE capsule cannot be found.
119 (EFIAPI
*EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE
)(
120 IN EFI_PEI_SERVICES
**PeiServices
,
121 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
122 IN UINTN CapsuleInstance
,
127 /// Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,
128 /// regardless of the underlying device(s).
130 struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
{
131 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules
; ///< Returns the number of DXE capsules residing on the device.
132 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo
; ///< Returns the size and type of the requested recovery capsule.
133 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule
; ///< Loads a DXE capsule from some media into memory.
136 extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid
;
138 #endif /* _PEI_DEVICE_RECOVERY_MODULE_PPI_H_ */