]>
Commit | Line | Data |
---|---|---|
00beb2ab H |
1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r | |
4 | This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | **/\r | |
13 | #include <Uefi.h>\r | |
14 | #include <Library/DebugLib.h>\r | |
15 | #include <Library/WinNtLib.h>\r | |
16 | \r | |
17 | /**\r | |
18 | This function causes a system-wide reset (cold reset), in which\r | |
19 | all circuitry within the system returns to its initial state. This type of reset \r | |
20 | is asynchronous to system operation and operates without regard to\r | |
21 | cycle boundaries.\r | |
22 | \r | |
23 | If this function returns, it means that the system does not support cold reset. \r | |
24 | **/\r | |
25 | VOID\r | |
26 | EFIAPI\r | |
27 | ResetCold (\r | |
28 | VOID\r | |
29 | )\r | |
30 | {\r | |
31 | gWinNt->ExitProcess (0);\r | |
32 | ASSERT (FALSE);\r | |
33 | }\r | |
34 | \r | |
35 | /**\r | |
36 | This function causes a system-wide initialization (warm reset), in which all processors \r | |
37 | are set to their initial state. Pending cycles are not corrupted.\r | |
38 | \r | |
39 | If this function returns, it means that the system does not support warm reset.\r | |
40 | **/\r | |
41 | VOID\r | |
42 | EFIAPI\r | |
43 | ResetWarm (\r | |
44 | VOID\r | |
45 | )\r | |
46 | {\r | |
47 | ResetCold ();\r | |
48 | }\r | |
49 | \r | |
50 | /**\r | |
51 | This function causes the system to enter a power state equivalent \r | |
52 | to the ACPI G2/S5 or G3 states.\r | |
53 | \r | |
54 | If this function returns, it means that the system does not support shut down reset.\r | |
55 | **/\r | |
56 | VOID\r | |
57 | EFIAPI\r | |
58 | ResetShutdown (\r | |
59 | VOID\r | |
60 | )\r | |
61 | {\r | |
62 | ResetCold ();\r | |
63 | }\r | |
64 | \r | |
65 | /**\r | |
66 | This function causes the system to enter S3 and then wake up immediately.\r | |
67 | \r | |
68 | If this function returns, it means that the system does not support S3 feature.\r | |
69 | **/\r | |
70 | VOID\r | |
71 | EFIAPI\r | |
72 | EnterS3WithImmediateWake (\r | |
73 | VOID\r | |
74 | )\r | |
75 | {\r | |
76 | ResetCold ();\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 | ResetCold ();\r | |
98 | }\r |