]>
Commit | Line | Data |
---|---|---|
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 | |
36 | typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI;\r | |
37 | \r | |
38 | /**\r | |
91829459 | 39 | Returns the number of DXE capsules residing on the device.\r |
40 | \r | |
fab84ef5 | 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 | |
297ce0fa | 44 | \r |
91829459 | 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 | |
297ce0fa | 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 | |
56 | typedef\r | |
57 | EFI_STATUS\r | |
69686d56 | 58 | (EFIAPI *EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE)(\r |
fab84ef5 | 59 | IN EFI_PEI_SERVICES **PeiServices,\r |
60 | IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r | |
61 | OUT UINTN *NumberRecoveryCapsules\r | |
297ce0fa | 62 | );\r |
63 | \r | |
64 | /**\r | |
91829459 | 65 | Returns the size and type of the requested recovery capsule.\r |
66 | \r | |
297ce0fa | 67 | This function gets the size and type of the requested recovery capsule.\r |
68 | \r | |
91829459 | 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 | |
297ce0fa | 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 | |
84 | typedef\r | |
85 | EFI_STATUS\r | |
69686d56 | 86 | (EFIAPI *EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO)(\r |
fab84ef5 | 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 | |
297ce0fa | 92 | );\r |
93 | \r | |
94 | /**\r | |
91829459 | 95 | Loads a DXE capsule from some media into memory.\r |
96 | \r | |
fab84ef5 | 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 | |
297ce0fa | 99 | \r |
91829459 | 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 | @param[out] Buffer Specifies a caller-allocated buffer in which the requested\r | |
104 | recovery capsule will be returned.\r | |
297ce0fa | 105 | \r |
106 | @retval EFI_SUCCESS One or more capsules were discovered.\r | |
107 | @retval EFI_DEVICE_ERROR A device error occurred.\r | |
108 | @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r | |
109 | \r | |
110 | **/\r | |
111 | typedef\r | |
112 | EFI_STATUS\r | |
69686d56 | 113 | (EFIAPI *EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE)(\r |
297ce0fa | 114 | IN OUT EFI_PEI_SERVICES **PeiServices,\r |
fab84ef5 | 115 | IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r |
116 | IN UINTN CapsuleInstance,\r | |
117 | OUT VOID *Buffer\r | |
297ce0fa | 118 | );\r |
119 | \r | |
2bbaeb0d | 120 | ///\r |
121 | /// Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,\r | |
122 | /// regardless of the underlying device(s).\r | |
123 | ///\r | |
297ce0fa | 124 | struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {\r |
125 | EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules;\r | |
126 | EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo;\r | |
127 | EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule;\r | |
128 | };\r | |
129 | \r | |
130 | extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;\r | |
131 | \r | |
fab84ef5 | 132 | #endif /* _PEI_DEVICE_RECOVERY_MODULE_PPI_H_ */\r |