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