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 - 2011, Intel Corporation. All rights reserved.<BR>
14 This program and the accompanying materials
15 are licensed and made available under the terms and conditions of the BSD License
16 which accompanies this distribution. The full text of the license may be found at
17 http://opensource.org/licenses/bsd-license.php
19 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
20 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 @par Revision Reference:
23 This PPI is defined in UEFI Platform Initialization Specification 1.2 Volume 1:
24 Pre-EFI Initalization Core Interface
28 #ifndef _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
29 #define _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
31 #define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \
33 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \
36 typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
;
39 Returns the number of DXE capsules residing on the device.
41 This function searches for DXE capsules from the associated device and returns
42 the number and maximum size in bytes of the capsules discovered. Entry 1 is
43 assumed to be the highest load priority and entry N is assumed to be the lowest
46 @param[in] PeiServices General-purpose services that are available
48 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
50 @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On
51 output, *NumberRecoveryCapsules contains
52 the number of recovery capsule images
53 available for retrieval from this PEIM
56 @retval EFI_SUCCESS One or more capsules were discovered.
57 @retval EFI_DEVICE_ERROR A device error occurred.
58 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
63 (EFIAPI
*EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE
)(
64 IN EFI_PEI_SERVICES
**PeiServices
,
65 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
66 OUT UINTN
*NumberRecoveryCapsules
70 Returns the size and type of the requested recovery capsule.
72 This function gets the size and type of the capsule specified by CapsuleInstance.
74 @param[in] PeiServices General-purpose services that are available to every PEIM
75 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
77 @param[in] CapsuleInstance Specifies for which capsule instance to retrieve
78 the information. This parameter must be between
79 one and the value returned by GetNumberRecoveryCapsules()
80 in NumberRecoveryCapsules.
81 @param[out] Size A pointer to a caller-allocated UINTN in which
82 the size of the requested recovery module is
84 @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which
85 the type of the requested recovery capsule is
86 returned. The semantic meaning of the value
87 returned is defined by the implementation.
89 @retval EFI_SUCCESS One or more capsules were discovered.
90 @retval EFI_DEVICE_ERROR A device error occurred.
91 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
96 (EFIAPI
*EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO
)(
97 IN EFI_PEI_SERVICES
**PeiServices
,
98 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
99 IN UINTN CapsuleInstance
,
101 OUT EFI_GUID
*CapsuleType
105 Loads a DXE capsule from some media into memory.
107 This function, by whatever mechanism, retrieves a DXE capsule from some device
108 and loads it into memory. Note that the published interface is device neutral.
110 @param[in] PeiServices General-purpose services that are available
112 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
114 @param[in] CapsuleInstance Specifies which capsule instance to retrieve.
115 @param[out] Buffer Specifies a caller-allocated buffer in which
116 the requested recovery capsule will be returned.
118 @retval EFI_SUCCESS The capsule was loaded correctly.
119 @retval EFI_DEVICE_ERROR A device error occurred.
120 @retval EFI_NOT_FOUND A requested recovery DXE capsule cannot be found.
125 (EFIAPI
*EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE
)(
126 IN EFI_PEI_SERVICES
**PeiServices
,
127 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
128 IN UINTN CapsuleInstance
,
133 /// Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,
134 /// regardless of the underlying device(s).
136 struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
{
137 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules
; ///< Returns the number of DXE capsules residing on the device.
138 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo
; ///< Returns the size and type of the requested recovery capsule.
139 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule
; ///< Loads a DXE capsule from some media into memory.
142 extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid
;
144 #endif /* _PEI_DEVICE_RECOVERY_MODULE_PPI_H_ */