UefiCpuPkg: Add CPU Features PEI/DXE drivers

They will consume Register CPU Features library to detect and initialize CPU
features.

CpuFeaturesPei driver is used to initialize CPU features in PEI phase.
CpuFeaturesDxe driver is used to initialize CPU features in DXE phase.

Add PcdCpuFeaturesInitAfterSmmRelocation and PcdCpuFeaturesInitOnS3Resume
that consumed by CpuFeaturesPei and CpuFeaturesDxe.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@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>
This commit is contained in:
Jeff Fan
2017-03-07 19:23:12 +08:00
parent 0a70d1c304
commit 82e75ac65a
10 changed files with 399 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
## @file
# CPU Features DXE driver.
#
# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = CpuFeaturesDxe
MODULE_UNI_FILE = CpuFeaturesDxe.uni
FILE_GUID = 63EB1B62-10C9-4693-88AC-AE0999EA87F8
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = CpuFeaturesDxeInitialize
[Packages]
MdePkg/MdePkg.dec
UefiCpuPkg/UefiCpuPkg.dec
[LibraryClasses]
BaseLib
DebugLib
UefiLib
UefiDriverEntryPoint
UefiBootServicesTableLib
RegisterCpuFeaturesLib
[Sources]
CpuFeaturesDxe.c
[Guids]
gEdkiiCpuFeaturesInitDoneGuid ## PRODUCES
[Protocols]
gEfiSmmConfigurationProtocolGuid ## SOMETIME_CONSUMES
[Pcd]
gUefiCpuPkgTokenSpaceGuid.PcdCpuFeaturesInitAfterSmmRelocation ## CONSUMES
[Depex]
TRUE
[UserExtensions.TianoCore."ExtraFiles"]
CpuFeaturesDxeExtra.uni