audk/UefiCpuPkg/Library/RegisterCpuFeaturesLib
Ray Ni 793c59da13 UefiCpuPkg/CpuFeature: reduce time complexty to calc CpuInfo.First
CpuInfo.First stores whether the current thread belongs to the first
package in the platform, first core in a package, first thread in a
core.

But the time complexity of original algorithm to calculate the
CpuInfo.First is O (n) * O (p) * O (c).
  n: number of processors
  p: number of packages
  c: number of cores per package

The patch trades time with space by storing the first package, first
core per package, first thread per core in an array.
The time complexity becomes O (n).

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Cc: Yun Lou <yun.lou@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
2020-12-14 08:54:22 +00:00
..
CpuFeaturesInitialize.c UefiCpuPkg/CpuFeature: reduce time complexty to calc CpuInfo.First 2020-12-14 08:54:22 +00:00
DxeRegisterCpuFeaturesLib.c UefiCpuPkg/RegisterCpuFeaturesLib: Start all processors simultaneously. 2019-07-29 09:25:20 +08:00
DxeRegisterCpuFeaturesLib.inf UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
PeiRegisterCpuFeaturesLib.c UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case. 2020-09-14 13:07:37 +00:00
PeiRegisterCpuFeaturesLib.inf UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case. 2020-09-14 13:07:37 +00:00
RegisterCpuFeatures.h UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case. 2020-09-14 13:07:37 +00:00
RegisterCpuFeaturesLib.c UefiCpuPkg/RegisterCpuFeaturesLib: Rename [Before|After]FeatureBitMask 2020-02-14 03:15:00 +00:00
RegisterCpuFeaturesLib.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00