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 the system to enter S3 and then wake up immediately.
|
---|
63 |
|
---|
64 | If this function returns, it means that the system does not support S3 feature.
|
---|
65 | **/
|
---|
66 | VOID
|
---|
67 | EFIAPI
|
---|
68 | EnterS3WithImmediateWake (
|
---|
69 | VOID
|
---|
70 | )
|
---|
71 | {
|
---|
72 | ASSERT (FALSE);
|
---|
73 | }
|
---|
74 |
|
---|
75 | /**
|
---|
76 | This function causes a systemwide reset. The exact type of the reset is
|
---|
77 | defined by the EFI_GUID that follows the Null-terminated Unicode string passed
|
---|
78 | into ResetData. If the platform does not recognize the EFI_GUID in ResetData
|
---|
79 | the platform must pick a supported reset type to perform.The platform may
|
---|
80 | optionally log the parameters from any non-normal reset that occurs.
|
---|
81 |
|
---|
82 | @param[in] DataSize The size, in bytes, of ResetData.
|
---|
83 | @param[in] ResetData The data buffer starts with a Null-terminated string,
|
---|
84 | followed by the EFI_GUID.
|
---|
85 | **/
|
---|
86 | VOID
|
---|
87 | EFIAPI
|
---|
88 | ResetPlatformSpecific (
|
---|
89 | IN UINTN DataSize,
|
---|
90 | IN VOID *ResetData
|
---|
91 | )
|
---|
92 | {
|
---|
93 | ResetCold ();
|
---|
94 | }
|
---|
95 |
|
---|
96 | /**
|
---|
97 | The ResetSystem function resets the entire platform.
|
---|
98 |
|
---|
99 | @param[in] ResetType The type of reset to perform.
|
---|
100 | @param[in] ResetStatus The status code for the reset.
|
---|
101 | @param[in] DataSize The size, in bytes, of ResetData.
|
---|
102 | @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
|
---|
103 | the data buffer starts with a Null-terminated string, optionally
|
---|
104 | followed by additional binary data. The string is a description
|
---|
105 | that the caller may use to further indicate the reason for the
|
---|
106 | system reset.
|
---|
107 | **/
|
---|
108 | VOID
|
---|
109 | EFIAPI
|
---|
110 | ResetSystem (
|
---|
111 | IN EFI_RESET_TYPE ResetType,
|
---|
112 | IN EFI_STATUS ResetStatus,
|
---|
113 | IN UINTN DataSize,
|
---|
114 | IN VOID *ResetData OPTIONAL
|
---|
115 | )
|
---|
116 | {
|
---|
117 | ASSERT (FALSE);
|
---|
118 | }
|
---|
119 |
|
---|