Generic solution to handle reset failure in some special platforms.

Upon receiving RESET packet from HOST side, TARGET either sends OK packet and resets, or sends OK packet followed by TIMEOUT packet in 2 seconds indicating the reset failure.

Signed-off-by: niruiyu
Reviewed-by: vanjeff

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12984 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu
2012-02-07 01:58:30 +00:00
parent 3e570e6e52
commit b4ebbafff6
6 changed files with 15 additions and 8 deletions

View File

@ -4,7 +4,7 @@
read/write debug packet to communication with HOST based on transfer
protocol.
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -637,9 +637,11 @@ CommandCommunication (
ResetCold ();
//
// Wait for reset
// Assume system resets in 2 seconds, otherwise send TIMEOUT packet.
// PCD can be used if 2 seconds isn't long enough for some platforms.
//
CpuDeadLoop ();
MicroSecondDelay (2000000);
SendAckPacket (DEBUG_COMMAND_TIMEOUT);
break;
case DEBUG_COMMAND_GO: