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