UefiCpuPkg/CpuMpPei: Remove unused files and codes
[mirror_edk2.git] / UefiCpuPkg / CpuMpPei / CpuMpPei.c
CommitLineData
ea0f431c
JF
1/** @file\r
2 CPU PEI Module installs CPU Multiple Processor PPI.\r
3\r
4da1ebf3 4 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
ea0f431c
JF
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include "CpuMpPei.h"\r
ea0f431c
JF
16/**\r
17 The Entry point of the MP CPU PEIM.\r
18\r
19 This function will wakeup APs and collect CPU AP count and install the\r
20 Mp Service Ppi.\r
21\r
22 @param FileHandle Handle of the file being invoked.\r
23 @param PeiServices Describes the list of possible PEI Services.\r
24\r
25 @retval EFI_SUCCESS MpServicePpi is installed successfully.\r
26\r
27**/\r
28EFI_STATUS\r
29EFIAPI\r
30CpuMpPeimInit (\r
31 IN EFI_PEI_FILE_HANDLE FileHandle,\r
32 IN CONST EFI_PEI_SERVICES **PeiServices\r
33 )\r
34{\r
a1a4c7a4 35 EFI_STATUS Status;\r
9bedfb2f
JF
36 EFI_VECTOR_HANDOFF_INFO *VectorInfo;\r
37 EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;\r
ea0f431c 38\r
ea0f431c 39 //\r
9bedfb2f
JF
40 // Get Vector Hand-off Info PPI\r
41 //\r
42 VectorInfo = NULL;\r
43 Status = PeiServicesLocatePpi (\r
44 &gEfiVectorHandoffInfoPpiGuid,\r
45 0,\r
46 NULL,\r
47 (VOID **)&VectorHandoffInfoPpi\r
48 );\r
49 if (Status == EFI_SUCCESS) {\r
50 VectorInfo = VectorHandoffInfoPpi->Info;\r
51 }\r
52 Status = InitializeCpuExceptionHandlers (VectorInfo);\r
53 ASSERT_EFI_ERROR (Status);\r
a1a4c7a4 54 \r
9bedfb2f 55 //\r
a1a4c7a4 56 // Wakeup APs to do initialization\r
ea0f431c 57 //\r
a1a4c7a4
JF
58 Status = MpInitLibInitialize ();\r
59 ASSERT_EFI_ERROR (Status);\r
60\r
ea0f431c
JF
61 //\r
62 // Update and publish CPU BIST information\r
63 //\r
a1a4c7a4
JF
64 CollectBistDataFromPpi (PeiServices);\r
65\r
ea0f431c
JF
66 //\r
67 // Install CPU MP PPI\r
68 //\r
69 Status = PeiServicesInstallPpi(&mPeiCpuMpPpiDesc);\r
70 ASSERT_EFI_ERROR (Status);\r
71\r
72 return Status;\r
73}\r