2 PEI Reset System Library instance that calls the ResetSystem2() PEI Service.
4 Copyright (c) 2017 - 2019, 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
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.
16 #include <Library/ResetSystemLib.h>
17 #include <Library/PeiServicesLib.h>
20 This function causes a system-wide reset (cold reset), in which
21 all circuitry within the system returns to its initial state. This type of reset
22 is asynchronous to system operation and operates without regard to
25 If this function returns, it means that the system does not support cold reset.
33 PeiServicesResetSystem2 (EfiResetCold
, EFI_SUCCESS
, 0, NULL
);
37 This function causes a system-wide initialization (warm reset), in which all processors
38 are set to their initial state. Pending cycles are not corrupted.
40 If this function returns, it means that the system does not support warm reset.
48 PeiServicesResetSystem2 (EfiResetWarm
, EFI_SUCCESS
, 0, NULL
);
52 This function causes the system to enter a power state equivalent
53 to the ACPI G2/S5 or G3 states.
55 If this function returns, it means that the system does not support shut down reset.
63 PeiServicesResetSystem2 (EfiResetShutdown
, EFI_SUCCESS
, 0, NULL
);
67 This function causes the system to enter S3 and then wake up immediately.
69 If this function returns, it means that the system does not support S3 feature.
73 EnterS3WithImmediateWake (
80 This function causes a systemwide reset. The exact type of the reset is
81 defined by the EFI_GUID that follows the Null-terminated Unicode string passed
82 into ResetData. If the platform does not recognize the EFI_GUID in ResetData
83 the platform must pick a supported reset type to perform.The platform may
84 optionally log the parameters from any non-normal reset that occurs.
86 @param[in] DataSize The size, in bytes, of ResetData.
87 @param[in] ResetData The data buffer starts with a Null-terminated string,
88 followed by the EFI_GUID.
92 ResetPlatformSpecific (
97 PeiServicesResetSystem2 (EfiResetPlatformSpecific
, EFI_SUCCESS
, DataSize
, ResetData
);
101 The ResetSystem function resets the entire platform.
103 @param[in] ResetType The type of reset to perform.
104 @param[in] ResetStatus The status code for the reset.
105 @param[in] DataSize The size, in bytes, of ResetData.
106 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
107 the data buffer starts with a Null-terminated string, optionally
108 followed by additional binary data. The string is a description
109 that the caller may use to further indicate the reason for the
110 system reset. ResetData is only valid if ResetStatus is something
111 other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
112 where a minimum amount of ResetData is always required.
117 IN EFI_RESET_TYPE ResetType
,
118 IN EFI_STATUS ResetStatus
,
120 IN VOID
*ResetData OPTIONAL
123 PeiServicesResetSystem2 (ResetType
, ResetStatus
, DataSize
, ResetData
);