]>
Commit | Line | Data |
---|---|---|
615c6dd0 | 1 | /** @file\r |
b1f6a7c6 | 2 | Pei Core Reset System Support\r |
3 | \r | |
192f6d4c | 4 | Copyright (c) 2006, Intel Corporation \r |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
b1f6a7c6 | 13 | **/\r |
192f6d4c | 14 | \r |
b1f6a7c6 | 15 | #include <PeiMain.h>\r |
192f6d4c | 16 | \r |
b1f6a7c6 | 17 | /**\r |
192f6d4c | 18 | \r |
b1f6a7c6 | 19 | Core version of the Reset System\r |
192f6d4c | 20 | \r |
192f6d4c | 21 | \r |
dc857d56 | 22 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
192f6d4c | 23 | \r |
b1f6a7c6 | 24 | @retval EFI_NOT_AVAILABLE_YET PPI not available yet.\r |
25 | @retval EFI_DEVICE_ERROR Did not reset system.\r | |
26 | Otherwise, resets the system.\r | |
192f6d4c | 27 | \r |
b1f6a7c6 | 28 | **/\r |
192f6d4c | 29 | EFI_STATUS\r |
30 | EFIAPI\r | |
31 | PeiResetSystem (\r | |
b0d803fe | 32 | IN CONST EFI_PEI_SERVICES **PeiServices\r |
192f6d4c | 33 | )\r |
192f6d4c | 34 | {\r |
35 | EFI_STATUS Status;\r | |
36 | EFI_PEI_RESET_PPI *ResetPpi;\r | |
37 | \r | |
38 | Status = PeiServicesLocatePpi (\r | |
39 | &gEfiPeiResetPpiGuid, \r | |
40 | 0, \r | |
41 | NULL, \r | |
42 | (VOID **)&ResetPpi \r | |
43 | );\r | |
44 | \r | |
45 | //\r | |
46 | // LocatePpi returns EFI_NOT_FOUND on error\r | |
47 | //\r | |
48 | if (!EFI_ERROR (Status)) {\r | |
49 | return ResetPpi->ResetSystem (PeiServices);\r | |
50 | } \r | |
51 | return EFI_NOT_AVAILABLE_YET;\r | |
52 | }\r | |
53 | \r |