]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugMp.h
This revision can only work with Intel(c) UDK Debugger Tool version 1.3 or greater...
[mirror_edk2.git] / SourceLevelDebugPkg / Library / DebugAgent / DebugAgentCommon / DebugMp.h
index 183887cc9f212144d4cc2f174c29ccecd9ef0182..5bb50960ca72b57763e68d42d553de59d3b1a829 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for Multi-Processor support.\r
 \r
-  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, 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
@@ -25,6 +25,7 @@ typedef struct {
 typedef struct {\r
   SPIN_LOCK                 MpContextSpinLock;   ///< Lock for writting MP context\r
   SPIN_LOCK                 DebugPortSpinLock;   ///< Lock for access debug port\r
+  SPIN_LOCK                 MailboxSpinLock;     ///< Lock for accessing mail box\r
   UINT8                     CpuBreakMask[DEBUG_CPU_MAX_COUNT/8];        ///< Bitmask of all breaking CPUs\r
   UINT8                     CpuStopStatusMask[DEBUG_CPU_MAX_COUNT/8];   ///< Bitmask of CPU stop status\r
   UINT32                    ViewPointIndex;      ///< Current view point to be debugged\r
@@ -35,7 +36,6 @@ typedef struct {
   BOOLEAN                   RunCommandSet;       ///< TRUE: RUN commmand is executing. FALSE : RUN command has been executed.\r
 } DEBUG_MP_CONTEXT;\r
 \r
-extern CONST BOOLEAN               MultiProcessorDebugSupport;\r
 extern DEBUG_MP_CONTEXT volatile   mDebugMpContext;\r
 extern DEBUG_CPU_DATA   volatile   mDebugCpuData;\r
 \r
@@ -62,43 +62,28 @@ GetProcessorIndex (
   );\r
 \r
 /**\r
-  Acquire access control on MP context.\r
+  Acquire a spin lock when Multi-processor supported.\r
 \r
   It will block in the function if cannot get the access control.\r
+  If Multi-processor is not supported, return directly.\r
 \r
-**/\r
-VOID\r
-AcquireMpContextControl (\r
-  VOID\r
-  );\r
-\r
-/**\r
-  Release access control on MP context.\r
+  @param[in, out] MpSpinLock      A pointer to the spin lock.\r
 \r
 **/\r
 VOID\r
-ReleaseMpContextControl (\r
-  VOID\r
+AcquireMpSpinLock (\r
+  IN OUT SPIN_LOCK           *MpSpinLock\r
   );\r
 \r
 /**\r
-  Acquire access control on debug port.\r
-\r
-  It will block in the function if cannot get the access control.\r
-\r
-**/\r
-VOID\r
-AcquireDebugPortControl (\r
-  VOID\r
-  );\r
+  Release a spin lock when Multi-processor supported.\r
 \r
-/**\r
-  Release access control on debug port.\r
+  @param[in, out] MpSpinLock      A pointer to the spin lock.\r
 \r
 **/\r
 VOID\r
-ReleaseDebugPortControl (\r
-  VOID\r
+ReleaseMpSpinLock (\r
+  IN OUT SPIN_LOCK           *MpSpinLock\r
   );\r
 \r
 /**\r