]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/DeviceRecoveryModule.h
automagically convert ELF to PE/COFF (i386 only)
[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
0647c9ad
LG
37 @param PeiServices General-purpose services that are available to every PEIM\r
38 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.\r
39 @param NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On output,\r
40 *NumberRecoveryCapsules contains the number of recovery capsule \r
41 images available for retrieval from this PEIM instance.\r
42\r
43 @retval EFI_SUCCESS One or more capsules were discovered.\r
44 @retval EFI_DEVICE_ERROR A device error occurred.\r
45 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
878ddf1f 46\r
47**/\r
48typedef\r
49EFI_STATUS\r
50(EFIAPI *EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE) (\r
51 IN EFI_PEI_SERVICES **PeiServices,\r
52 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
53 OUT UINTN *NumberRecoveryCapsules\r
54 );\r
55\r
56/**\r
57 This function gets the size and type of the requested recovery capsule.\r
58\r
0647c9ad
LG
59 @param PeiServices General-purpose services that are available to every PEIM\r
60 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.\r
878ddf1f 61 @param CapsuleInstance Specifies for which capsule instance to retrieve the information.\r
0647c9ad
LG
62 @param Size A pointer to a caller-allocated UINTN in which the size of\r
63 the requested recovery module is returned.\r
64 @param CapsuleType A pointer to a caller-allocated EFI_GUID in\r
65 which the type of the requested recovery capsule is returned.\r
66\r
67 @retval EFI_SUCCESS One or more capsules were discovered.\r
68 @retval EFI_DEVICE_ERROR A device error occurred.\r
69 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
878ddf1f 70\r
71**/\r
72typedef\r
73EFI_STATUS\r
74(EFIAPI *EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO) (\r
75 IN EFI_PEI_SERVICES **PeiServices,\r
76 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
77 IN UINTN CapsuleInstance,\r
78 OUT UINTN *Size,\r
79 OUT EFI_GUID *CapsuleType\r
80 );\r
81\r
82/**\r
83 This function, by whatever mechanism, retrieves a DXE capsule from some device \r
84 and loads it into memory. Note that the published interface is device neutral.\r
85\r
0647c9ad
LG
86 @param PeiServices General-purpose services that are available to every PEIM\r
87 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.\r
878ddf1f 88 @param CapsuleInstance Specifies which capsule instance to retrieve.\r
0647c9ad
LG
89 @param Buffer Specifies a caller-allocated buffer in which the requested \r
90 recovery capsule will be returned.\r
91\r
92 @retval EFI_SUCCESS One or more capsules were discovered.\r
93 @retval EFI_DEVICE_ERROR A device error occurred.\r
94 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
878ddf1f 95\r
96**/\r
97typedef\r
98EFI_STATUS\r
99(EFIAPI *EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE) (\r
100 IN OUT EFI_PEI_SERVICES **PeiServices,\r
101 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
102 IN UINTN CapsuleInstance,\r
103 OUT VOID *Buffer\r
104 );\r
105\r
106/**\r
107 @par Ppi Description:\r
108 Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI, \r
109 regardless of the underlying device(s).\r
110\r
111 @param GetNumberRecoveryCapsules\r
112 Returns the number of DXE capsules that were found.\r
113\r
114 @param GetRecoveryCapsuleInfo\r
115 Returns the capsule image type and the size of a given image. \r
116\r
117 @param LoadRecoveryCapsule\r
118 Loads a DXE capsule into memory\r
119\r
120**/\r
121struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {\r
122 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules;\r
123 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo;\r
124 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule;\r
125};\r
126\r
127extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;\r
128\r
129#endif\r