mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MpSerivce: add volatile qualifiers
For avoid the compiler optimizing the code, we let Parameter and Procedure in CpuData volatile. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17024 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
68f0674237
commit
33f413f0d6
|
@ -1193,7 +1193,7 @@ ProcessorToIdleState (
|
||||||
UINTN ProcessorNumber;
|
UINTN ProcessorNumber;
|
||||||
CPU_DATA_BLOCK *CpuData;
|
CPU_DATA_BLOCK *CpuData;
|
||||||
EFI_AP_PROCEDURE Procedure;
|
EFI_AP_PROCEDURE Procedure;
|
||||||
VOID *ProcedureArgument;
|
volatile VOID *ProcedureArgument;
|
||||||
|
|
||||||
AsmApDoneWithCommonStack ();
|
AsmApDoneWithCommonStack ();
|
||||||
|
|
||||||
|
@ -1231,7 +1231,7 @@ ProcessorToIdleState (
|
||||||
if (Procedure != NULL) {
|
if (Procedure != NULL) {
|
||||||
SetApState (CpuData, CpuStateBusy);
|
SetApState (CpuData, CpuStateBusy);
|
||||||
|
|
||||||
Procedure (ProcedureArgument);
|
Procedure ((VOID*) ProcedureArgument);
|
||||||
|
|
||||||
GetMpSpinLock (CpuData);
|
GetMpSpinLock (CpuData);
|
||||||
CpuData->Procedure = NULL;
|
CpuData->Procedure = NULL;
|
||||||
|
|
|
@ -94,8 +94,8 @@ typedef struct {
|
||||||
INTN LockSelf;
|
INTN LockSelf;
|
||||||
volatile CPU_STATE State;
|
volatile CPU_STATE State;
|
||||||
|
|
||||||
EFI_AP_PROCEDURE Procedure;
|
volatile EFI_AP_PROCEDURE Procedure;
|
||||||
VOID *Parameter;
|
volatile VOID* Parameter;
|
||||||
BOOLEAN *Finished;
|
BOOLEAN *Finished;
|
||||||
INTN Timeout;
|
INTN Timeout;
|
||||||
EFI_EVENT WaitEvent;
|
EFI_EVENT WaitEvent;
|
||||||
|
|
Loading…
Reference in New Issue