]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[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
1cff74bb 4 Copyright (c) 2006 - 2019, 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
eeef069d
RN
61/**\r
62 This function causes a systemwide reset. The exact type of the reset is\r
63 defined by the EFI_GUID that follows the Null-terminated Unicode string passed\r
64 into ResetData. If the platform does not recognize the EFI_GUID in ResetData\r
65 the platform must pick a supported reset type to perform.The platform may\r
66 optionally log the parameters from any non-normal reset that occurs.\r
67\r
68 @param[in] DataSize The size, in bytes, of ResetData.\r
69 @param[in] ResetData The data buffer starts with a Null-terminated string,\r
70 followed by the EFI_GUID.\r
71**/\r
72VOID\r
73EFIAPI\r
74ResetPlatformSpecific (\r
1436aea4
MK
75 IN UINTN DataSize,\r
76 IN VOID *ResetData\r
eeef069d
RN
77 )\r
78{\r
79 ResetCold ();\r
80}\r
2bf671f1
ZG
81\r
82/**\r
83 The ResetSystem function resets the entire platform.\r
84\r
85 @param[in] ResetType The type of reset to perform.\r
86 @param[in] ResetStatus The status code for the reset.\r
87 @param[in] DataSize The size, in bytes, of ResetData.\r
88 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r
89 the data buffer starts with a Null-terminated string, optionally\r
90 followed by additional binary data. The string is a description\r
91 that the caller may use to further indicate the reason for the\r
1cff74bb 92 system reset.\r
2bf671f1
ZG
93**/\r
94VOID\r
95EFIAPI\r
96ResetSystem (\r
1436aea4
MK
97 IN EFI_RESET_TYPE ResetType,\r
98 IN EFI_STATUS ResetStatus,\r
99 IN UINTN DataSize,\r
100 IN VOID *ResetData OPTIONAL\r
2bf671f1
ZG
101 )\r
102{\r
103 ASSERT (FALSE);\r
104}\r