diff options
author | Liu, Zhiguang <Zhiguang.Liu@intel.com> | 2023-03-07 14:31:36 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-03-07 10:42:38 +0000 |
commit | aa1cd447b346e8cc8141df2fe2d321b032c08acb (patch) | |
tree | 1b3472e72042717c0de1cd21a44a7a4785352842 /UefiCpuPkg/Library | |
parent | f335d91a3bfe47de702af564eb3661ab8906d1be (diff) | |
download | edk2-aa1cd447b346e8cc8141df2fe2d321b032c08acb.tar.gz edk2-aa1cd447b346e8cc8141df2fe2d321b032c08acb.tar.bz2 edk2-aa1cd447b346e8cc8141df2fe2d321b032c08acb.zip |
UefiCpuPkg: Calculate DisplayFamily correctly
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4348
Per SDM:
DisplayFamily = Extended_Family_ID + Family_ID.
DisplayModelID = (Extended_Model_ID << 4) + Family_ID.
Correct the related code.
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Cc: Mike Maslenkin <mike.maslenkin@gmail.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library')
-rw-r--r-- | UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c index a8e4f920fc..552fdab417 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c @@ -1,7 +1,7 @@ /** @file
CPU Features Initialize functions.
- Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2023, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -67,12 +67,12 @@ FillProcessorInfo ( DisplayedFamily = Eax.Bits.FamilyId;
if (Eax.Bits.FamilyId == 0x0F) {
- DisplayedFamily |= (Eax.Bits.ExtendedFamilyId << 4);
+ DisplayedFamily += Eax.Bits.ExtendedFamilyId;
}
DisplayedModel = Eax.Bits.Model;
if ((Eax.Bits.FamilyId == 0x06) || (Eax.Bits.FamilyId == 0x0f)) {
- DisplayedModel |= (Eax.Bits.ExtendedModelId << 4);
+ DisplayedModel += (Eax.Bits.ExtendedModelId << 4);
}
CpuInfo->DisplayFamily = DisplayedFamily;
|