diff options
author | Star Zeng <star.zeng@intel.com> | 2019-07-10 19:40:05 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2019-07-11 17:40:28 +0800 |
commit | 7a0df266e5c58bac91dc21089b5b71ceb0dfa48f (patch) | |
tree | 4325571c8c0614bfe98e68ef86e526489aed05ae /UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c | |
parent | 28781fd52a966ad38e7cd65c5f7f81226f259ac2 (diff) | |
download | edk2-7a0df266e5c58bac91dc21089b5b71ceb0dfa48f.tar.gz edk2-7a0df266e5c58bac91dc21089b5b71ceb0dfa48f.tar.bz2 edk2-7a0df266e5c58bac91dc21089b5b71ceb0dfa48f.zip |
UefiCpuPkg RegisterCpuFeaturesLib: Fix an ASSERTION issue
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1968
We met assertion like below, it happens when there is only
one processor.
ASSERT_EFI_ERROR (Status = Not started)
ASSERT [CpuFeaturesDxe] X:\XXX\XXX\RegisterCpuFeaturesLib\
DxeRegisterCpuFeaturesLib.c(149): !EFI_ERROR (Status)
The code should not call StartupAllAPs when there is only one processor.
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Chandana Kumar <chandana.c.kumar@intel.com>
Cc: Kevin Li <kevin.y.li@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c')
-rw-r--r-- | UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c index 2b1553f9b8..8ad5a40e5a 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c @@ -273,10 +273,13 @@ CpuFeaturesInitialize ( // DXE type instance.
//
- //
- // Wakeup all APs for programming.
- //
- StartupAPsWorker (SetProcessorRegister, NULL);
+ if (CpuFeaturesData->NumberOfCpus > 1) {
+ //
+ // Wakeup all APs for programming.
+ //
+ StartupAPsWorker (SetProcessorRegister, NULL);
+ }
+
//
// Programming BSP
//
|