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