2 This file declares Device Recovery Module PPI.
4 Copyright (c) 2007, Intel Corporation
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.
13 Module Name: DeviceRecoveryModule.h
15 @par Revision Reference:
16 This PPI is defined in Framework of EFI Recovery spec.
21 #ifndef _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
22 #define _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
26 #define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \
28 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \
31 typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
;
34 This function, by whatever mechanism, searches for DXE capsules from the
35 associated device and returns the number and maximum size in bytes of
36 the capsules discovered. Entry 1 is assumed to be the highest load priority
37 and entry N is assumed to be the lowest priority.
39 @param PeiServices General-purpose services that are available to every PEIM
40 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
41 @param NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On output,
42 *NumberRecoveryCapsules contains the number of recovery capsule
43 images available for retrieval from this PEIM instance.
45 @retval EFI_SUCCESS One or more capsules were discovered.
46 @retval EFI_DEVICE_ERROR A device error occurred.
47 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
52 (EFIAPI
*EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE
) (
53 IN EFI_PEI_SERVICES
**PeiServices
,
54 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
55 OUT UINTN
*NumberRecoveryCapsules
59 This function gets the size and type of the requested recovery capsule.
61 @param PeiServices General-purpose services that are available to every PEIM
62 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
63 @param CapsuleInstance Specifies for which capsule instance to retrieve the information.
64 @param Size A pointer to a caller-allocated UINTN in which the size of
65 the requested recovery module is returned.
66 @param CapsuleType A pointer to a caller-allocated EFI_GUID in
67 which the type of the requested recovery capsule is returned.
69 @retval EFI_SUCCESS One or more capsules were discovered.
70 @retval EFI_DEVICE_ERROR A device error occurred.
71 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
76 (EFIAPI
*EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO
) (
77 IN EFI_PEI_SERVICES
**PeiServices
,
78 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
79 IN UINTN CapsuleInstance
,
81 OUT EFI_GUID
*CapsuleType
85 This function, by whatever mechanism, retrieves a DXE capsule from some device
86 and loads it into memory. Note that the published interface is device neutral.
88 @param PeiServices General-purpose services that are available to every PEIM
89 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
90 @param CapsuleInstance Specifies which capsule instance to retrieve.
91 @param Buffer Specifies a caller-allocated buffer in which the requested
92 recovery capsule will be returned.
94 @retval EFI_SUCCESS One or more capsules were discovered.
95 @retval EFI_DEVICE_ERROR A device error occurred.
96 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
101 (EFIAPI
*EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE
) (
102 IN OUT EFI_PEI_SERVICES
**PeiServices
,
103 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
*This
,
104 IN UINTN CapsuleInstance
,
109 @par Ppi Description:
110 Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,
111 regardless of the underlying device(s).
113 @param GetNumberRecoveryCapsules
114 Returns the number of DXE capsules that were found.
116 @param GetRecoveryCapsuleInfo
117 Returns the capsule image type and the size of a given image.
119 @param LoadRecoveryCapsule
120 Loads a DXE capsule into memory
123 struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI
{
124 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules
;
125 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo
;
126 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule
;
129 extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid
;