UefiCpuPkg/PiSmmCpuDxeSmm: Remove dependence between APs
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2268 In current implementation, when check whether APs called by StartUpAllAPs or StartUpThisAp, it checks the Tokens value used by other APs. Also the AP will update the Token value for itself if its task finished. In this case, the potential race condition issues happens for the tokens. Because of this, system may trig ASSERT during cycling test. This change enhance the code logic, add new attributes for the token to remove the reference for the tokens belongs to other APs. Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Eric Dong <eric.dong@intel.com>
This commit is contained in:
@@ -212,7 +212,8 @@ typedef struct {
|
||||
UINTN Signature;
|
||||
LIST_ENTRY Link;
|
||||
|
||||
SPIN_LOCK *ProcedureToken;
|
||||
SPIN_LOCK *SpinLock;
|
||||
volatile UINT32 RunningApCount;
|
||||
} PROCEDURE_TOKEN;
|
||||
|
||||
#define PROCEDURE_TOKEN_FROM_LINK(a) CR (a, PROCEDURE_TOKEN, Link, PROCEDURE_TOKEN_SIGNATURE)
|
||||
@@ -407,7 +408,7 @@ typedef struct {
|
||||
volatile VOID *Parameter;
|
||||
volatile UINT32 *Run;
|
||||
volatile BOOLEAN *Present;
|
||||
SPIN_LOCK *Token;
|
||||
PROCEDURE_TOKEN *Token;
|
||||
EFI_STATUS *Status;
|
||||
} SMM_CPU_DATA_BLOCK;
|
||||
|
||||
|
Reference in New Issue
Block a user