]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/DeviceRecoveryModule.h
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Include / Ppi / DeviceRecoveryModule.h
CommitLineData
1cddf2ef 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
9df063a0
HT
13 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
14 This program and the accompanying materials\r
1cddf2ef 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 UEFI Platform Initialization Specification 1.2 Volume 1: \r
24 Pre-EFI Initalization Core Interface\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\r
42 the number and maximum size in bytes of the capsules discovered. Entry 1 is \r
43 assumed to be the highest load priority and entry N is assumed to be the lowest \r
44 priority.\r
45\r
46 @param[in] PeiServices General-purpose services that are available \r
47 to every PEIM\r
48 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
49 instance.\r
50 @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On \r
51 output, *NumberRecoveryCapsules contains \r
52 the number of recovery capsule images \r
53 available for retrieval from this PEIM \r
54 instance.\r
55\r
56 @retval EFI_SUCCESS One or more capsules were discovered.\r
57 @retval EFI_DEVICE_ERROR A device error occurred.\r
58 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
59\r
60**/\r
61typedef\r
62EFI_STATUS\r
63(EFIAPI *EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE)(\r
64 IN EFI_PEI_SERVICES **PeiServices,\r
65 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
66 OUT UINTN *NumberRecoveryCapsules\r
67 );\r
68\r
69/**\r
70 Returns the size and type of the requested recovery capsule.\r
71\r
72 This function gets the size and type of the capsule specified by CapsuleInstance.\r
73\r
74 @param[in] PeiServices General-purpose services that are available to every PEIM\r
75 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI \r
76 instance.\r
77 @param[in] CapsuleInstance Specifies for which capsule instance to retrieve \r
78 the information. This parameter must be between \r
79 one and the value returned by GetNumberRecoveryCapsules() \r
80 in NumberRecoveryCapsules.\r
81 @param[out] Size A pointer to a caller-allocated UINTN in which \r
82 the size of the requested recovery module is \r
83 returned.\r
84 @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which \r
85 the type of the requested recovery capsule is \r
86 returned. The semantic meaning of the value \r
87 returned is defined by the implementation.\r
88\r
89 @retval EFI_SUCCESS One or more capsules were discovered.\r
90 @retval EFI_DEVICE_ERROR A device error occurred.\r
91 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
92\r
93**/\r
94typedef\r
95EFI_STATUS\r
96(EFIAPI *EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO)(\r
97 IN EFI_PEI_SERVICES **PeiServices,\r
98 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
99 IN UINTN CapsuleInstance,\r
100 OUT UINTN *Size,\r
101 OUT EFI_GUID *CapsuleType\r
102 );\r
103\r
104/**\r
105 Loads a DXE capsule from some media into memory.\r
106\r
107 This function, by whatever mechanism, retrieves a DXE capsule from some device\r
108 and loads it into memory. Note that the published interface is device neutral.\r
109\r
110 @param[in,out] PeiServices General-purpose services that are available \r
111 to every PEIM\r
112 @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
113 instance.\r
114 @param[in] CapsuleInstance Specifies which capsule instance to retrieve.\r
115 @param[out] Buffer Specifies a caller-allocated buffer in which \r
116 the requested recovery capsule will be returned.\r
117\r
118 @retval EFI_SUCCESS The capsule was loaded correctly.\r
119 @retval EFI_DEVICE_ERROR A device error occurred.\r
120 @retval EFI_NOT_FOUND A requested recovery DXE capsule cannot be found.\r
121\r
122**/\r
123typedef\r
124EFI_STATUS\r
125(EFIAPI *EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE)(\r
126 IN OUT EFI_PEI_SERVICES **PeiServices,\r
127 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
128 IN UINTN CapsuleInstance,\r
129 OUT VOID *Buffer\r
130 );\r
131\r
132///\r
133/// Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,\r
134/// regardless of the underlying device(s).\r
135///\r
136struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {\r
137 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules; ///< Returns the number of DXE capsules residing on the device.\r
138 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo; ///< Returns the size and type of the requested recovery capsule.\r
139 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule; ///< Loads a DXE capsule from some media into memory.\r
140};\r
141\r
142extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;\r
143\r
144#endif /* _PEI_DEVICE_RECOVERY_MODULE_PPI_H_ */\r