]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuMpPei: Consume CpuExceptionHandlerLib
authorJeff Fan <jeff.fan@intel.com>
Tue, 24 May 2016 13:42:19 +0000 (21:42 +0800)
committerJeff Fan <jeff.fan@intel.com>
Wed, 1 Jun 2016 07:37:01 +0000 (15:37 +0800)
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>
UefiCpuPkg/CpuMpPei/CpuMpPei.c
UefiCpuPkg/CpuMpPei/CpuMpPei.h
UefiCpuPkg/CpuMpPei/CpuMpPei.inf

index ef1c2812e2bf7f0ca620ecde61102bdd0e9592ad..4ed1da98787858e8008df9614e45900333c5ff2c 100644 (file)
@@ -852,14 +852,31 @@ CpuMpPeimInit (
   IN CONST EFI_PEI_SERVICES     **PeiServices\r
   )\r
 {\r
   IN CONST EFI_PEI_SERVICES     **PeiServices\r
   )\r
 {\r
-  EFI_STATUS           Status;\r
-  PEI_CPU_MP_DATA      *PeiCpuMpData;\r
+  EFI_STATUS                       Status;\r
+  PEI_CPU_MP_DATA                 *PeiCpuMpData;\r
+  EFI_VECTOR_HANDOFF_INFO         *VectorInfo;\r
+  EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;\r
 \r
   //\r
   // Load new GDT table on BSP\r
   //\r
   AsmInitializeGdt (&mGdt);\r
   //\r
 \r
   //\r
   // Load new GDT table on BSP\r
   //\r
   AsmInitializeGdt (&mGdt);\r
   //\r
+  // Get Vector Hand-off Info PPI\r
+  //\r
+  VectorInfo = NULL;\r
+  Status = PeiServicesLocatePpi (\r
+             &gEfiVectorHandoffInfoPpiGuid,\r
+             0,\r
+             NULL,\r
+             (VOID **)&VectorHandoffInfoPpi\r
+             );\r
+  if (Status == EFI_SUCCESS) {\r
+    VectorInfo = VectorHandoffInfoPpi->Info;\r
+  }\r
+  Status = InitializeCpuExceptionHandlers (VectorInfo);\r
+  ASSERT_EFI_ERROR (Status);\r
+  //\r
   // Get wakeup buffer and copy AP reset code in it\r
   //\r
   PeiCpuMpData = PrepareAPStartupVector ();\r
   // Get wakeup buffer and copy AP reset code in it\r
   //\r
   PeiCpuMpData = PrepareAPStartupVector ();\r
index 7c8a218e0ee33aff8e4c95f3dff615709014152a..afbcb6e5790a2cbe205669efb7cdbcc1cd2ade34 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definitions to install Multiple Processor PPI.\r
 \r
 /** @file\r
   Definitions to install Multiple Processor PPI.\r
 \r
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,6 +21,7 @@
 #include <Ppi/SecPlatformInformation.h>\r
 #include <Ppi/SecPlatformInformation2.h>\r
 #include <Ppi/EndOfPeiPhase.h>\r
 #include <Ppi/SecPlatformInformation.h>\r
 #include <Ppi/SecPlatformInformation2.h>\r
 #include <Ppi/EndOfPeiPhase.h>\r
+#include <Ppi/VectorHandoffInfo.h>\r
 \r
 #include <Register/Cpuid.h>\r
 #include <Register/LocalApic.h>\r
 \r
 #include <Register/Cpuid.h>\r
 #include <Register/LocalApic.h>\r
@@ -39,6 +40,7 @@
 #include <Library/TimerLib.h>\r
 #include <Library/UefiCpuLib.h>\r
 #include <Library/CpuLib.h>\r
 #include <Library/TimerLib.h>\r
 #include <Library/UefiCpuLib.h>\r
 #include <Library/CpuLib.h>\r
+#include <Library/CpuExceptionHandlerLib.h>\r
 \r
 #include "Microcode.h"\r
 \r
 \r
 #include "Microcode.h"\r
 \r
index 70b272e33bc4386720b8166323d78c265c96c713..445caf98f24d2cc960b3ca7a579a70934a0099b3 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  CPU driver installs CPU PI Multi-processor PPI.\r
 #\r
 ## @file\r
 #  CPU driver installs CPU PI Multi-processor PPI.\r
 #\r
-#  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution.  The full text of the license may be found at\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution.  The full text of the license may be found at\r
@@ -50,6 +50,7 @@
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
   UefiCpuPkg/UefiCpuPkg.dec\r
 \r
 [LibraryClasses]\r
   UefiCpuPkg/UefiCpuPkg.dec\r
 \r
 [LibraryClasses]\r
@@ -67,6 +68,7 @@
   TimerLib\r
   UefiCpuLib\r
   CpuLib\r
   TimerLib\r
   UefiCpuLib\r
   CpuLib\r
+  CpuExceptionHandlerLib\r
 \r
 [Ppis]\r
   gEfiPeiMpServicesPpiGuid                      ## PRODUCES\r
 \r
 [Ppis]\r
   gEfiPeiMpServicesPpiGuid                      ## PRODUCES\r
@@ -75,6 +77,7 @@
   ## SOMETIMES_CONSUMES\r
   ## SOMETIMES_PRODUCES\r
   gEfiSecPlatformInformation2PpiGuid\r
   ## SOMETIMES_CONSUMES\r
   ## SOMETIMES_PRODUCES\r
   gEfiSecPlatformInformation2PpiGuid\r
+  gEfiVectorHandoffInfoPpiGuid                  ## SOMETIMES_CONSUMES\r
 \r
 [Pcd]\r
   gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber        ## CONSUMES\r
 \r
 [Pcd]\r
   gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber        ## CONSUMES\r