]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/SmmCpuFeaturesLib/StandaloneMmCpuFeaturesLib.c
UefiCpuPkg/SmmCpuFeaturesLib: Add Standalone MM support
[mirror_edk2.git] / UefiCpuPkg / Library / SmmCpuFeaturesLib / StandaloneMmCpuFeaturesLib.c
1 /** @file
2 Standalone MM CPU specific programming.
3
4 Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) Microsoft Corporation.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #include <PiMm.h>
11 #include <Library/PcdLib.h>
12 #include "CpuFeaturesLib.h"
13
14 /**
15 Gets the maximum number of logical processors from the PCD PcdCpuMaxLogicalProcessorNumber.
16
17 This access is abstracted from the PCD services to enforce that the PCD be
18 FixedAtBuild in the Standalone MM build of this driver.
19
20 @return The value of PcdCpuMaxLogicalProcessorNumber.
21
22 **/
23 UINT32
24 GetCpuMaxLogicalProcessorNumber (
25 VOID
26 )
27 {
28 return FixedPcdGet32 (PcdCpuMaxLogicalProcessorNumber);
29 }
30
31 /**
32 The Standalone MM library constructor.
33
34 @param[in] ImageHandle Image handle of this driver.
35 @param[in] SystemTable A Pointer to the EFI System Table.
36
37 @retval EFI_SUCCESS This constructor always returns success.
38
39 **/
40 EFI_STATUS
41 EFIAPI
42 StandaloneMmCpuFeaturesLibConstructor (
43 IN EFI_HANDLE ImageHandle,
44 IN EFI_MM_SYSTEM_TABLE *SystemTable
45 )
46 {
47 CpuFeaturesLibInitialization ();
48
49 return EFI_SUCCESS;
50 }