]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Ppi/DeviceRecoveryModule.h
Initial import.
[mirror_edk2.git] / MdePkg / Include / Ppi / DeviceRecoveryModule.h
1 /** @file
2 This file declares Device Recovery Module PPI.
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: DeviceRecoveryModule.h
14
15 @par Revision Reference:
16 This PPI is defined in Framework of EFI Recovery spec.
17 Version 0.9
18
19 **/
20
21 #ifndef _PEI_DEVICE_RECOVERY_MODULE_PPI_H
22 #define _PEI_DEVICE_RECOVERY_MODULE_PPI_H
23
24 #define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \
25 { \
26 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \
27 }
28
29 typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI;
30
31 /**
32 This function, by whatever mechanism, searches for DXE capsules from the
33 associated device and returns the number and maximum size in bytes of
34 the capsules discovered. Entry 1 is assumed to be the highest load priority
35 and entry N is assumed to be the lowest priority.
36
37 @param PeiServices General-purpose services that are available to every PEIM
38
39 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
40
41 @param NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On output,
42 *NumberRecoveryCapsules contains the number of recovery capsule images available
43 for retrieval from this PEIM instance.
44
45 @retval EFI_SUCCESS One or more capsules were discovered.
46
47 @retval EFI_DEVICE_ERROR A device error occurred.
48
49 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
50
51 **/
52 typedef
53 EFI_STATUS
54 (EFIAPI *EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE) (
55 IN EFI_PEI_SERVICES **PeiServices,
56 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,
57 OUT UINTN *NumberRecoveryCapsules
58 );
59
60 /**
61 This function gets the size and type of the requested recovery capsule.
62
63 @param PeiServices General-purpose services that are available to every PEIM
64
65 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
66
67 @param CapsuleInstance Specifies for which capsule instance to retrieve the information.
68
69 @param Size A pointer to a caller-allocated UINTN in which the size of
70 the requested recovery module is returned.
71
72 @param CapsuleType A pointer to a caller-allocated EFI_GUID in
73 which the type of the requested recovery capsule is returned.
74
75 @retval EFI_SUCCESS One or more capsules were discovered.
76
77 @retval EFI_DEVICE_ERROR A device error occurred.
78
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 This function, by whatever mechanism, retrieves a DXE capsule from some device
94 and loads it into memory. Note that the published interface is device neutral.
95
96 @param PeiServices General-purpose services that are available to every PEIM
97
98 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
99
100 @param CapsuleInstance Specifies which capsule instance to retrieve.
101
102 @param Buffer Specifies a caller-allocated buffer in which the requested recovery capsule will be returned.
103
104 @retval EFI_SUCCESS One or more capsules were discovered.
105
106 @retval EFI_DEVICE_ERROR A device error occurred.
107
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 @par Ppi Description:
122 Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,
123 regardless of the underlying device(s).
124
125 @param GetNumberRecoveryCapsules
126 Returns the number of DXE capsules that were found.
127
128 @param GetRecoveryCapsuleInfo
129 Returns the capsule image type and the size of a given image.
130
131 @param LoadRecoveryCapsule
132 Loads a DXE capsule into memory
133
134 **/
135 struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {
136 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules;
137 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo;
138 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule;
139 };
140
141 extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;
142
143 #endif