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