From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by mx.groups.io with SMTP id smtpd.web11.30774.1678101250520962429 for ; Mon, 06 Mar 2023 03:14:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QyiHSxEU; spf=pass (domain: gmail.com, ip: 209.85.128.172, mailfrom: mike.maslenkin@gmail.com) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-536b7ffdd34so177195707b3.6 for ; Mon, 06 Mar 2023 03:14:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678101249; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=owkew2RRCYrtH5z3JK3P1JAy7Ajbr2RITIyoi3S0ens=; b=QyiHSxEU3WafWuA6Ao2emw7ZKlYbpgMpud7xc0ivSUZQLmlf2EOUuPvfiYnRvJlbkX /n2XaizLmr2z9baYFvRh4g7Z1Q6tC89J6fMRfcBbrO5i7iFk7+Bl2TLOwZZhlKjs3lDD 71hR6w6fzvg8TwT6ZvOebPidsY3I7UzKlUwig7WQdSTnG6cBpjoTFf9Ob3ErnVKGNG2d wHIhmOnHjkXDCcD9R2jg67s7B/Wqj03R+9X5UedjRgq2eDRk7tg/nuyeB59vUUFu/nfV 201QV/3IfsBp0wi2e+YVcFq93w+AqfIzWUWQOGJx4PxatVdqPKCZPD2ijUM3HxUIU7oF Pg3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678101249; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=owkew2RRCYrtH5z3JK3P1JAy7Ajbr2RITIyoi3S0ens=; b=s8tDyRPRyvG96iep4pqz4tXqbscsyLQIerz4e79JekpponBcmtWsYWSzGB64E1JRAE 4MZeB90W+Mp+8ZApQnwCiBQm0VYeIPwMX533RHmBg1Sv2obMstsW3SrbWyUPyBeCqq7E +UhTw2j6rA0MvRHRDq5puO6lkQr3wMgXZkdt5owjeXIYpyqpmFYVCMVuBmZ5I1s1cshK GqapMRzONfyJBlZ49QZezeedt0x2F+Dp6jsN6ImHE4w/zH5RXgzGxaHA4OzQvcCIjwo5 Tc+owiLbex3j9uuesv1dDsajGur6syOJ/AqjMCLcPJr+PCJfnJYT2WMpgPpZYFjlqn/y qadw== X-Gm-Message-State: AO0yUKUUmJRogRWkCFoUJ53uheNwt4Sly2cJbQog/KoT3lVwdBvbU53v +roqS0A2Aide64IFOybz87zB3z51EUm2st+npP5WaeUM7uXihnK3 X-Google-Smtp-Source: AK7set+5QaBhv3G+sg6VaIPNAFmQRY/WMrn5qy3ysFM+ztuhnrqosff1mLhkpvlkWBhekiocl1TXFiUG/AhCqRowHKM= X-Received: by 2002:a81:af5d:0:b0:52a:9eac:92b with SMTP id x29-20020a81af5d000000b0052a9eac092bmr6742204ywj.4.1678101249643; Mon, 06 Mar 2023 03:14:09 -0800 (PST) MIME-Version: 1.0 References: <20230302012649.1512-1-zhiguang.liu@intel.com> <1749CE106AC7BFA5.3736@groups.io> In-Reply-To: From: "Mike Maslenkin" Date: Mon, 6 Mar 2023 14:13:33 +0300 Message-ID: Subject: Re: [edk2-devel] [PATCH] UefiCpuPkg: Calculate DisplayFamily correctly To: devel@edk2.groups.io, star.zeng@intel.com Cc: "Liu, Zhiguang" , "Dong, Eric" , "Ni, Ray" , "Kumar, Rahul R" , Gerd Hoffmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Handling of ExtendedModelId field has the same problem. This patch could be improved to fix that too. On Mon, Mar 6, 2023 at 1:37=E2=80=AFPM Zeng, Star wro= te: > > BTW, look like wrong Bugzilla ID is used in commit message, please correc= t it when merging the patch. > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Zeng, Star > Sent: Monday, March 6, 2023 6:35 PM > To: devel@edk2.groups.io; Liu, Zhiguang > Cc: Dong, Eric ; Ni, Ray ; Kumar, = Rahul R ; Gerd Hoffmann ; Zeng,= Star > Subject: Re: [edk2-devel] [PATCH] UefiCpuPkg: Calculate DisplayFamily cor= rectly > > Reviewed-by: Star Zeng > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Zhiguang L= iu > Sent: Thursday, March 2, 2023 9:27 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Dong, Eric ; Ni, Ray ; Kumar, Rahul R ; = Gerd Hoffmann > Subject: [edk2-devel] [PATCH] UefiCpuPkg: Calculate DisplayFamily correct= ly > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4238 > > Per SDM, DisplayFamily =3D 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/Applicatio= n/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 =3D Eax.Bits.FamilyId; > if (Eax.Bits.FamilyId =3D=3D 0x0F) { > - DisplayFamily |=3D (Eax.Bits.ExtendedFamilyId << 4); > + DisplayFamily +=3D Eax.Bits.ExtendedFamilyId; > } > > DisplayModel =3D Eax.Bits.Model; > diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitial= ize.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 =3D Eax.Bits.FamilyId; > if (Eax.Bits.FamilyId =3D=3D 0x0F) { > - DisplayedFamily |=3D (Eax.Bits.ExtendedFamilyId << 4); > + DisplayedFamily +=3D Eax.Bits.ExtendedFamilyId; > } > > DisplayedModel =3D Eax.Bits.Model; > -- > 2.31.1.windows.1 > > > > > > > > > > > > > >=20 > >