]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Ppi/DeviceRecoveryModule.h
Renaming files/directories
[mirror_edk2.git] / IntelFrameworkPkg / Include / Ppi / DeviceRecoveryModule.h
CommitLineData
297ce0fa 1/** @file\r
2 This file declares Device Recovery Module PPI.\r
3\r
4 Copyright (c) 2007, 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#include <PiPei.h>\r
25\r
26#define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \\r
27 { \\r
28 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \\r
29 }\r
30\r
31typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI;\r
32\r
33/**\r
34 This function, by whatever mechanism, searches for DXE capsules from the\r
35 associated device and returns the number and maximum size in bytes of\r
36 the capsules discovered. Entry 1 is assumed to be the highest load priority\r
37 and entry N is assumed to be the lowest priority.\r
38\r
39 @param PeiServices General-purpose services that are available to every PEIM\r
40 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.\r
41 @param NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On output,\r
42 *NumberRecoveryCapsules contains the number of recovery capsule\r
43 images available for retrieval from this PEIM instance.\r
44\r
45 @retval EFI_SUCCESS One or more capsules were discovered.\r
46 @retval EFI_DEVICE_ERROR A device error occurred.\r
47 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
48\r
49**/\r
50typedef\r
51EFI_STATUS\r
52(EFIAPI *EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE) (\r
53 IN EFI_PEI_SERVICES **PeiServices,\r
54 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
55 OUT UINTN *NumberRecoveryCapsules\r
56 );\r
57\r
58/**\r
59 This function gets the size and type of the requested recovery capsule.\r
60\r
61 @param PeiServices General-purpose services that are available to every PEIM\r
62 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.\r
63 @param CapsuleInstance Specifies for which capsule instance to retrieve the information.\r
64 @param Size A pointer to a caller-allocated UINTN in which the size of\r
65 the requested recovery module is returned.\r
66 @param CapsuleType A pointer to a caller-allocated EFI_GUID in\r
67 which the type of the requested recovery capsule is returned.\r
68\r
69 @retval EFI_SUCCESS One or more capsules were discovered.\r
70 @retval EFI_DEVICE_ERROR A device error occurred.\r
71 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
72\r
73**/\r
74typedef\r
75EFI_STATUS\r
76(EFIAPI *EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO) (\r
77 IN EFI_PEI_SERVICES **PeiServices,\r
78 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
79 IN UINTN CapsuleInstance,\r
80 OUT UINTN *Size,\r
81 OUT EFI_GUID *CapsuleType\r
82 );\r
83\r
84/**\r
85 This function, by whatever mechanism, retrieves a DXE capsule from some device\r
86 and loads it into memory. Note that the published interface is device neutral.\r
87\r
88 @param PeiServices General-purpose services that are available to every PEIM\r
89 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.\r
90 @param CapsuleInstance Specifies which capsule instance to retrieve.\r
91 @param Buffer Specifies a caller-allocated buffer in which the requested\r
92 recovery capsule will be returned.\r
93\r
94 @retval EFI_SUCCESS One or more capsules were discovered.\r
95 @retval EFI_DEVICE_ERROR A device error occurred.\r
96 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
97\r
98**/\r
99typedef\r
100EFI_STATUS\r
101(EFIAPI *EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE) (\r
102 IN OUT EFI_PEI_SERVICES **PeiServices,\r
103 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
104 IN UINTN CapsuleInstance,\r
105 OUT VOID *Buffer\r
106 );\r
107\r
108/**\r
109 @par Ppi Description:\r
110 Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,\r
111 regardless of the underlying device(s).\r
112\r
113 @param GetNumberRecoveryCapsules\r
114 Returns the number of DXE capsules that were found.\r
115\r
116 @param GetRecoveryCapsuleInfo\r
117 Returns the capsule image type and the size of a given image.\r
118\r
119 @param LoadRecoveryCapsule\r
120 Loads a DXE capsule into memory\r
121\r
122**/\r
123struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {\r
124 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules;\r
125 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo;\r
126 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule;\r
127};\r
128\r
129extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;\r
130\r
131#endif\r