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