+/**@file\r
+ Recovery Library. This library class defines a set of methods related do recovery.\r
+\r
+Copyright (c) 2006 - 2007 Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+#include <FrameworkPei.h>\r
+#include <Library/PeiServicesLib.h>\r
+#include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/DebugLib.h>\r
+\r
+#include <Ppi/RecoveryModule.h>\r
+\r
+/**\r
+ Calling this function causes the system do recovery.\r
+ \r
+ @retval EFI_SUCESS Sucess to do recovery.\r
+ @retval Others Fail to do recovery.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Recovery (\r
+ VOID\r
+ )\r
+{\r
+ EFI_STATUS Status;\r
+ EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery;\r
+ \r
+ Status = PeiServicesLocatePpi (\r
+ &gEfiPeiRecoveryModulePpiGuid,\r
+ 0,\r
+ NULL,\r
+ (VOID **)&PeiRecovery\r
+ );\r
+ ASSERT_EFI_ERROR (Status);\r
+\r
+ return PeiRecovery->LoadRecoveryCapsule (GetPeiServicesTablePointer(), PeiRecovery);\r
+}\r
+\r