]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Ppi/DeviceRecoveryModule.h
Correct the structure's comments to follow doxygen format.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Ppi / DeviceRecoveryModule.h
1 /** @file
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.
10
11 Copyright (c) 2007 - 2009, 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
16
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.
19
20 Module Name: DeviceRecoveryModule.h
21
22 @par Revision Reference:
23 This PPI is defined in Framework of EFI Recovery spec.
24 Version 0.9
25
26 **/
27
28 #ifndef _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
29 #define _PEI_DEVICE_RECOVERY_MODULE_PPI_H_
30
31 #include <PiPei.h>
32
33 #define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \
34 { \
35 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \
36 }
37
38 typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI;
39
40 /**
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.
45
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.
51
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.
55
56 **/
57 typedef
58 EFI_STATUS
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
63 );
64
65 /**
66 This function gets the size and type of the requested recovery capsule.
67
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.
75
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.
79
80 **/
81 typedef
82 EFI_STATUS
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,
87 OUT UINTN *Size,
88 OUT EFI_GUID *CapsuleType
89 );
90
91 /**
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.
94
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.
100
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.
104
105 **/
106 typedef
107 EFI_STATUS
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,
112 OUT VOID *Buffer
113 );
114
115 ///
116 /// Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,
117 /// regardless of the underlying device(s).
118 ///
119 struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {
120 ///
121 /// Returns the number of DXE capsules that were found.
122 ///
123 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules;
124
125 ///
126 /// Returns the capsule image type and the size of a given image.
127 ///
128 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo;
129
130 ///
131 /// Loads a DXE capsule into memory
132 ///
133 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule;
134 };
135
136 extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;
137
138 #endif