VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c@ 48674

最後變更 在這個檔案從48674是 48674,由 vboxsync 提交於 12 年 前

EFI: Export newly imported tinaocore UEFI sources to OSE.

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.1 KB
 
1/** @file
2 Reset System Library functions for OVMF
3
4 Copyright (c) 2006 - 2011, 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/BaseLib.h>
18#include <Library/DebugLib.h>
19#include <Library/IoLib.h>
20
21VOID
22AcpiPmControl (
23 UINTN SuspendType
24 )
25{
26 ASSERT (SuspendType < 6);
27
28 IoAndThenOr16 (0x404, (UINT16) ~0x3c00, (UINT16) (SuspendType << 10));
29 IoOr16 (0x404, BIT13);
30 CpuDeadLoop ();
31}
32
33/**
34 Calling this function causes a system-wide reset. This sets
35 all circuitry within the system to its initial state. This type of reset
36 is asynchronous to system operation and operates without regard to
37 cycle boundaries.
38
39 System reset should not return, if it returns, it means the system does
40 not support cold reset.
41**/
42VOID
43EFIAPI
44ResetCold (
45 VOID
46 )
47{
48 IoWrite8 (0x64, 0xfe);
49}
50
51/**
52 Calling this function causes a system-wide initialization. The processors
53 are set to their initial state, and pending cycles are not corrupted.
54
55 System reset should not return, if it returns, it means the system does
56 not support warm reset.
57**/
58VOID
59EFIAPI
60ResetWarm (
61 VOID
62 )
63{
64 IoWrite8 (0x64, 0xfe);
65}
66
67/**
68 Calling this function causes the system to enter a power state equivalent
69 to the ACPI G2/S5 or G3 states.
70
71 System shutdown should not return, if it returns, it means the system does
72 not support shut down reset.
73**/
74VOID
75EFIAPI
76ResetShutdown (
77 VOID
78 )
79{
80 AcpiPmControl (0);
81 ASSERT (FALSE);
82}
83
84
85/**
86 Calling this function causes the system to enter a power state for capsule
87 update.
88
89 Reset update should not return, if it returns, it means the system does
90 not support capsule update.
91
92**/
93VOID
94EFIAPI
95EnterS3WithImmediateWake (
96 VOID
97 )
98{
99 AcpiPmControl (1);
100 ASSERT (FALSE);
101}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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