diff options
author | Ray Ni <ray.ni@intel.com> | 2020-12-02 09:51:31 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-04 01:18:56 +0000 |
commit | 6af76adbbfccd31f4f8753fb0ddbbd9f4372f572 (patch) | |
tree | 11bb7d4e12bfbeddb5af61cf744d727563b4057c /UefiCpuPkg/Include | |
parent | 126115a9fb3f89f8609336c87aa82fe7da19a9aa (diff) | |
download | edk2-6af76adbbfccd31f4f8753fb0ddbbd9f4372f572.zip edk2-6af76adbbfccd31f4f8753fb0ddbbd9f4372f572.tar.gz edk2-6af76adbbfccd31f4f8753fb0ddbbd9f4372f572.tar.bz2 |
UefiCpuPkg/Feature: Support different thread count per core
Today's code assumes every core contains the same number of threads.
It's not always TRUE for certain model.
Such assumption causes system hang when thread count per core
is different and there is core or package dependency between CPU
features (using CPU_FEATURE_CORE_BEFORE/AFTER,
CPU_FEATURE_PACKAGE_BEFORE/AFTER).
The change removes such assumption by calculating the actual thread
count per package and per core.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Cc: Yun Lou <yun.lou@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'UefiCpuPkg/Include')
-rw-r--r-- | UefiCpuPkg/Include/AcpiCpuData.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/UefiCpuPkg/Include/AcpiCpuData.h b/UefiCpuPkg/Include/AcpiCpuData.h index 77da5d4..b5a69ad 100644 --- a/UefiCpuPkg/Include/AcpiCpuData.h +++ b/UefiCpuPkg/Include/AcpiCpuData.h @@ -1,7 +1,7 @@ /** @file
Definitions for CPU S3 data.
-Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -60,14 +60,24 @@ typedef struct { UINT32 MaxThreadCount;
//
// This field points to an array.
- // This array saves valid core count (type UINT32) of each package.
+ // This array saves thread count (type UINT32) of each package.
// The array has PackageCount elements.
//
// If the platform does not support MSR setting at S3 resume, and
// therefore it doesn't need the dependency semaphores, it should set
// this field to 0.
//
- EFI_PHYSICAL_ADDRESS ValidCoreCountPerPackage;
+ EFI_PHYSICAL_ADDRESS ThreadCountPerPackage;
+ //
+ // This field points to an array.
+ // This array saves thread count (type UINT8) of each core.
+ // The array has PackageCount * MaxCoreCount elements.
+ //
+ // If the platform does not support MSR setting at S3 resume, and
+ // therefore it doesn't need the dependency semaphores, it should set
+ // this field to 0.
+ //
+ EFI_PHYSICAL_ADDRESS ThreadCountPerCore;
} CPU_STATUS_INFORMATION;
//
|