mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
OvmfPkg: make sure ResetCold() and ResetWarm() never return
Also, add a small delay after the 0xCF9 hard reset request -- on qemu/kvm the port access is translated to the qemu-internal system reset request by the CPU thread, and it might progress some more before the IO thread acts upon the system reset request. MicroSecondDelay() is implemented by OvmfPkg's own AcpiTimerLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14158 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
cb7b12ee3c
commit
fb2ae5fdb5
@ -17,6 +17,7 @@
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/IoLib.h>
|
||||
#include <Library/TimerLib.h>
|
||||
|
||||
VOID
|
||||
AcpiPmControl (
|
||||
@ -46,7 +47,10 @@ ResetCold (
|
||||
)
|
||||
{
|
||||
IoWrite8 (0xCF9, BIT2 | BIT1); // 1st choice: PIIX3 RCR, RCPU|SRST
|
||||
MicroSecondDelay (50);
|
||||
|
||||
IoWrite8 (0x64, 0xfe); // 2nd choice: keyboard controller
|
||||
CpuDeadLoop ();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -63,6 +67,7 @@ ResetWarm (
|
||||
)
|
||||
{
|
||||
IoWrite8 (0x64, 0xfe);
|
||||
CpuDeadLoop ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,4 +35,4 @@
|
||||
[LibraryClasses]
|
||||
DebugLib
|
||||
IoLib
|
||||
|
||||
TimerLib
|
||||
|
Loading…
x
Reference in New Issue
Block a user