audk/UefiCpuPkg
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
..
Application/Cpuid UefiCpuPkg: strip trailing whitespace 2019-10-04 11:18:32 +01:00
CpuDxe UefiCpuPkg/CpuDxe: Fix boot error 2020-12-08 22:17:55 +00:00
CpuFeatures
CpuIo2Dxe
CpuIo2Smm
CpuIoPei
CpuMpPei UefiCpuPkg: Correct some typos. 2020-07-28 01:43:16 +00:00
CpuS3DataDxe
Include UefiCpuPkg/Feature: Support different thread count per core 2020-12-04 01:18:56 +00:00
Library UefiCpuPkg/CpuFeature: reduce time complexty to calc CpuInfo.First 2020-12-14 08:54:22 +00:00
PiSmmCommunication UefiCpuPkg/PiSmm: Fix various typos 2020-02-10 22:30:07 +00:00
PiSmmCpuDxeSmm UefiCpuPkg/Feature: Support different thread count per core 2020-12-04 01:18:56 +00:00
ResetVector UefiCpuPkg: Add a 16-bit protected mode code segment descriptor 2020-08-17 02:46:39 +00:00
SecCore UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098) 2020-07-28 01:43:16 +00:00
SecMigrationPei UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098) 2020-07-28 01:43:16 +00:00
Test UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test 2020-08-12 11:38:37 +00:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Remove PcdFrameworkCompatibilitySupport usage 2019-05-09 09:42:55 +08:00
UefiCpuPkg.ci.yaml UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for Ecc check 2020-08-17 03:28:09 +00:00
UefiCpuPkg.dec UefiCpuPkg: Create an SEV-ES workarea PCD 2020-08-17 02:46:39 +00:00
UefiCpuPkg.dsc UefiCpuPkg: Implement library support for VMGEXIT 2020-08-16 16:45:42 +00:00
UefiCpuPkg.uni UefiCpuPkg: Create an SEV-ES workarea PCD 2020-08-17 02:46:39 +00:00
UefiCpuPkgExtra.uni