]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Ppi/RecoveryModule.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Ppi / RecoveryModule.h
1 /** @file
2 This file declares Recovery Module PPI. This PPI is used to find and load the
3 recovery files.
4
5 A module that produces this PPI has many roles and is responsible for the following:
6 -# Calling the driver recovery PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.
7 GetNumberRecoveryCapsules() to determine if one or more DXE recovery
8 entities exist.
9 -# If no capsules exist, then performing appropriate error handling.
10 -# Allocating a buffer of MaxRecoveryCapsuleSize as determined by
11 EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.GetRecoveryCapsuleInfo() or
12 larger.
13 -# Determining the policy in which DXE recovery capsules are loaded.
14 -# Calling the driver recovery PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.
15 LoadRecoveryCapsule() for capsule number x.
16 -# If the load failed, performing appropriate error handling.
17 -# Performing security checks for a loaded DXE recovery capsule.
18 -# If the security checks failed, then logging the failure in a data HOB.
19 -# If the security checks failed, then determining the next
20 EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.LoadRecoveryCapsule()capsule number;
21 otherwise, go to step 11.
22 -# If more DXE recovery capsules exist, then go to step 5; otherwise, perform
23 error handling.
24 -# Decomposing the capsule loaded by EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.
25 LoadRecoveryCapsule() into its components. It is assumed that the path
26 parameters are redundant for recovery and Setup parameters are either
27 redundant or canned.
28 -# Invalidating all HOB entries for updateable firmware volume entries.
29 This invalidation prevents possible errant drivers from being executed.
30 -# Updating the HOB table with the recovery DXE firmware volume information
31 generated from the capsule decomposition.
32 -# Returning to the PEI Dispatcher.
33
34 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
35 This program and the accompanying materials
36 are licensed and made available under the terms and conditions of the BSD License
37 which accompanies this distribution. The full text of the license may be found at
38 http://opensource.org/licenses/bsd-license.php
39
40 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
41 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
42
43 @par Revision Reference:
44 This PPI is defined in UEFI Platform Initialization Specification 1.2 Errata B Volume 1:
45 Pre-EFI Initalization Core Interface
46
47 **/
48
49 #ifndef __PEI_RECOVERY_MODULE_PPI_H__
50 #define __PEI_RECOVERY_MODULE_PPI_H__
51
52 #define EFI_PEI_RECOVERY_MODULE_PPI_GUID \
53 { \
54 0xFB6D9542, 0x612D, 0x4f45, {0x87, 0x2F, 0x5C, 0xFF, 0x52, 0xE9, 0x3D, 0xCF } \
55 }
56
57 typedef struct _EFI_PEI_RECOVERY_MODULE_PPI EFI_PEI_RECOVERY_MODULE_PPI;
58
59 /**
60 Loads a DXE capsule from some media into memory and updates the HOB table
61 with the DXE firmware volume information.
62
63 @param PeiServices General-purpose services that are available to every PEIM.
64 @param This Indicates the EFI_PEI_RECOVERY_MODULE_PPI instance.
65
66 @retval EFI_SUCCESS The capsule was loaded correctly.
67 @retval EFI_DEVICE_ERROR A device error occurred.
68 @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
69
70 **/
71 typedef
72 EFI_STATUS
73 (EFIAPI *EFI_PEI_LOAD_RECOVERY_CAPSULE)(
74 IN EFI_PEI_SERVICES **PeiServices,
75 IN EFI_PEI_RECOVERY_MODULE_PPI *This
76 );
77
78 ///
79 /// Finds and loads the recovery files.
80 ///
81 struct _EFI_PEI_RECOVERY_MODULE_PPI {
82 EFI_PEI_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule; ///< Loads a DXE binary capsule into memory.
83 };
84
85 extern EFI_GUID gEfiPeiRecoveryModulePpiGuid;
86
87 #endif