/** @file
Multi-Processor support functions implementation.
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "DebugAgent.h"
/**
Acquire access control on debug port.
It will block in the function if cannot get the access control.
**/
)
{
if (!MultiProcessorDebugSupport) {
return;
}
while (TRUE) {
break;
}
CpuPause ();
continue;
}
}
/**
Release access control on debug port.
**/
)
{
if (!MultiProcessorDebugSupport) {
return;
}
}
/**
Acquire access control on MP context.
It will block in the function if cannot get the access control.
**/
)
{
while (TRUE) {
break;
}
CpuPause ();
continue;
}
}
/**
Release access control on MP context.
**/
)
{
}
/**
Break the other processor by send IPI.
@param[in] CurrentProcessorIndex Current processor index value.
**/
)
{
if (!IsBsp (CurrentProcessorIndex)) {
}
//
// Set the debug viewpoint to the current breaking CPU.
//
//
// Send fixed IPI to other processors.
//
}
/**
Get the current processor's index.
@return Processor index value.
**/
)
{
break;
}
}
mDebugCpuData.CpuCount ++ ;
}
return Index;
}
/**
Check if the specified processor is BSP or not.
@param[in] ProcessorIndex Processor index value.
@retval TRUE It is BSP.
@retval FALSE It isn't BSP.
**/
IsBsp (
)
{
}
return TRUE;
} else {
return FALSE;
}
}
/**
Set processor stop flag bitmask in MP context.
@param[in] ProcessorIndex Processor index value.
@param[in] StopFlag TRUE means set stop flag.
FALSE means clean break flag.
**/
)
{
if (StopFlag) {
} else {
}
}
/**
Set processor break flag bitmask in MP context.
@param[in] ProcessorIndex Processor index value.
@param[in] BreakFlag TRUE means set break flag.
FALSE means clean break flag.
**/
)
{
if (BreakFlag) {
} else {
}
}
/**
Check if processor is stopped already.
@param[in] ProcessorIndex Processor index value.
@retval TRUE Processor is stopped already.
@retval TRUE Processor isn't stopped.
**/
)
{
return TRUE;
} else {
return FALSE;
}
}
/**
Set the run command flag.
@param[in] RunningFlag TRUE means run command flag is set.
FALSE means run command flag is cleared.
**/
)
{
}
/**
Set the current view point to be debugged.
@param[in] ProcessorIndex Processor index value.
**/
)
{
}
/**
Initialize debug timer.
@param[in] IpiSentByApFlag TRUE means this IPI is sent by AP.
FALSE means this IPI is sent by BSP.
**/
)
{
}
/**
Check if any processor breaks.
@retval others There is at least one processor broken, the minimum
index number of Processor returned.
@retval -1 No any processor broken.
**/
)
{
}
}
return (UINT32)-1;
}
/**
Check if all processors are in running status.
@retval TRUE All processors run.
@retval FALSE At least one processor does not run.
**/
)
{
return FALSE;
}
}
return TRUE;
}