if ((CpuIndex >= gSmst->NumberOfCpus) || (Buffer == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
+ //\r
+ // The AsmLfence() call here is to ensure the above check for the CpuIndex\r
+ // has been completed before the execution of subsequent codes.\r
+ //\r
+ AsmLfence ();\r
\r
//\r
// Check for special EFI_SMM_SAVE_STATE_REGISTER_PROCESSOR_ID\r