VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c@ 95057

最後變更 在這個檔案從95057是 85718,由 vboxsync 提交於 5 年 前

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 3.0 KB
 
1/** @file
2 PEI Reset System Library instance that calls the ResetSystem2() PEI Service.
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 <PiPei.h>
10#include <Library/ResetSystemLib.h>
11#include <Library/PeiServicesLib.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 PeiServicesResetSystem2 (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 PeiServicesResetSystem2 (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 PeiServicesResetSystem2 (EfiResetShutdown, EFI_SUCCESS, 0, NULL);
58}
59
60/**
61 This function causes a systemwide reset. The exact type of the reset is
62 defined by the EFI_GUID that follows the Null-terminated Unicode string passed
63 into ResetData. If the platform does not recognize the EFI_GUID in ResetData
64 the platform must pick a supported reset type to perform.The platform may
65 optionally log the parameters from any non-normal reset that occurs.
66
67 @param[in] DataSize The size, in bytes, of ResetData.
68 @param[in] ResetData The data buffer starts with a Null-terminated string,
69 followed by the EFI_GUID.
70**/
71VOID
72EFIAPI
73ResetPlatformSpecific (
74 IN UINTN DataSize,
75 IN VOID *ResetData
76 )
77{
78 PeiServicesResetSystem2 (EfiResetPlatformSpecific, EFI_SUCCESS, DataSize, ResetData);
79}
80
81/**
82 The ResetSystem function resets the entire platform.
83
84 @param[in] ResetType The type of reset to perform.
85 @param[in] ResetStatus The status code for the reset.
86 @param[in] DataSize The size, in bytes, of ResetData.
87 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
88 the data buffer starts with a Null-terminated string, optionally
89 followed by additional binary data. The string is a description
90 that the caller may use to further indicate the reason for the
91 system reset.
92**/
93VOID
94EFIAPI
95ResetSystem (
96 IN EFI_RESET_TYPE ResetType,
97 IN EFI_STATUS ResetStatus,
98 IN UINTN DataSize,
99 IN VOID *ResetData OPTIONAL
100 )
101{
102 PeiServicesResetSystem2 (ResetType, ResetStatus, DataSize, ResetData);
103}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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