2 This file declares Device Recovery Module PPI.
3 The interface of this PPI does the following:
4 - Reports the number of recovery DXE capsules that exist on the associated device(s)
5 - Finds the requested firmware binary capsule
6 - Loads that capsule into memory
7 A device can be either a group of devices, such as a block device, or an individual device.T he
8 module determines the internal search order, with capsule number 1 as the highest load priority and
9 number N as the lowest priority.
11 Copyright (c) 2007, Intel Corporation
12 All rights reserved. This program and the accompanying materials
13 are licensed and made available under the terms and conditions of the BSD License
14 which accompanies this distribution. The full text of the license may be found at
15 http://opensource.org/licenses/bsd-license.php
17 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
18 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 Module Name: DeviceRecoveryModule.h
22 @par Revision Reference:
23 This PPI is defined in Framework of EFI Recovery spec.
28 #ifndef _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
29 #define _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
33 #define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \
35 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \
38 typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
;
41 This function, by whatever mechanism, searches for DXE capsules from the
42 associated device and returns the number and maximum size in bytes of
43 the capsules discovered. Entry 1 is assumed to be the highest load priority
44 and entry N is assumed to be the lowest priority.
46 @param PeiServices General-purpose services that are available to every PEIM
47 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
48 @param NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On output,
49 *NumberRecoveryCapsules contains the number of recovery capsule
50 images available for retrieval from this PEIM instance.
52 @retval EFI_SUCCESS One or more capsules were discovered.
53 @retval EFI_DEVICE_ERROR A device error occurred.
54 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
59 (EFIAPI
*EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE
) (
60 IN EFI_PEI_SERVICES
**PeiServices
,
61 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
62 OUT UINTN
*NumberRecoveryCapsules
66 This function gets the size and type of the requested recovery capsule.
68 @param PeiServices General-purpose services that are available to every PEIM
69 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
70 @param CapsuleInstance Specifies for which capsule instance to retrieve the information.
71 @param Size A pointer to a caller-allocated UINTN in which the size of
72 the requested recovery module is returned.
73 @param CapsuleType A pointer to a caller-allocated EFI_GUID in
74 which the type of the requested recovery capsule is returned.
76 @retval EFI_SUCCESS One or more capsules were discovered.
77 @retval EFI_DEVICE_ERROR A device error occurred.
78 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
83 (EFIAPI
*EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO
) (
84 IN EFI_PEI_SERVICES
**PeiServices
,
85 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
86 IN UINTN CapsuleInstance
,
88 OUT EFI_GUID
*CapsuleType
92 This function, by whatever mechanism, retrieves a DXE capsule from some device
93 and loads it into memory. Note that the published interface is device neutral.
95 @param PeiServices General-purpose services that are available to every PEIM
96 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
97 @param CapsuleInstance Specifies which capsule instance to retrieve.
98 @param Buffer Specifies a caller-allocated buffer in which the requested
99 recovery capsule will be returned.
101 @retval EFI_SUCCESS One or more capsules were discovered.
102 @retval EFI_DEVICE_ERROR A device error occurred.
103 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
108 (EFIAPI
*EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE
) (
109 IN OUT EFI_PEI_SERVICES
**PeiServices
,
110 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
111 IN UINTN CapsuleInstance
,
116 @par Ppi Description:
117 Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,
118 regardless of the underlying device(s).
120 @param GetNumberRecoveryCapsules
121 Returns the number of DXE capsules that were found.
123 @param GetRecoveryCapsuleInfo
124 Returns the capsule image type and the size of a given image.
126 @param LoadRecoveryCapsule
127 Loads a DXE capsule into memory
130 struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
{
131 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules
;
132 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo
;
133 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule
;
136 extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid
;