From nobody Mon Sep 16 18:57:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+101521+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101521+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1679443024; cv=none; d=zohomail.com; s=zohoarc; b=DnlTkuouN9COw+Tz8lwHR51ud6Htg4KduzjyOiecXwlUUkGxtouXQGM1uwMnZgdzenHKoQEid5YIGMBmUUJzxOisEe0FteXDkApSrcXSfFcvNrGjv+EkFM+QTulMothGXQsJbEm0I7BhHfZeqvaNpAt7ZUNQ9tqhSkMpCDzmW/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679443024; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=fSCq26xCm0RYZorQmkCYqt+/XfNy+uRJH1Zcfx0V0Y8=; b=j7QwQQPX2Y2JI0S6TnyMXaJN4SV1Lx7kf3W0s1tTnD6S9whERQ8og3heDUlp6gdkvN51awDypujXIvoLf4CF/Zkg5q1Q0++Fxqi1DHWC1eglVUBysJ2oNGJIoZ7gUna124ucPoTwujAzz7/+vDQrMCTUOkxf7sFkF+KL9TjEn3c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101521+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1679443024944869.5529641137537; Tue, 21 Mar 2023 16:57:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZlukYY1788612xmxvjPcPxKL; Tue, 21 Mar 2023 16:57:04 -0700 X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.30790.1679443023738136787 for ; Tue, 21 Mar 2023 16:57:03 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="341441508" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="341441508" X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 16:56:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="805627733" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="805627733" X-Received: from shwdeopenlab706.ccr.corp.intel.com ([10.239.55.95]) by orsmga004.jf.intel.com with ESMTP; 21 Mar 2023 16:56:56 -0700 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Eric Dong , Rahul Kumar , Gerd Hoffmann , Michael D Kinney , Ahmad Anadani Subject: [edk2-devel] [PATCH 2/6] UefiCpuPkg/MtrrTest: Only claim CPUID max leaf as 1 Date: Wed, 22 Mar 2023 07:56:46 +0800 Message-Id: <20230321235650.675-3-ray.ni@intel.com> In-Reply-To: <20230321235650.675-1-ray.ni@intel.com> References: <20230321235650.675-1-ray.ni@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ray.ni@intel.com X-Gm-Message-State: 9JCxnTiy7OMAzSYxoTegGNf5x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1679443024; bh=dTYD02bZuPnI6eorS6NqAm8/uK25wLWZqQHuih98Rdk=; h=Cc:Date:From:Reply-To:Subject:To; b=f45ZU9+gEvVRnV0d50Zf0wzgVfoL0ZjbzvKbKFpipeow4hMZY/XlN/vtZdC63C7PC4b 5cTM0ReezqpMWqHCiULbeZWJWULm+kiIHzGhgq63a0zPlRA1HfpUTfSx/I4Nq8s6K/3j7 D/YtkXkfz9GnergEjatbtIs2IyoCU6xdZjg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1679443026866100006 Content-Type: text/plain; charset="utf-8" MtrrLib code queries the CPUID leaf 7h result if support. Update Test code temporary to claim the CPUID only supports max leaf as 1 so MtrrLib skips to query CPUID leaf 7h. Signed-off-by: Ray Ni Cc: Eric Dong Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Michael D Kinney Cc: Ahmad Anadani Reviewed-by: Michael D Kinney --- UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c b/UefiCpuPkg/Lib= rary/MtrrLib/UnitTest/Support.c index 748c403281..260966e7b6 100644 --- a/UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c +++ b/UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c @@ -1,7 +1,7 @@ /** @file Unit tests of the MtrrLib instance of the MtrrLib class =20 - Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
+ Copyright (c) 2018 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -122,6 +122,13 @@ UnitTestMtrrLibAsmCpuid ( ) { switch (Index) { + case CPUID_SIGNATURE: + if (Eax !=3D NULL) { + *Eax =3D CPUID_VERSION_INFO; + } + + return Index; + break; case CPUID_VERSION_INFO: if (Edx !=3D NULL) { *Edx =3D mCpuidVersionInfoEdx.Uint32; --=20 2.39.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101521): https://edk2.groups.io/g/devel/message/101521 Mute This Topic: https://groups.io/mt/97767968/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076= /xyzzy [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-