]> git.proxmox.com Git - mirror_edk2.git/blob - OldMdePkg/Include/Ppi/DeviceRecoveryModule.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / 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 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
39 @param NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On output,
40 *NumberRecoveryCapsules contains the number of recovery capsule
41 images available for retrieval from this PEIM instance.
42
43 @retval EFI_SUCCESS One or more capsules were discovered.
44 @retval EFI_DEVICE_ERROR A device error occurred.
45 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
46
47 **/
48 typedef
49 EFI_STATUS
50 (EFIAPI *EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE) (
51 IN EFI_PEI_SERVICES **PeiServices,
52 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,
53 OUT UINTN *NumberRecoveryCapsules
54 );
55
56 /**
57 This function gets the size and type of the requested recovery capsule.
58
59 @param PeiServices General-purpose services that are available to every PEIM
60 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
61 @param CapsuleInstance Specifies for which capsule instance to retrieve the information.
62 @param Size A pointer to a caller-allocated UINTN in which the size of
63 the requested recovery module is returned.
64 @param CapsuleType A pointer to a caller-allocated EFI_GUID in
65 which the type of the requested recovery capsule is returned.
66
67 @retval EFI_SUCCESS One or more capsules were discovered.
68 @retval EFI_DEVICE_ERROR A device error occurred.
69 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
70
71 **/
72 typedef
73 EFI_STATUS
74 (EFIAPI *EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO) (
75 IN EFI_PEI_SERVICES **PeiServices,
76 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,
77 IN UINTN CapsuleInstance,
78 OUT UINTN *Size,
79 OUT EFI_GUID *CapsuleType
80 );
81
82 /**
83 This function, by whatever mechanism, retrieves a DXE capsule from some device
84 and loads it into memory. Note that the published interface is device neutral.
85
86 @param PeiServices General-purpose services that are available to every PEIM
87 @param This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance.
88 @param CapsuleInstance Specifies which capsule instance to retrieve.
89 @param Buffer Specifies a caller-allocated buffer in which the requested
90 recovery capsule will be returned.
91
92 @retval EFI_SUCCESS One or more capsules were discovered.
93 @retval EFI_DEVICE_ERROR A device error occurred.
94 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
95
96 **/
97 typedef
98 EFI_STATUS
99 (EFIAPI *EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE) (
100 IN OUT EFI_PEI_SERVICES **PeiServices,
101 IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,
102 IN UINTN CapsuleInstance,
103 OUT VOID *Buffer
104 );
105
106 /**
107 @par Ppi Description:
108 Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,
109 regardless of the underlying device(s).
110
111 @param GetNumberRecoveryCapsules
112 Returns the number of DXE capsules that were found.
113
114 @param GetRecoveryCapsuleInfo
115 Returns the capsule image type and the size of a given image.
116
117 @param LoadRecoveryCapsule
118 Loads a DXE capsule into memory
119
120 **/
121 struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {
122 EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules;
123 EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo;
124 EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule;
125 };
126
127 extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;
128
129 #endif