diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c index e832c16eca..d2bcef53d6 100644 --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c @@ -326,7 +326,7 @@ InitMpGlobalData ( CpuInfoInHob = (CPU_INFO_IN_HOB *)(UINTN)CpuMpData->CpuInfoInHob; for (Index = 0; Index < CpuMpData->CpuCount; ++Index) { if (CpuInfoInHob != NULL && CpuInfoInHob[Index].ApTopOfStack != 0) { - StackBase = CpuInfoInHob[Index].ApTopOfStack - CpuMpData->CpuApStackSize; + StackBase = (UINTN)CpuInfoInHob[Index].ApTopOfStack - CpuMpData->CpuApStackSize; } else { StackBase = CpuMpData->Buffer + Index * CpuMpData->CpuApStackSize; }