audk/UefiCpuPkg/Library/MpInitLib
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
..
Ia32 UefiCpuPkg/MpInitLib: increase NumApsExecuting only for ApInitConfig 2019-06-10 10:53:42 +08:00
X64 UefiCpuPkg/MpInitLib: Enable 5-level paging for AP when BSP's enabled 2019-08-09 08:52:08 +08:00
DxeMpInitLib.inf UefiCpuPkg/MpInitLib: honor the platform's boot CPU count in AP detection 2019-10-11 23:20:09 +02:00
DxeMpInitLib.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
DxeMpLib.c UefiCpuPkg/MpInitLib: Add MpInitLibStartupAllCPUs API. 2019-07-29 09:25:20 +08:00
Microcode.c UefiCpuPkg/MpInitLib: MicrocodeDetect: Ensure checked range is valid 2019-06-27 09:20:53 +08:00
MpLib.c UefiCpuPkg/MpInitLib: Remove global variable X2ApicEnable 2019-11-05 10:03:44 +08:00
MpLib.h UefiCpuPkg/MpInitLib: Remove global variable X2ApicEnable 2019-11-05 10:03:44 +08:00
PeiMpInitLib.inf UefiCpuPkg/MpInitLib: honor the platform's boot CPU count in AP detection 2019-10-11 23:20:09 +02:00
PeiMpInitLib.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
PeiMpLib.c UefiCpuPkg/MpInitLib: Add MpInitLibStartupAllCPUs API. 2019-07-29 09:25:20 +08:00