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