diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-04-17 17:37:50 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-04-22 19:42:32 +0000 |
commit | d70cdcf0b5fa1f41e236d4303ecb994af57c0409 (patch) | |
tree | 3d413ec4ca533807c0f44334ad4651ae6d4dea0e /OvmfPkg/Library/ResetSystemLib/ResetShutdown.c | |
parent | b6d542e927a3fa0ff4fd7278917f25b0494c07ba (diff) | |
download | edk2-d70cdcf0b5fa1f41e236d4303ecb994af57c0409.tar.gz edk2-d70cdcf0b5fa1f41e236d4303ecb994af57c0409.tar.bz2 edk2-d70cdcf0b5fa1f41e236d4303ecb994af57c0409.zip |
OvmfPkg/ResetSystemLib: rename to BaseResetSystemLib
In preparation for introducing DxeResetSystemLib, rename the current
(only) ResetSystemLib instance to BaseResetSystemLib.
In the DSC files, keep the ResetSystemLib resolution in the same
[LibraryClasses] section, but move it near the TimerLib resolution, as the
differences between the ResetSystemLib instances will mostly follow those
seen under OvmfPkg/Library/AcpiTimerLib.
(While OvmfXen does not use "OvmfPkg/Library/AcpiTimerLib", perform the
same movement there too, for keeping future DSC diffing simple.)
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien@xen.org>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2675
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200417153751.7110-6-lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Diffstat (limited to 'OvmfPkg/Library/ResetSystemLib/ResetShutdown.c')
-rw-r--r-- | OvmfPkg/Library/ResetSystemLib/ResetShutdown.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/OvmfPkg/Library/ResetSystemLib/ResetShutdown.c b/OvmfPkg/Library/ResetSystemLib/ResetShutdown.c deleted file mode 100644 index 971d94fa57..0000000000 --- a/OvmfPkg/Library/ResetSystemLib/ResetShutdown.c +++ /dev/null @@ -1,51 +0,0 @@ -/** @file
- Reset System Library Shutdown API implementation for OVMF.
-
- Copyright (C) 2020, Red Hat, Inc.
- Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#include <Base.h> // BIT13
-
-#include <Library/BaseLib.h> // CpuDeadLoop()
-#include <Library/DebugLib.h> // ASSERT()
-#include <Library/IoLib.h> // IoOr16()
-#include <Library/PciLib.h> // PciRead16()
-#include <Library/ResetSystemLib.h> // ResetShutdown()
-#include <OvmfPlatforms.h> // OVMF_HOSTBRIDGE_DID
-
-/**
- Calling this function causes the system to enter a power state equivalent
- to the ACPI G2/S5 or G3 states.
-
- System shutdown should not return, if it returns, it means the system does
- not support shut down reset.
-**/
-VOID
-EFIAPI
-ResetShutdown (
- VOID
- )
-{
- UINT16 AcpiPmBaseAddress;
- UINT16 HostBridgeDevId;
-
- AcpiPmBaseAddress = 0;
- HostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID);
- switch (HostBridgeDevId) {
- case INTEL_82441_DEVICE_ID:
- AcpiPmBaseAddress = PIIX4_PMBA_VALUE;
- break;
- case INTEL_Q35_MCH_DEVICE_ID:
- AcpiPmBaseAddress = ICH9_PMBASE_VALUE;
- break;
- default:
- ASSERT (FALSE);
- CpuDeadLoop ();
- }
-
- IoBitFieldWrite16 (AcpiPmBaseAddress + 4, 10, 13, 0);
- IoOr16 (AcpiPmBaseAddress + 4, BIT13);
- CpuDeadLoop ();
-}
|