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