]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/ResetSystemLib: factor out ResetShutdown()
authorLaszlo Ersek <lersek@redhat.com>
Fri, 17 Apr 2020 15:37:49 +0000 (17:37 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 22 Apr 2020 19:42:32 +0000 (19:42 +0000)
commitb6d542e927a3fa0ff4fd7278917f25b0494c07ba
tree3ca51f9c64993194f664e13d5b3a2e58604b4beb
parent92958abf7a0c87c6be3854bc1a5df2dfa35b876c
OvmfPkg/ResetSystemLib: factor out ResetShutdown()

Move the ResetShutdown() definition to its own file. This will help us
introduce:

- a new library instance that is not broken in runtime modules (the
  current library instance is broken in runtime modules),

- another new library instance for bhyve support.

While at it, squash AcpiPmControl() into ResetShutdown(), open-coding
SuspendType=0. This is justified because we've had no other callers for
AcpiPmControl() since commit 2d9950a2bff8 ("OvmfPkg: remove
EnterS3WithImmediateWake () from ResetSystemLib", 2020-01-10).

Tested with the "reset -s" UEFI shell command, on both i440fx and q35.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
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-5-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>
OvmfPkg/Library/ResetSystemLib/ResetShutdown.c [new file with mode: 0644]
OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf