2 Reset System Library functions for PCAT platforms
4 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Uefi/UefiBaseType.h>
12 #include <Uefi/UefiMultiPhase.h>
14 #include <Library/DebugLib.h>
15 #include <Library/IoLib.h>
18 Calling this function causes a system-wide reset. This sets
19 all circuitry within the system to its initial state. This type of reset
20 is asynchronous to system operation and operates without regard to
23 System reset should not return, if it returns, it means the system does
24 not support cold reset.
32 IoWrite8 ((UINTN
) PcdGet64 (PcdResetControlRegister
), PcdGet8 (PcdResetControlValueColdReset
));
36 Calling this function causes a system-wide initialization. The processors
37 are set to their initial state, and pending cycles are not corrupted.
39 System reset should not return, if it returns, it means the system does
40 not support warm reset.
48 IoWrite8 ((UINTN
) PcdGet64 (PcdResetControlRegister
), PcdGet8 (PcdResetControlValueColdReset
));
52 Calling this function causes the system to enter a power state equivalent
53 to the ACPI G2/S5 or G3 states.
55 System shutdown should not return, if it returns, it means the system does
56 not support shut down reset.
69 This function causes a systemwide reset. The exact type of the reset is
70 defined by the EFI_GUID that follows the Null-terminated Unicode string passed
71 into ResetData. If the platform does not recognize the EFI_GUID in ResetData
72 the platform must pick a supported reset type to perform.The platform may
73 optionally log the parameters from any non-normal reset that occurs.
75 @param[in] DataSize The size, in bytes, of ResetData.
76 @param[in] ResetData The data buffer starts with a Null-terminated string,
77 followed by the EFI_GUID.
81 ResetPlatformSpecific (
90 The ResetSystem function resets the entire platform.
92 @param[in] ResetType The type of reset to perform.
93 @param[in] ResetStatus The status code for the reset.
94 @param[in] DataSize The size, in bytes, of ResetData.
95 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
96 the data buffer starts with a Null-terminated string, optionally
97 followed by additional binary data. The string is a description
98 that the caller may use to further indicate the reason for the
104 IN EFI_RESET_TYPE ResetType
,
105 IN EFI_STATUS ResetStatus
,
107 IN VOID
*ResetData OPTIONAL
119 case EfiResetShutdown
:
123 case EfiResetPlatformSpecific
:
124 ResetPlatformSpecific (DataSize
, ResetData
);