11GLOBAL_REMOVE_IF_UNREFERENCED DEBUG_MP_CONTEXT volatile mDebugMpContext = { 0, 0, 0, { 0 }, { 0 }, 0, 0, 0, 0,
FALSE,
FALSE };
69 IN UINT32 CurrentProcessorIndex
72 DebugAgentMsgPrint (DEBUG_AGENT_INFO,
"processor[%x]:Try to halt other processors.\n", CurrentProcessorIndex);
108 for (Index = 0; Index < mDebugCpuData.
CpuCount; Index++) {
109 if (mDebugCpuData.
ApicID[Index] == LocalApicID) {
114 if (Index == mDebugCpuData.
CpuCount) {
115 mDebugCpuData.
ApicID[Index] = LocalApicID;
135 IN UINT32 ProcessorIndex
150 if (MsrApicBase.
Bits.
BSP == 1) {
151 if (mDebugMpContext.
BspIndex != ProcessorIndex) {
153 mDebugMpContext.
BspIndex = ProcessorIndex;
173 IN UINT32 ProcessorIndex,
183 Index = ProcessorIndex % 8;
205 IN UINT32 ProcessorIndex,
214 Value = mDebugMpContext.
CpuBreakMask[ProcessorIndex / 8];
215 Index = ProcessorIndex % 8;
222 mDebugMpContext.
CpuBreakMask[ProcessorIndex / 8] = Value;
238 IN UINT32 ProcessorIndex
243 CpuMask = (UINT8)(1 << (ProcessorIndex % 8));
261 IN BOOLEAN RunningFlag
277 IN UINT32 ProcessorIndex
294 IN BOOLEAN IpiSentByApFlag
317 for (Index = 0; Index < DEBUG_CPU_MAX_COUNT / 8; Index++) {
340 for (Index = 0; Index < DEBUG_CPU_MAX_COUNT / 8; Index++) {
362 IN UINT32 ProcessorIndex
INTN EFIAPI LowBitSet32(IN UINT32 Operand)
VOID EFIAPI CpuPause(VOID)
UINT8 EFIAPI BitFieldWrite8(IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value)
VOID EFIAPI DebugAgentMsgPrint(IN UINT8 ErrorLevel, IN CHAR8 *Format,...)
BOOLEAN MultiProcessorDebugSupport(VOID)
VOID SetCpuStopFlagByIndex(IN UINT32 ProcessorIndex, IN BOOLEAN StopFlag)
VOID SetDebugViewPoint(IN UINT32 ProcessorIndex)
UINT32 FindNextPendingBreakCpu(VOID)
VOID HaltOtherProcessors(IN UINT32 CurrentProcessorIndex)
UINT32 GetProcessorIndex(VOID)
BOOLEAN IsFirstBreakProcessor(IN UINT32 ProcessorIndex)
BOOLEAN DebugAgentIsBsp(IN UINT32 ProcessorIndex)
VOID ReleaseMpSpinLock(IN OUT SPIN_LOCK *MpSpinLock)
VOID AcquireMpSpinLock(IN OUT SPIN_LOCK *MpSpinLock)
VOID SetCpuRunningFlag(IN BOOLEAN RunningFlag)
BOOLEAN IsAllCpuRunning(VOID)
VOID SetCpuBreakFlagByIndex(IN UINT32 ProcessorIndex, IN BOOLEAN BreakFlag)
BOOLEAN IsCpuStopped(IN UINT32 ProcessorIndex)
VOID SetIpiSentByApFlag(IN BOOLEAN IpiSentByApFlag)
UINT64 EFIAPI AsmReadMsr64(IN UINT32 Index)
VOID EFIAPI SendFixedIpiAllExcludingSelf(IN UINT8 Vector)
UINT32 EFIAPI GetApicId(VOID)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define MSR_IA32_APIC_BASE
SPIN_LOCK *EFIAPI ReleaseSpinLock(IN OUT SPIN_LOCK *SpinLock)
BOOLEAN EFIAPI AcquireSpinLockOrFail(IN OUT SPIN_LOCK *SpinLock)
UINT16 ApicID[DEBUG_CPU_MAX_COUNT]
Record the local apic id for each processor.
UINT32 CpuCount
Processor count.
UINT32 ViewPointIndex
Current view point to be debugged.
SPIN_LOCK MpContextSpinLock
Lock for writing MP context.
BOOLEAN IpiSentByAp
TRUE: IPI is sent by AP. FALSE: IPI is sent by BSP.
UINT8 CpuBreakMask[DEBUG_CPU_MAX_COUNT/8]
Bitmask of all breaking CPUs.
UINT32 BspIndex
Processor index value of BSP.
UINT8 CpuStopStatusMask[DEBUG_CPU_MAX_COUNT/8]
Bitmask of CPU stop status.
BOOLEAN RunCommandSet
TRUE: RUN command is executing. FALSE: RUN command has been executed.
UINT32 BreakAtCpuIndex
Processor index value of the current breaking CPU.
struct MSR_IA32_APIC_BASE_REGISTER::@627 Bits