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