From e79c6af384a824b54542de058a01c43b107b1367 Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Fri, 21 Apr 2017 11:21:00 +0800 Subject: UefiCpuPkg: Move ProgramVirtualWireMode() to MpInitLib In PEI phase, BSP did not program vitural wired mode while APs did. Move program virtual wired mode from CpuDxe to MpInitLib, thus it could benefit on both CpuDxe and CpuMpPei. https://bugzilla.tianocore.org/show_bug.cgi?id=496 Cc: Feng Tian Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Feng Tian (cherry picked from commit 9d64a9fd9ee05f0b0228fc1f8b66398dac85e2c9) --- Core/UefiCpuPkg/CpuDxe/CpuDxe.c | 5 ----- Core/UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Core/UefiCpuPkg/CpuDxe/CpuDxe.c b/Core/UefiCpuPkg/CpuDxe/CpuDxe.c index 4a5e282741..86806568a9 100644 --- a/Core/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/Core/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -1135,11 +1135,6 @@ InitializeCpu ( // InitInterruptDescriptorTable (); - // - // Enable the local APIC for Virtual Wire Mode. - // - ProgramVirtualWireMode (); - // // Install CPU Architectural Protocol // diff --git a/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c b/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c index 03d6c2d89e..e5e211de8d 100644 --- a/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -1364,6 +1364,10 @@ MpInitLibInitialize ( // Store BSP's MTRR setting // MtrrGetAllMtrrs (&CpuMpData->MtrrTable); + // + // Enable the local APIC for Virtual Wire Mode. + // + ProgramVirtualWireMode (); if (OldCpuMpData == NULL) { if (MaxLogicalProcessorNumber > 1) { -- cgit v1.2.3