VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c@ 81344

Last change on this file since 81344 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette