]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
Generic solution to handle reset failure in some special platforms.
[mirror_edk2.git] / SourceLevelDebugPkg / Library / DebugAgent / DebugAgentCommon / DebugAgent.c
index 7834f885cc12badec2c3d3a3b00fbcec57429abd..369d47b3f1216c7f037575d249fa929ab10bdd96 100644 (file)
@@ -4,7 +4,7 @@
   read/write debug packet to communication with HOST based on transfer\r
   protocol.\r
 \r
-  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -637,9 +637,11 @@ CommandCommunication (
 \r
       ResetCold ();\r
       //\r
-      // Wait for reset\r
+      // Assume system resets in 2 seconds, otherwise send TIMEOUT packet.\r
+      // PCD can be used if 2 seconds isn't long enough for some platforms.\r
       //\r
-      CpuDeadLoop ();\r
+      MicroSecondDelay (2000000);\r
+      SendAckPacket (DEBUG_COMMAND_TIMEOUT);\r
       break;\r
 \r
     case DEBUG_COMMAND_GO:\r