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