UefiCpuPkg/CpuMpPei: Consume CpuExceptionHandlerLib

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Jeff Fan 2016-05-24 21:42:19 +08:00
parent a81abf1616
commit 9bedfb2f5b
3 changed files with 26 additions and 4 deletions

View File

@ -852,14 +852,31 @@ CpuMpPeimInit (
IN CONST EFI_PEI_SERVICES **PeiServices IN CONST EFI_PEI_SERVICES **PeiServices
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
PEI_CPU_MP_DATA *PeiCpuMpData; PEI_CPU_MP_DATA *PeiCpuMpData;
EFI_VECTOR_HANDOFF_INFO *VectorInfo;
EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;
// //
// Load new GDT table on BSP // Load new GDT table on BSP
// //
AsmInitializeGdt (&mGdt); AsmInitializeGdt (&mGdt);
// //
// Get Vector Hand-off Info PPI
//
VectorInfo = NULL;
Status = PeiServicesLocatePpi (
&gEfiVectorHandoffInfoPpiGuid,
0,
NULL,
(VOID **)&VectorHandoffInfoPpi
);
if (Status == EFI_SUCCESS) {
VectorInfo = VectorHandoffInfoPpi->Info;
}
Status = InitializeCpuExceptionHandlers (VectorInfo);
ASSERT_EFI_ERROR (Status);
//
// Get wakeup buffer and copy AP reset code in it // Get wakeup buffer and copy AP reset code in it
// //
PeiCpuMpData = PrepareAPStartupVector (); PeiCpuMpData = PrepareAPStartupVector ();

View File

@ -1,7 +1,7 @@
/** @file /** @file
Definitions to install Multiple Processor PPI. Definitions to install Multiple Processor PPI.
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -21,6 +21,7 @@
#include <Ppi/SecPlatformInformation.h> #include <Ppi/SecPlatformInformation.h>
#include <Ppi/SecPlatformInformation2.h> #include <Ppi/SecPlatformInformation2.h>
#include <Ppi/EndOfPeiPhase.h> #include <Ppi/EndOfPeiPhase.h>
#include <Ppi/VectorHandoffInfo.h>
#include <Register/Cpuid.h> #include <Register/Cpuid.h>
#include <Register/LocalApic.h> #include <Register/LocalApic.h>
@ -39,6 +40,7 @@
#include <Library/TimerLib.h> #include <Library/TimerLib.h>
#include <Library/UefiCpuLib.h> #include <Library/UefiCpuLib.h>
#include <Library/CpuLib.h> #include <Library/CpuLib.h>
#include <Library/CpuExceptionHandlerLib.h>
#include "Microcode.h" #include "Microcode.h"

View File

@ -1,7 +1,7 @@
## @file ## @file
# CPU driver installs CPU PI Multi-processor PPI. # CPU driver installs CPU PI Multi-processor PPI.
# #
# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at # which accompanies this distribution. The full text of the license may be found at
@ -50,6 +50,7 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
UefiCpuPkg/UefiCpuPkg.dec UefiCpuPkg/UefiCpuPkg.dec
[LibraryClasses] [LibraryClasses]
@ -67,6 +68,7 @@
TimerLib TimerLib
UefiCpuLib UefiCpuLib
CpuLib CpuLib
CpuExceptionHandlerLib
[Ppis] [Ppis]
gEfiPeiMpServicesPpiGuid ## PRODUCES gEfiPeiMpServicesPpiGuid ## PRODUCES
@ -75,6 +77,7 @@
## SOMETIMES_CONSUMES ## SOMETIMES_CONSUMES
## SOMETIMES_PRODUCES ## SOMETIMES_PRODUCES
gEfiSecPlatformInformation2PpiGuid gEfiSecPlatformInformation2PpiGuid
gEfiVectorHandoffInfoPpiGuid ## SOMETIMES_CONSUMES
[Pcd] [Pcd]
gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## CONSUMES gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## CONSUMES