]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
SourceLevelDebugPkg DebugAgentLib: Rename IsBsp to DebugAgentIsBsp
[mirror_edk2.git] / SourceLevelDebugPkg / Library / DebugAgent / DebugAgentCommon / DebugAgent.c
index 6f3c41933d92e30041c38fe6f499d6ba9ad78865..0a021307dcdc36e651e85d8e6db350220e04f619 100644 (file)
@@ -4,7 +4,7 @@
   read/write debug packet to communication with HOST based on transfer\r
   protocol.\r
 \r
-  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, 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
@@ -206,7 +206,7 @@ FindAndReportModuleImageInfo (
   //\r
   // Find Image Base\r
   //\r
-  Pe32Data = PeCoffSerachImageBase ((UINTN) mErrorMsgVersionAlert);\r
+  Pe32Data = PeCoffSearchImageBase ((UINTN) mErrorMsgVersionAlert);\r
   if (Pe32Data != 0) {\r
     ImageContext.ImageAddress = Pe32Data;\r
     ImageContext.PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) ImageContext.ImageAddress);\r
@@ -1564,7 +1564,7 @@ ReadMemoryAndSendResponsePacket (
     // Compression/decompression support was added since revision 0.4.\r
     // Revision 0.3 shouldn't compress the packet.\r
     //\r
-    if (DEBUG_AGENT_REVISION >= DEBUG_AGENT_REVISION_04) {\r
+    if (PcdGet32(PcdTransferProtocolRevision) >= DEBUG_AGENT_REVISION_04) {\r
       //\r
       // Get the compressed data size without modifying the packet.\r
       //\r
@@ -1711,7 +1711,7 @@ AttachHost (
   }\r
   if (IncompatibilityFlag) {\r
     //\r
-    // If the incompatible Debug Packet received, the HOST should be running transfer protocol before DEBUG_AGENT_REVISION.\r
+    // If the incompatible Debug Packet received, the HOST should be running transfer protocol before PcdTransferProtocolRevision.\r
     // It could be UDK Debugger for Windows v1.1/v1.2 or for Linux v0.8/v1.2.\r
     //\r
     DebugPortWriteBuffer (Handle, (UINT8 *) mErrorMsgVersionAlert, AsciiStrLen (mErrorMsgVersionAlert));\r
@@ -2192,7 +2192,7 @@ CommandCommunication (
       break;\r
 \r
     case DEBUG_COMMAND_GET_REVISION:\r
-      DebugAgentRevision.Revision = DEBUG_AGENT_REVISION;\r
+      DebugAgentRevision.Revision = PcdGet32(PcdTransferProtocolRevision);\r
       DebugAgentRevision.Capabilities = DEBUG_AGENT_CAPABILITIES;\r
       Status = SendDataResponsePacket ((UINT8 *) &DebugAgentRevision, (UINT16) sizeof (DEBUG_DATA_RESPONSE_GET_REVISION), DebugHeader);\r
       break;\r
@@ -2485,7 +2485,7 @@ InterruptProcess (
     AcquireMpSpinLock (&mDebugMpContext.DebugPortSpinLock);\r
 \r
     if (MultiProcessorDebugSupport()) {\r
-      if (IsBsp (ProcessorIndex)) {\r
+      if (DebugAgentIsBsp (ProcessorIndex)) {\r
         //\r
         // If current processor is BSP, check Apic timer's init count if changed,\r
         // it may be re-written when switching BSP.\r
@@ -2498,7 +2498,7 @@ InterruptProcess (
         }\r
       }\r
 \r
-      if (!IsBsp (ProcessorIndex) || mDebugMpContext.IpiSentByAp) {\r
+      if (!DebugAgentIsBsp (ProcessorIndex) || mDebugMpContext.IpiSentByAp) {\r
         ReleaseMpSpinLock (&mDebugMpContext.DebugPortSpinLock);\r
         //\r
         // If current processor is not BSP or this is one IPI sent by AP\r