/* The index of Processor specified by mPackageFirstThreadIndex will do the package-scope register programming. */
BOOLEAN IsPackageFirstThread(IN UINTN CpuIndex)
/* The index of Processor specified by mPackageFirstThreadIndex will do the package-scope register programming. */
BOOLEAN IsPackageFirstThread(IN UINTN CpuIndex)
{
  UINT32  PackageIndex;
  PackageIndex =  gSmmCpuPrivate->ProcessorInfo[CpuIndex].Location.Package;
  ASSERT (mPackageFirstThreadIndex != NULL);
  if (mPackageFirstThreadIndex[PackageIndex] == (UINT32)-1) {
    mPackageFirstThreadIndex[PackageIndex] = (UINT32)CpuIndex;
  }
  return (BOOLEAN)(mPackageFirstThreadIndex[PackageIndex] == CpuIndex);
}