TianoCore EDK2 master
Loading...
Searching...
No Matches
DebugMp.h
Go to the documentation of this file.
1
9#ifndef _DEBUG_MP_H_
10#define _DEBUG_MP_H_
11
12#define DEBUG_CPU_MAX_COUNT 256
13
14typedef struct {
15 UINT32 CpuCount;
16 UINT16 ApicID[DEBUG_CPU_MAX_COUNT];
18
19typedef struct {
23 UINT8 CpuBreakMask[DEBUG_CPU_MAX_COUNT/8];
24 UINT8 CpuStopStatusMask[DEBUG_CPU_MAX_COUNT/8];
26 UINT32 BspIndex;
29 BOOLEAN IpiSentByAp;
30 BOOLEAN RunCommandSet;
32
33extern DEBUG_MP_CONTEXT volatile mDebugMpContext;
34extern DEBUG_CPU_DATA volatile mDebugCpuData;
35
42VOID
44 IN UINT32 CurrentProcessorIndex
45 );
46
53UINT32
55 VOID
56 );
57
67VOID
69 IN OUT SPIN_LOCK *MpSpinLock
70 );
71
78VOID
80 IN OUT SPIN_LOCK *MpSpinLock
81 );
82
92BOOLEAN
94 IN UINT32 ProcessorIndex
95 );
96
105VOID
107 IN UINT32 ProcessorIndex,
108 IN BOOLEAN StopFlag
109 );
110
119VOID
121 IN UINT32 ProcessorIndex,
122 IN BOOLEAN BreakFlag
123 );
124
134BOOLEAN
136 IN UINT32 ProcessorIndex
137 );
138
146VOID
148 IN BOOLEAN RunningFlag
149 );
150
157VOID
159 IN UINT32 ProcessorIndex
160 );
161
169VOID
171 IN BOOLEAN IpiSentByApFlag
172 );
173
182UINT32
184 VOID
185 );
186
194BOOLEAN
196 VOID
197 );
198
210BOOLEAN
212 IN UINT32 ProcessorIndex
213 );
214
215#endif
VOID SetCpuStopFlagByIndex(IN UINT32 ProcessorIndex, IN BOOLEAN StopFlag)
Definition: DebugMp.c:172
VOID SetDebugViewPoint(IN UINT32 ProcessorIndex)
Definition: DebugMp.c:276
UINT32 FindNextPendingBreakCpu(VOID)
Definition: DebugMp.c:311
VOID HaltOtherProcessors(IN UINT32 CurrentProcessorIndex)
Definition: DebugMp.c:68
UINT32 GetProcessorIndex(VOID)
Definition: DebugMp.c:97
BOOLEAN IsFirstBreakProcessor(IN UINT32 ProcessorIndex)
Definition: DebugMp.c:361
BOOLEAN DebugAgentIsBsp(IN UINT32 ProcessorIndex)
Definition: DebugMp.c:134
VOID ReleaseMpSpinLock(IN OUT SPIN_LOCK *MpSpinLock)
Definition: DebugMp.c:50
VOID AcquireMpSpinLock(IN OUT SPIN_LOCK *MpSpinLock)
Definition: DebugMp.c:25
VOID SetCpuRunningFlag(IN BOOLEAN RunningFlag)
Definition: DebugMp.c:260
BOOLEAN IsAllCpuRunning(VOID)
Definition: DebugMp.c:334
VOID SetCpuBreakFlagByIndex(IN UINT32 ProcessorIndex, IN BOOLEAN BreakFlag)
Definition: DebugMp.c:204
BOOLEAN IsCpuStopped(IN UINT32 ProcessorIndex)
Definition: DebugMp.c:237
VOID SetIpiSentByApFlag(IN BOOLEAN IpiSentByApFlag)
Definition: DebugMp.c:293
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
volatile UINTN SPIN_LOCK
UINT32 CpuCount
Processor count.
Definition: DebugMp.h:15
UINT32 ViewPointIndex
Current view point to be debugged.
Definition: DebugMp.h:25
SPIN_LOCK MpContextSpinLock
Lock for writing MP context.
Definition: DebugMp.h:20
BOOLEAN IpiSentByAp
TRUE: IPI is sent by AP. FALSE: IPI is sent by BSP.
Definition: DebugMp.h:29
SPIN_LOCK MailboxSpinLock
Lock for accessing mail box.
Definition: DebugMp.h:22
UINT32 DebugTimerInitCount
Record BSP's init timer count.
Definition: DebugMp.h:28
UINT32 BspIndex
Processor index value of BSP.
Definition: DebugMp.h:26
BOOLEAN RunCommandSet
TRUE: RUN command is executing. FALSE: RUN command has been executed.
Definition: DebugMp.h:30
SPIN_LOCK DebugPortSpinLock
Lock for access debug port.
Definition: DebugMp.h:21
UINT32 BreakAtCpuIndex
Processor index value of the current breaking CPU.
Definition: DebugMp.h:27