audk/UefiCpuPkg/Library
Ray Ni fe3ca5fd25 UefiCpuPkg/MpInitLib: Remove global variable X2ApicEnable
MpInitLib sets X2ApicEnable in two places.
1. CollectProcessorCount()
   This function is called when MpInitLibInitialize() hasn't been
   called before.
   It sets X2ApicEnable and later in the same function it configures
   all CPUs to operate in X2 APIC mode.
2. MpInitLibInitialize()
   The X2ApicEnable setting happens when this function is called in
   second time. But after that setting, no code consumes that flag.

With the above analysis and with the purpose of simplifying the code,
the X2ApicEnable in #1 is changed to local variable and the #2 can be
changed to remove the setting of X2ApicEnable.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2019-11-05 10:03:44 +08:00
..
BaseUefiCpuLib UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
BaseXApicLib UefiCpuPkg: Update code to include register definitions from MdePkg 2019-08-09 08:52:09 +08:00
BaseXApicX2ApicLib UefiCpuPkg: Update code to include register definitions from MdePkg 2019-08-09 08:52:09 +08:00
CpuCommonFeaturesLib UefiCpuPkg/CpuCommonFeaturesLib: Use new macros. 2019-08-21 02:44:50 +08:00
CpuExceptionHandlerLib UefiCpuPkg/CpuExceptionHandlerLib: Fix split lock 2019-09-20 14:37:42 +08:00
CpuTimerLib UefiCpuPkg: Adding a new TSC library by using CPUID(0x15) TSC leaf 2019-08-21 21:36:56 +08:00
MpInitLib UefiCpuPkg/MpInitLib: Remove global variable X2ApicEnable 2019-11-05 10:03:44 +08:00
MpInitLibUp UefiCpuPkg/MpInitLibUp: Add MpInitLibStartupAllCPUs API. 2019-07-29 09:25:20 +08:00
MtrrLib UefiCpuPkg: Update code to include register definitions from MdePkg 2019-08-09 08:52:09 +08:00
PlatformSecLibNull UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
RegisterCpuFeaturesLib UefiCpuPkg/RegisterCpuFeaturesLib: Supports test then write new value logic. 2019-08-21 02:44:49 +08:00
SecPeiDxeTimerLibUefiCpu UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
SmmCpuFeaturesLib UefiCpuPkg: Update code to include register definitions from MdePkg 2019-08-09 08:52:09 +08:00
SmmCpuPlatformHookLibNull UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00