]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/ResetSystemLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[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 a systemwide reset. The exact type of the reset is
56 defined by the EFI_GUID that follows the Null-terminated Unicode string passed
57 into ResetData. If the platform does not recognize the EFI_GUID in ResetData
58 the platform must pick a supported reset type to perform.The platform may
59 optionally log the parameters from any non-normal reset that occurs.
60
61 @param[in] DataSize The size, in bytes, of ResetData.
62 @param[in] ResetData The data buffer starts with a Null-terminated string,
63 followed by the EFI_GUID.
64 **/
65 VOID
66 EFIAPI
67 ResetPlatformSpecific (
68 IN UINTN DataSize,
69 IN VOID *ResetData
70 );
71
72 /**
73 The ResetSystem function resets the entire platform.
74
75 @param[in] ResetType The type of reset to perform.
76 @param[in] ResetStatus The status code for the reset.
77 @param[in] DataSize The size, in bytes, of ResetData.
78 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
79 the data buffer starts with a Null-terminated string, optionally
80 followed by additional binary data. The string is a description
81 that the caller may use to further indicate the reason for the
82 system reset.
83 **/
84 VOID
85 EFIAPI
86 ResetSystem (
87 IN EFI_RESET_TYPE ResetType,
88 IN EFI_STATUS ResetStatus,
89 IN UINTN DataSize,
90 IN VOID *ResetData OPTIONAL
91 );
92
93 #endif