Last change
on this file was 85718, checked in by vboxsync, 5 years ago |
Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643
|
-
Property svn:eol-style
set to
native
|
File size:
917 bytes
|
Line | |
---|
1 | /** @file
|
---|
2 | Base Reset System Library Shutdown API implementation for bhyve.
|
---|
3 |
|
---|
4 | Copyright (C) 2020, Rebecca Cran <[email protected]>
|
---|
5 | Copyright (C) 2020, Red Hat, Inc.
|
---|
6 | Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
|
---|
7 |
|
---|
8 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
9 | **/
|
---|
10 |
|
---|
11 | #include <Base.h> // BIT13
|
---|
12 |
|
---|
13 | #include <IndustryStandard/Bhyve.h> // BHYVE_PM_REG
|
---|
14 | #include <Library/BaseLib.h> // CpuDeadLoop()
|
---|
15 | #include <Library/IoLib.h> // IoOr16()
|
---|
16 | #include <Library/ResetSystemLib.h> // ResetShutdown()
|
---|
17 |
|
---|
18 | /**
|
---|
19 | Calling this function causes the system to enter a power state equivalent
|
---|
20 | to the ACPI G2/S5 or G3 states.
|
---|
21 |
|
---|
22 | System shutdown should not return, if it returns, it means the system does
|
---|
23 | not support shut down reset.
|
---|
24 | **/
|
---|
25 | VOID
|
---|
26 | EFIAPI
|
---|
27 | ResetShutdown (
|
---|
28 | VOID
|
---|
29 | )
|
---|
30 | {
|
---|
31 | IoBitFieldWrite16 (BHYVE_PM_REG, 10, 13, 5);
|
---|
32 | IoOr16 (BHYVE_PM_REG, BIT13);
|
---|
33 | CpuDeadLoop ();
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.