SourceLevelDebugPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the SourceLevelDebugPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
b878648967
commit
c1e126b119
@ -8,9 +8,9 @@
|
||||
|
||||
#include "DebugAgent.h"
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED DEBUG_MP_CONTEXT volatile mDebugMpContext = {0,0,0,{0},{0},0,0,0,0,FALSE,FALSE};
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED DEBUG_MP_CONTEXT volatile mDebugMpContext = { 0, 0, 0, { 0 }, { 0 }, 0, 0, 0, 0, FALSE, FALSE };
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED DEBUG_CPU_DATA volatile mDebugCpuData = {0};
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED DEBUG_CPU_DATA volatile mDebugCpuData = { 0 };
|
||||
|
||||
/**
|
||||
Acquire a spin lock when Multi-processor supported.
|
||||
@ -23,10 +23,10 @@ GLOBAL_REMOVE_IF_UNREFERENCED DEBUG_CPU_DATA volatile mDebugCpuData = {0};
|
||||
**/
|
||||
VOID
|
||||
AcquireMpSpinLock (
|
||||
IN OUT SPIN_LOCK *MpSpinLock
|
||||
IN OUT SPIN_LOCK *MpSpinLock
|
||||
)
|
||||
{
|
||||
if (!MultiProcessorDebugSupport()) {
|
||||
if (!MultiProcessorDebugSupport ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ AcquireMpSpinLock (
|
||||
if (AcquireSpinLockOrFail (MpSpinLock)) {
|
||||
break;
|
||||
}
|
||||
|
||||
CpuPause ();
|
||||
continue;
|
||||
}
|
||||
@ -47,10 +48,10 @@ AcquireMpSpinLock (
|
||||
**/
|
||||
VOID
|
||||
ReleaseMpSpinLock (
|
||||
IN OUT SPIN_LOCK *MpSpinLock
|
||||
IN OUT SPIN_LOCK *MpSpinLock
|
||||
)
|
||||
{
|
||||
if (!MultiProcessorDebugSupport()) {
|
||||
if (!MultiProcessorDebugSupport ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -65,12 +66,12 @@ ReleaseMpSpinLock (
|
||||
**/
|
||||
VOID
|
||||
HaltOtherProcessors (
|
||||
IN UINT32 CurrentProcessorIndex
|
||||
IN UINT32 CurrentProcessorIndex
|
||||
)
|
||||
{
|
||||
DebugAgentMsgPrint (DEBUG_AGENT_INFO, "processor[%x]:Try to halt other processors.\n", CurrentProcessorIndex);
|
||||
if (!DebugAgentIsBsp (CurrentProcessorIndex)) {
|
||||
SetIpiSentByApFlag (TRUE);;
|
||||
SetIpiSentByApFlag (TRUE);
|
||||
}
|
||||
|
||||
mDebugMpContext.BreakAtCpuIndex = CurrentProcessorIndex;
|
||||
@ -84,7 +85,6 @@ HaltOtherProcessors (
|
||||
// Send fixed IPI to other processors.
|
||||
//
|
||||
SendFixedIpiAllExcludingSelf (DEBUG_TIMER_VECTOR);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,14 +98,14 @@ GetProcessorIndex (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
UINT16 LocalApicID;
|
||||
UINT32 Index;
|
||||
UINT16 LocalApicID;
|
||||
|
||||
LocalApicID = (UINT16) GetApicId ();
|
||||
LocalApicID = (UINT16)GetApicId ();
|
||||
|
||||
AcquireMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
|
||||
for (Index = 0; Index < mDebugCpuData.CpuCount; Index ++) {
|
||||
for (Index = 0; Index < mDebugCpuData.CpuCount; Index++) {
|
||||
if (mDebugCpuData.ApicID[Index] == LocalApicID) {
|
||||
break;
|
||||
}
|
||||
@ -113,7 +113,7 @@ GetProcessorIndex (
|
||||
|
||||
if (Index == mDebugCpuData.CpuCount) {
|
||||
mDebugCpuData.ApicID[Index] = LocalApicID;
|
||||
mDebugCpuData.CpuCount ++ ;
|
||||
mDebugCpuData.CpuCount++;
|
||||
}
|
||||
|
||||
ReleaseMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
@ -153,6 +153,7 @@ DebugAgentIsBsp (
|
||||
mDebugMpContext.BspIndex = ProcessorIndex;
|
||||
ReleaseMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
@ -169,12 +170,12 @@ DebugAgentIsBsp (
|
||||
**/
|
||||
VOID
|
||||
SetCpuStopFlagByIndex (
|
||||
IN UINT32 ProcessorIndex,
|
||||
IN BOOLEAN StopFlag
|
||||
IN UINT32 ProcessorIndex,
|
||||
IN BOOLEAN StopFlag
|
||||
)
|
||||
{
|
||||
UINT8 Value;
|
||||
UINTN Index;
|
||||
UINT8 Value;
|
||||
UINTN Index;
|
||||
|
||||
AcquireMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
|
||||
@ -185,6 +186,7 @@ SetCpuStopFlagByIndex (
|
||||
} else {
|
||||
Value = BitFieldWrite8 (Value, Index, Index, 0);
|
||||
}
|
||||
|
||||
mDebugMpContext.CpuStopStatusMask[ProcessorIndex / 8] = Value;
|
||||
|
||||
ReleaseMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
@ -200,12 +202,12 @@ SetCpuStopFlagByIndex (
|
||||
**/
|
||||
VOID
|
||||
SetCpuBreakFlagByIndex (
|
||||
IN UINT32 ProcessorIndex,
|
||||
IN BOOLEAN BreakFlag
|
||||
IN UINT32 ProcessorIndex,
|
||||
IN BOOLEAN BreakFlag
|
||||
)
|
||||
{
|
||||
UINT8 Value;
|
||||
UINTN Index;
|
||||
UINT8 Value;
|
||||
UINTN Index;
|
||||
|
||||
AcquireMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
|
||||
@ -216,6 +218,7 @@ SetCpuBreakFlagByIndex (
|
||||
} else {
|
||||
Value = BitFieldWrite8 (Value, Index, Index, 0);
|
||||
}
|
||||
|
||||
mDebugMpContext.CpuBreakMask[ProcessorIndex / 8] = Value;
|
||||
|
||||
ReleaseMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
@ -232,12 +235,12 @@ SetCpuBreakFlagByIndex (
|
||||
**/
|
||||
BOOLEAN
|
||||
IsCpuStopped (
|
||||
IN UINT32 ProcessorIndex
|
||||
IN UINT32 ProcessorIndex
|
||||
)
|
||||
{
|
||||
UINT8 CpuMask;
|
||||
UINT8 CpuMask;
|
||||
|
||||
CpuMask = (UINT8) (1 << (ProcessorIndex % 8));
|
||||
CpuMask = (UINT8)(1 << (ProcessorIndex % 8));
|
||||
|
||||
if ((mDebugMpContext.CpuStopStatusMask[ProcessorIndex / 8] & CpuMask) != 0) {
|
||||
return TRUE;
|
||||
@ -255,7 +258,7 @@ IsCpuStopped (
|
||||
**/
|
||||
VOID
|
||||
SetCpuRunningFlag (
|
||||
IN BOOLEAN RunningFlag
|
||||
IN BOOLEAN RunningFlag
|
||||
)
|
||||
{
|
||||
AcquireMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
@ -271,7 +274,7 @@ SetCpuRunningFlag (
|
||||
**/
|
||||
VOID
|
||||
SetDebugViewPoint (
|
||||
IN UINT32 ProcessorIndex
|
||||
IN UINT32 ProcessorIndex
|
||||
)
|
||||
{
|
||||
AcquireMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
@ -288,7 +291,7 @@ SetDebugViewPoint (
|
||||
**/
|
||||
VOID
|
||||
SetIpiSentByApFlag (
|
||||
IN BOOLEAN IpiSentByApFlag
|
||||
IN BOOLEAN IpiSentByApFlag
|
||||
)
|
||||
{
|
||||
AcquireMpSpinLock (&mDebugMpContext.MpContextSpinLock);
|
||||
@ -309,13 +312,14 @@ FindNextPendingBreakCpu (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
UINT32 Index;
|
||||
|
||||
for (Index = 0; Index < DEBUG_CPU_MAX_COUNT / 8; Index ++) {
|
||||
for (Index = 0; Index < DEBUG_CPU_MAX_COUNT / 8; Index++) {
|
||||
if (mDebugMpContext.CpuBreakMask[Index] != 0) {
|
||||
return (UINT32) LowBitSet32 (mDebugMpContext.CpuBreakMask[Index]) + Index * 8;
|
||||
return (UINT32)LowBitSet32 (mDebugMpContext.CpuBreakMask[Index]) + Index * 8;
|
||||
}
|
||||
}
|
||||
|
||||
return (UINT32)-1;
|
||||
}
|
||||
|
||||
@ -331,13 +335,14 @@ IsAllCpuRunning (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
UINTN Index;
|
||||
|
||||
for (Index = 0; Index < DEBUG_CPU_MAX_COUNT / 8; Index ++) {
|
||||
for (Index = 0; Index < DEBUG_CPU_MAX_COUNT / 8; Index++) {
|
||||
if (mDebugMpContext.CpuStopStatusMask[Index] != 0) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -354,11 +359,11 @@ IsAllCpuRunning (
|
||||
**/
|
||||
BOOLEAN
|
||||
IsFirstBreakProcessor (
|
||||
IN UINT32 ProcessorIndex
|
||||
IN UINT32 ProcessorIndex
|
||||
)
|
||||
{
|
||||
if (MultiProcessorDebugSupport()) {
|
||||
if (mDebugMpContext.BreakAtCpuIndex != (UINT32) -1) {
|
||||
if (MultiProcessorDebugSupport ()) {
|
||||
if (mDebugMpContext.BreakAtCpuIndex != (UINT32)-1) {
|
||||
//
|
||||
// The current processor is not the first breaking one.
|
||||
//
|
||||
@ -372,6 +377,6 @@ IsFirstBreakProcessor (
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user