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