1 | /** @file
|
---|
2 | Null Reset System Library instance that only generates ASSERT() conditions.
|
---|
3 |
|
---|
4 | Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
---|
5 | This program and the accompanying materials
|
---|
6 | are licensed and made available under the terms and conditions of the BSD License
|
---|
7 | which accompanies this distribution. The full text of the license may be found at
|
---|
8 | http://opensource.org/licenses/bsd-license.php
|
---|
9 |
|
---|
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
---|
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
---|
12 |
|
---|
13 | **/
|
---|
14 |
|
---|
15 | #include <Base.h>
|
---|
16 |
|
---|
17 | #include <Library/ResetSystemLib.h>
|
---|
18 | #include <Library/DebugLib.h>
|
---|
19 |
|
---|
20 | /**
|
---|
21 | This function causes a system-wide reset (cold reset), in which
|
---|
22 | all circuitry within the system returns to its initial state. This type of reset
|
---|
23 | is asynchronous to system operation and operates without regard to
|
---|
24 | cycle boundaries.
|
---|
25 |
|
---|
26 | If this function returns, it means that the system does not support cold reset.
|
---|
27 | **/
|
---|
28 | VOID
|
---|
29 | EFIAPI
|
---|
30 | ResetCold (
|
---|
31 | VOID
|
---|
32 | )
|
---|
33 | {
|
---|
34 | ASSERT (FALSE);
|
---|
35 | }
|
---|
36 |
|
---|
37 | /**
|
---|
38 | This function causes a system-wide initialization (warm reset), in which all processors
|
---|
39 | are set to their initial state. Pending cycles are not corrupted.
|
---|
40 |
|
---|
41 | If this function returns, it means that the system does not support warm reset.
|
---|
42 | **/
|
---|
43 | VOID
|
---|
44 | EFIAPI
|
---|
45 | ResetWarm (
|
---|
46 | VOID
|
---|
47 | )
|
---|
48 | {
|
---|
49 | ASSERT (FALSE);
|
---|
50 | }
|
---|
51 |
|
---|
52 | /**
|
---|
53 | This function causes the system to enter a power state equivalent
|
---|
54 | to the ACPI G2/S5 or G3 states.
|
---|
55 |
|
---|
56 | If this function returns, it means that the system does not support shut down reset.
|
---|
57 | **/
|
---|
58 | VOID
|
---|
59 | EFIAPI
|
---|
60 | ResetShutdown (
|
---|
61 | VOID
|
---|
62 | )
|
---|
63 | {
|
---|
64 | ASSERT (FALSE);
|
---|
65 | }
|
---|
66 |
|
---|
67 | /**
|
---|
68 | This function causes the system to enter S3 and then wake up immediately.
|
---|
69 |
|
---|
70 | If this function returns, it means that the system does not support S3 feature.
|
---|
71 | **/
|
---|
72 | VOID
|
---|
73 | EFIAPI
|
---|
74 | EnterS3WithImmediateWake (
|
---|
75 | VOID
|
---|
76 | )
|
---|
77 | {
|
---|
78 | ASSERT (FALSE);
|
---|
79 | }
|
---|
80 |
|
---|
81 | /**
|
---|
82 | This function causes a systemwide reset. The exact type of the reset is
|
---|
83 | defined by the EFI_GUID that follows the Null-terminated Unicode string passed
|
---|
84 | into ResetData. If the platform does not recognize the EFI_GUID in ResetData
|
---|
85 | the platform must pick a supported reset type to perform.The platform may
|
---|
86 | optionally log the parameters from any non-normal reset that occurs.
|
---|
87 |
|
---|
88 | @param[in] DataSize The size, in bytes, of ResetData.
|
---|
89 | @param[in] ResetData The data buffer starts with a Null-terminated string,
|
---|
90 | followed by the EFI_GUID.
|
---|
91 | **/
|
---|
92 | VOID
|
---|
93 | EFIAPI
|
---|
94 | ResetPlatformSpecific (
|
---|
95 | IN UINTN DataSize,
|
---|
96 | IN VOID *ResetData
|
---|
97 | )
|
---|
98 | {
|
---|
99 | ResetCold ();
|
---|
100 | }
|
---|