In current implementation, CPU initialized can be done in PEI or DXE phase. PEI uses CpuFeaturesPei and Dxe uses CpuFeaturesDxe. If CPU initialized in PEI phase, CpuFeaturesDxe driver will not be used. This driver will install gEdkiiCpuFeaturesInitDoneGuid protocol after it initializes the CPU. Some drivers depend on this protocol to dispatch themselves. If CpuFeaturesDxe not been used, these drivers will not be dispatched. This patch fix the above issue. If Cpu initialized in PEI phase, it also report a guid HOB for CpuFeaturesDxe. CpuFeaturesDxe will check this HOB first. If it found this HOB, it just install gEdkiiCpuFeaturesInitDoneGuid protocol, else it will also do the CPU initialization. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
55 lines
1.5 KiB
INI
55 lines
1.5 KiB
INI
## @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
|
|
HobLib
|
|
|
|
[Sources]
|
|
CpuFeaturesDxe.c
|
|
|
|
[Guids]
|
|
gEdkiiCpuFeaturesInitDoneGuid ## PRODUCES ## UNDEFINED # protocol GUID installed
|
|
|
|
[Protocols]
|
|
gEfiSmmConfigurationProtocolGuid ## NOTIFY
|
|
|
|
[Pcd]
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuFeaturesInitAfterSmmRelocation ## CONSUMES
|
|
|
|
[Depex]
|
|
TRUE
|
|
|
|
[UserExtensions.TianoCore."ExtraFiles"]
|
|
CpuFeaturesDxeExtra.uni
|