]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Ppi/DeviceRecoveryModule.h
Renaming files/directories
[mirror_edk2.git] / IntelFrameworkPkg / Include / Ppi / DeviceRecoveryModule.h
1 /** @file
2 This file declares Device Recovery Module PPI.
3
4 Copyright (c) 2007, 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 #include <PiPei.h>
25
26 #define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \
27 { \
28 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \
29 }
30
31 typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI;
32
33 /**
34 This function, by whatever mechanism, searches for DXE capsules from the
35 associated device and returns the number and maximum size in bytes of
36 the capsules discovered. Entry 1 is assumed to be the highest load priority
37 and entry N is assumed to be the lowest priority.
38
39 @param PeiServices General-purpose services that are available to every PEIM
40 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
41 @param NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On output,
42 *NumberRecoveryCapsules contains the number of recovery capsule
43 images available for retrieval from this PEIM instance.
44
45 @retval EFI_SUCCESS One or more capsules were discovered.
46 @retval EFI_DEVICE_ERROR A device error occurred.
47 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
48
49 **/
50 typedef
51 EFI_STATUS
52 (EFIAPI *EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE) (
53 IN EFI_PEI_SERVICES **PeiServices,
54 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,
55 OUT UINTN *NumberRecoveryCapsules
56 );
57
58 /**
59 This function gets the size and type of the requested recovery capsule.
60
61 @param PeiServices General-purpose services that are available to every PEIM
62 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
63 @param CapsuleInstance Specifies for which capsule instance to retrieve the information.
64 @param Size A pointer to a caller-allocated UINTN in which the size of
65 the requested recovery module is returned.
66 @param CapsuleType A pointer to a caller-allocated EFI_GUID in
67 which the type of the requested recovery capsule is returned.
68
69 @retval EFI_SUCCESS One or more capsules were discovered.
70 @retval EFI_DEVICE_ERROR A device error occurred.
71 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
72
73 **/
74 typedef
75 EFI_STATUS
76 (EFIAPI *EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO) (
77 IN EFI_PEI_SERVICES **PeiServices,
78 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,
79 IN UINTN CapsuleInstance,
80 OUT UINTN *Size,
81 OUT EFI_GUID *CapsuleType
82 );
83
84 /**
85 This function, by whatever mechanism, retrieves a DXE capsule from some device
86 and loads it into memory. Note that the published interface is device neutral.
87
88 @param PeiServices General-purpose services that are available to every PEIM
89 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
90 @param CapsuleInstance Specifies which capsule instance to retrieve.
91 @param Buffer Specifies a caller-allocated buffer in which the requested
92 recovery capsule will be returned.
93
94 @retval EFI_SUCCESS One or more capsules were discovered.
95 @retval EFI_DEVICE_ERROR A device error occurred.
96 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
97
98 **/
99 typedef
100 EFI_STATUS
101 (EFIAPI *EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE) (
102 IN OUT EFI_PEI_SERVICES **PeiServices,
103 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,
104 IN UINTN CapsuleInstance,
105 OUT VOID *Buffer
106 );
107
108 /**
109 @par Ppi Description:
110 Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,
111 regardless of the underlying device(s).
112
113 @param GetNumberRecoveryCapsules
114 Returns the number of DXE capsules that were found.
115
116 @param GetRecoveryCapsuleInfo
117 Returns the capsule image type and the size of a given image.
118
119 @param LoadRecoveryCapsule
120 Loads a DXE capsule into memory
121
122 **/
123 struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {
124 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules;
125 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo;
126 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule;
127 };
128
129 extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;
130
131 #endif