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