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;
|
||||
CPU_DATA_BLOCK *CpuData;
|
||||
EFI_AP_PROCEDURE Procedure;
|
||||
VOID *ProcedureArgument;
|
||||
volatile VOID *ProcedureArgument;
|
||||
|
||||
AsmApDoneWithCommonStack ();
|
||||
|
||||
|
@ -1231,7 +1231,7 @@ ProcessorToIdleState (
|
|||
if (Procedure != NULL) {
|
||||
SetApState (CpuData, CpuStateBusy);
|
||||
|
||||
Procedure (ProcedureArgument);
|
||||
Procedure ((VOID*) ProcedureArgument);
|
||||
|
||||
GetMpSpinLock (CpuData);
|
||||
CpuData->Procedure = NULL;
|
||||
|
|
|
@ -94,8 +94,8 @@ typedef struct {
|
|||
INTN LockSelf;
|
||||
volatile CPU_STATE State;
|
||||
|
||||
EFI_AP_PROCEDURE Procedure;
|
||||
VOID *Parameter;
|
||||
volatile EFI_AP_PROCEDURE Procedure;
|
||||
volatile VOID* Parameter;
|
||||
BOOLEAN *Finished;
|
||||
INTN Timeout;
|
||||
EFI_EVENT WaitEvent;
|
||||
|
|
Loading…
Reference in New Issue