VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/CpuMpPei/LoongArch64/CpuMpPei.c@ 108794

Last change on this file since 108794 was 108794, checked in by vboxsync, 2 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1/** @file
2 CPU PEI Module installs CPU Multiple Processor PPI.
3
4 Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2025, Loongson Technology Corporation Limited. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#include "CpuMpPei.h"
11
12EFI_PEI_PPI_DESCRIPTOR mPeiCpuMpPpiList[] = {
13 {
14 EFI_PEI_PPI_DESCRIPTOR_PPI,
15 &gEdkiiPeiMpServices2PpiGuid,
16 &mMpServices2Ppi
17 },
18 {
19 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
20 &gEfiPeiMpServicesPpiGuid,
21 &mMpServicesPpi
22 }
23};
24
25/**
26 Initializes MP and exceptions handlers.
27
28 @param PeiServices The pointer to the PEI Services Table.
29
30 @retval EFI_SUCCESS MP was successfully initialized.
31 @retval others Error occurred in MP initialization.
32
33**/
34EFI_STATUS
35InitializeCpuMpWorker (
36 IN CONST EFI_PEI_SERVICES **PeiServices
37 )
38{
39 EFI_STATUS Status;
40
41 Status = MpInitLibInitialize ();
42 if (EFI_ERROR (Status)) {
43 return Status;
44 }
45
46 //
47 // Install CPU MP PPI
48 //
49 Status = PeiServicesInstallPpi (mPeiCpuMpPpiList);
50 ASSERT_EFI_ERROR (Status);
51
52 return Status;
53}
54
55/**
56 The Entry point of the MP CPU PEIM.
57
58 This function will wakeup APs and collect CPU AP count and install the
59 Mp Service Ppi.
60
61 @param FileHandle Handle of the file being invoked.
62 @param PeiServices Describes the list of possible PEI Services.
63
64 @retval EFI_SUCCESS MpServicePpi is installed successfully.
65
66**/
67EFI_STATUS
68EFIAPI
69CpuMpPeimInit (
70 IN EFI_PEI_FILE_HANDLE FileHandle,
71 IN CONST EFI_PEI_SERVICES **PeiServices
72 )
73{
74 EFI_STATUS Status;
75
76 Status = InitializeCpuMpWorker ((CONST EFI_PEI_SERVICES **)PeiServices);
77 ASSERT_EFI_ERROR (Status);
78
79 return Status;
80}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette