]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Library / BaseResetSystemLibNull / BaseResetSystemLibNull.c
CommitLineData
064d5de3 1/** @file\r
2 Null Reset System Library instance that only generates ASSERT() conditions.\r
3\r
d1102dba 4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
064d5de3 6\r
7**/\r
8\r
9#include <Base.h>\r
10\r
11#include <Library/ResetSystemLib.h>\r
12#include <Library/DebugLib.h>\r
13\r
14/**\r
15 This function causes a system-wide reset (cold reset), in which\r
d1102dba 16 all circuitry within the system returns to its initial state. This type of reset\r
064d5de3 17 is asynchronous to system operation and operates without regard to\r
18 cycle boundaries.\r
19\r
d1102dba 20 If this function returns, it means that the system does not support cold reset.\r
064d5de3 21**/\r
22VOID\r
23EFIAPI\r
24ResetCold (\r
25 VOID\r
26 )\r
27{\r
28 ASSERT (FALSE);\r
29}\r
30\r
31/**\r
d1102dba 32 This function causes a system-wide initialization (warm reset), in which all processors\r
064d5de3 33 are set to their initial state. Pending cycles are not corrupted.\r
34\r
35 If this function returns, it means that the system does not support warm reset.\r
36**/\r
37VOID\r
38EFIAPI\r
39ResetWarm (\r
40 VOID\r
41 )\r
42{\r
43 ASSERT (FALSE);\r
44}\r
45\r
46/**\r
d1102dba 47 This function causes the system to enter a power state equivalent\r
064d5de3 48 to the ACPI G2/S5 or G3 states.\r
49\r
50 If this function returns, it means that the system does not support shut down reset.\r
51**/\r
52VOID\r
53EFIAPI\r
54ResetShutdown (\r
55 VOID\r
56 )\r
57{\r
58 ASSERT (FALSE);\r
59}\r
60\r
61/**\r
62 This function causes the system to enter S3 and then wake up immediately.\r
63\r
64 If this function returns, it means that the system does not support S3 feature.\r
65**/\r
66VOID\r
67EFIAPI\r
68EnterS3WithImmediateWake (\r
69 VOID\r
70 )\r
71{\r
72 ASSERT (FALSE);\r
73}\r
eeef069d
RN
74\r
75/**\r
76 This function causes a systemwide reset. The exact type of the reset is\r
77 defined by the EFI_GUID that follows the Null-terminated Unicode string passed\r
78 into ResetData. If the platform does not recognize the EFI_GUID in ResetData\r
79 the platform must pick a supported reset type to perform.The platform may\r
80 optionally log the parameters from any non-normal reset that occurs.\r
81\r
82 @param[in] DataSize The size, in bytes, of ResetData.\r
83 @param[in] ResetData The data buffer starts with a Null-terminated string,\r
84 followed by the EFI_GUID.\r
85**/\r
86VOID\r
87EFIAPI\r
88ResetPlatformSpecific (\r
89 IN UINTN DataSize,\r
90 IN VOID *ResetData\r
91 )\r
92{\r
93 ResetCold ();\r
94}\r
2bf671f1
ZG
95\r
96/**\r
97 The ResetSystem function resets the entire platform.\r
98\r
99 @param[in] ResetType The type of reset to perform.\r
100 @param[in] ResetStatus The status code for the reset.\r
101 @param[in] DataSize The size, in bytes, of ResetData.\r
102 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r
103 the data buffer starts with a Null-terminated string, optionally\r
104 followed by additional binary data. The string is a description\r
105 that the caller may use to further indicate the reason for the\r
106 system reset. ResetData is only valid if ResetStatus is something\r
107 other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific\r
108 where a minimum amount of ResetData is always required.\r
109**/\r
110VOID\r
111EFIAPI\r
112ResetSystem (\r
113 IN EFI_RESET_TYPE ResetType,\r
114 IN EFI_STATUS ResetStatus,\r
115 IN UINTN DataSize,\r
116 IN VOID *ResetData OPTIONAL\r
117 )\r
118{\r
119 ASSERT (FALSE);\r
120}\r
121\r