]> git.proxmox.com Git - mirror_edk2.git/blame - PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
PcAtChipsetPkg: Update ResetSystemLib with PCDs
[mirror_edk2.git] / PcAtChipsetPkg / Library / ResetSystemLib / ResetSystemLib.c
CommitLineData
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
c07b2a9f 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 <Base.h>\r
16\r
17#include <Library/DebugLib.h>\r
18#include <Library/IoLib.h>\r
19\r
20/**\r
21 Calling this function causes a system-wide reset. This sets\r
22 all circuitry within the system to its initial state. This type of reset\r
23 is asynchronous to system operation and operates without regard to\r
24 cycle boundaries.\r
25\r
26 System reset should not return, if it returns, it means the system does\r
27 not support cold reset.\r
28**/\r
29VOID\r
30EFIAPI\r
31ResetCold (\r
32 VOID\r
33 )\r
34{\r
631c9427 35 IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8 (PcdResetControlValueColdReset));\r
c07b2a9f 36}\r
37\r
38/**\r
39 Calling this function causes a system-wide initialization. The processors\r
40 are set to their initial state, and pending cycles are not corrupted.\r
41\r
42 System reset should not return, if it returns, it means the system does\r
43 not support warm reset.\r
44**/\r
45VOID\r
46EFIAPI\r
47ResetWarm (\r
48 VOID\r
49 )\r
50{\r
631c9427 51 IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8 (PcdResetControlValueColdReset));\r
c07b2a9f 52}\r
53\r
54/**\r
55 Calling this function causes the system to enter a power state equivalent\r
56 to the ACPI G2/S5 or G3 states.\r
57\r
58 System shutdown should not return, if it returns, it means the system does\r
59 not support shut down reset.\r
60**/\r
61VOID\r
62EFIAPI\r
63ResetShutdown (\r
64 VOID\r
65 )\r
66{\r
67 ASSERT (FALSE);\r
68}\r
69\r
70\r
71/**\r
72 Calling this function causes the system to enter a power state for capsule\r
73 update.\r
74\r
75 Reset update should not return, if it returns, it means the system does\r
76 not support capsule update.\r
77\r
78**/\r
79VOID\r
80EFIAPI\r
81EnterS3WithImmediateWake (\r
82 VOID\r
83 )\r
84{\r
85 ASSERT (FALSE);\r
86}\r