UefiCpuPkg/MpInitLib: fix 32-bit build error
authorJian J Wang <jian.j.wang@intel.com>
Thu, 11 Jan 2018 01:00:28 +0000 (09:00 +0800)
committerEric Dong <eric.dong@intel.com>
Thu, 11 Jan 2018 09:31:09 +0000 (17:31 +0800)
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
UefiCpuPkg/Library/MpInitLib/DxeMpLib.c

index e832c16..d2bcef5 100644 (file)
@@ -326,7 +326,7 @@ InitMpGlobalData (
     CpuInfoInHob = (CPU_INFO_IN_HOB *)(UINTN)CpuMpData->CpuInfoInHob;\r
     for (Index = 0; Index < CpuMpData->CpuCount; ++Index) {\r
       if (CpuInfoInHob != NULL && CpuInfoInHob[Index].ApTopOfStack != 0) {\r
     CpuInfoInHob = (CPU_INFO_IN_HOB *)(UINTN)CpuMpData->CpuInfoInHob;\r
     for (Index = 0; Index < CpuMpData->CpuCount; ++Index) {\r
       if (CpuInfoInHob != NULL && CpuInfoInHob[Index].ApTopOfStack != 0) {\r
-        StackBase = CpuInfoInHob[Index].ApTopOfStack - CpuMpData->CpuApStackSize;\r
+        StackBase = (UINTN)CpuInfoInHob[Index].ApTopOfStack - CpuMpData->CpuApStackSize;\r
       } else {\r
         StackBase = CpuMpData->Buffer + Index * CpuMpData->CpuApStackSize;\r
       }\r
       } else {\r
         StackBase = CpuMpData->Buffer + Index * CpuMpData->CpuApStackSize;\r
       }\r