]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This Library uses Framework RecoveryModule PPI to do system recovery.\r | |
3 | \r | |
4 | This library instance is no longer used and module using this library\r | |
5 | class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined\r | |
6 | in PI 1.2 specification. \r | |
7 | \r | |
8 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r | |
9 | This program and the accompanying materials\r | |
10 | are licensed and made available under the terms and conditions of the BSD License\r | |
11 | which accompanies this distribution. The full text of the license may be found at\r | |
12 | http://opensource.org/licenses/bsd-license.php\r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | \r | |
17 | **/\r | |
18 | #include <PiPei.h>\r | |
19 | #include <Library/PeiServicesLib.h>\r | |
20 | #include <Library/PeiServicesTablePointerLib.h>\r | |
21 | #include <Library/DebugLib.h>\r | |
22 | \r | |
23 | #include <Ppi/RecoveryModule.h>\r | |
24 | \r | |
25 | /**\r | |
26 | Calling this function causes the system do recovery.\r | |
27 | \r | |
28 | @retval EFI_SUCESS Sucess to do recovery.\r | |
29 | @retval Others Fail to do recovery.\r | |
30 | **/\r | |
31 | EFI_STATUS\r | |
32 | EFIAPI\r | |
33 | PeiRecoverFirmware (\r | |
34 | VOID\r | |
35 | )\r | |
36 | {\r | |
37 | EFI_STATUS Status;\r | |
38 | EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery;\r | |
39 | \r | |
40 | Status = PeiServicesLocatePpi (\r | |
41 | &gEfiPeiRecoveryModulePpiGuid,\r | |
42 | 0,\r | |
43 | NULL,\r | |
44 | (VOID **)&PeiRecovery\r | |
45 | );\r | |
46 | ASSERT_EFI_ERROR (Status);\r | |
47 | \r | |
48 | return PeiRecovery->LoadRecoveryCapsule ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer(), PeiRecovery);\r | |
49 | }\r | |
50 | \r |