]>
Commit | Line | Data |
---|---|---|
ce3cd892 MK |
1 | /** @file\r |
2 | PEI Reset System Library instance that calls the ResetSystem2() PEI Service.\r | |
3 | \r | |
4 | Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
5 | 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 | |
13 | **/\r | |
14 | \r | |
15 | #include <PiPei.h>\r | |
16 | #include <Library/ResetSystemLib.h>\r | |
17 | #include <Library/PeiServicesLib.h>\r | |
18 | \r | |
19 | /**\r | |
20 | This function causes a system-wide reset (cold reset), in which\r | |
d1102dba | 21 | all circuitry within the system returns to its initial state. This type of reset\r |
ce3cd892 MK |
22 | is asynchronous to system operation and operates without regard to\r |
23 | cycle boundaries.\r | |
24 | \r | |
d1102dba | 25 | If this function returns, it means that the system does not support cold reset.\r |
ce3cd892 MK |
26 | **/\r |
27 | VOID\r | |
28 | EFIAPI\r | |
29 | ResetCold (\r | |
30 | VOID\r | |
31 | )\r | |
32 | {\r | |
33 | PeiServicesResetSystem2 (EfiResetCold, EFI_SUCCESS, 0, NULL);\r | |
34 | }\r | |
35 | \r | |
36 | /**\r | |
d1102dba | 37 | This function causes a system-wide initialization (warm reset), in which all processors\r |
ce3cd892 MK |
38 | are set to their initial state. Pending cycles are not corrupted.\r |
39 | \r | |
40 | If this function returns, it means that the system does not support warm reset.\r | |
41 | **/\r | |
42 | VOID\r | |
43 | EFIAPI\r | |
44 | ResetWarm (\r | |
45 | VOID\r | |
46 | )\r | |
47 | {\r | |
48 | PeiServicesResetSystem2 (EfiResetWarm, EFI_SUCCESS, 0, NULL);\r | |
49 | }\r | |
50 | \r | |
51 | /**\r | |
d1102dba | 52 | This function causes the system to enter a power state equivalent\r |
ce3cd892 MK |
53 | to the ACPI G2/S5 or G3 states.\r |
54 | \r | |
55 | If this function returns, it means that the system does not support shut down reset.\r | |
56 | **/\r | |
57 | VOID\r | |
58 | EFIAPI\r | |
59 | ResetShutdown (\r | |
60 | VOID\r | |
61 | )\r | |
62 | {\r | |
63 | PeiServicesResetSystem2 (EfiResetShutdown, EFI_SUCCESS, 0, NULL);\r | |
64 | }\r | |
65 | \r | |
66 | /**\r | |
67 | This function causes the system to enter S3 and then wake up immediately.\r | |
68 | \r | |
69 | If this function returns, it means that the system does not support S3 feature.\r | |
70 | **/\r | |
71 | VOID\r | |
72 | EFIAPI\r | |
73 | EnterS3WithImmediateWake (\r | |
74 | VOID\r | |
75 | )\r | |
76 | {\r | |
77 | }\r | |
78 | \r | |
79 | /**\r | |
80 | This function causes a systemwide reset. The exact type of the reset is\r | |
81 | defined by the EFI_GUID that follows the Null-terminated Unicode string passed\r | |
82 | into ResetData. If the platform does not recognize the EFI_GUID in ResetData\r | |
83 | the platform must pick a supported reset type to perform.The platform may\r | |
84 | optionally log the parameters from any non-normal reset that occurs.\r | |
85 | \r | |
86 | @param[in] DataSize The size, in bytes, of ResetData.\r | |
87 | @param[in] ResetData The data buffer starts with a Null-terminated string,\r | |
88 | followed by the EFI_GUID.\r | |
89 | **/\r | |
90 | VOID\r | |
91 | EFIAPI\r | |
92 | ResetPlatformSpecific (\r | |
93 | IN UINTN DataSize,\r | |
94 | IN VOID *ResetData\r | |
95 | )\r | |
96 | {\r | |
97 | PeiServicesResetSystem2 (EfiResetPlatformSpecific, EFI_SUCCESS, DataSize, ResetData);\r | |
98 | }\r |