From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.4523.1677720426309381617 for ; Wed, 01 Mar 2023 17:27:06 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=X0iVzTED; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: zhiguang.liu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677720426; x=1709256426; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=RNnVnEKVdJk95e0IYCDgWRXHqydt0nn2bbzk5YUSr3c=; b=X0iVzTEDVHAKTSKgTAxa/lMjb4YXZIQAwNFHKUCs6/Es3pn951HHH/or Zq/iKJoJXFu1con+o9a/SaQDckoE86t+/TjQeEuAXCz1FgnPBcaLRzDpQ x0Mm/atTruW2C2//3+w6jBcTF0vHJdQkdwSF0PG7SifxCapsdnVf1/Cdp HSzoavBR5JjhkTGmTR4sBp5RNz/q2a+CsfaGLF2u1KavX4FB8uiccOYG3 VAzWwXaMfe8YSrQk2S/CqeTmaIq8b/gOBe5L/sLEzNsr+uLWzmmlw2iKI CQDputX/q6Jq0KbEBq/3VWfOLDoXHXz27O2QtMVMUbElLYIkla8h97bGg A==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="336875659" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="336875659" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 17:27:05 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="848891040" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="848891040" Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.151]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 17:27:03 -0800 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Zhiguang Liu , Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [PATCH] UefiCpuPkg: Calculate DisplayFamily correctly Date: Thu, 2 Mar 2023 09:26:49 +0800 Message-Id: <20230302012649.1512-1-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4238 Per SDM, DisplayFamily = Extended_Family_ID + Family_ID. Correct the related code. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Zhiguang Liu --- UefiCpuPkg/Application/Cpuid/Cpuid.c | 4 ++-- .../Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UefiCpuPkg/Application/Cpuid/Cpuid.c b/UefiCpuPkg/Application/Cpuid/Cpuid.c index 372c6ef87d..51c463fb10 100644 --- a/UefiCpuPkg/Application/Cpuid/Cpuid.c +++ b/UefiCpuPkg/Application/Cpuid/Cpuid.c @@ -1,7 +1,7 @@ /** @file UEFI Application to display CPUID leaf information. - Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -217,7 +217,7 @@ CpuidVersionInfo ( DisplayFamily = Eax.Bits.FamilyId; if (Eax.Bits.FamilyId == 0x0F) { - DisplayFamily |= (Eax.Bits.ExtendedFamilyId << 4); + DisplayFamily += Eax.Bits.ExtendedFamilyId; } DisplayModel = Eax.Bits.Model; diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c index a8e4f920fc..25b8958252 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.
+ Copyright (c) 2017 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -67,7 +67,7 @@ FillProcessorInfo ( DisplayedFamily = Eax.Bits.FamilyId; if (Eax.Bits.FamilyId == 0x0F) { - DisplayedFamily |= (Eax.Bits.ExtendedFamilyId << 4); + DisplayedFamily += Eax.Bits.ExtendedFamilyId; } DisplayedModel = Eax.Bits.Model; -- 2.31.1.windows.1