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.web10.30790.1679443023738136787 for ; Tue, 21 Mar 2023 16:57:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=UhI7Mgz6; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679443023; x=1710979023; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FWiaPmdlvPl0vpgmhbM/eI3aap1T2dOa3M1hV2TYdIo=; b=UhI7Mgz6vjRzT03qAeJaPyzthf1hDtN9RS0yPlY3I3+RPJ3I7lRPB/7S p5kCM0NgAtnEyXGSk/ASrocZ5fQ9fjEs1y+P7h1t0m0ywuS2cdEuli9tC mnWSo0itNXpCkyYu6bMs+lvSf1sccEdHl2EQqPYcLSEuYAWmyfssLlLn5 /B+DV4ZRlnnR7Yi8G+nYkmRaF4Smg9jKgBkG+wOYVxmqkCY8CL1pPE0jz FdUJPtel+6+3yokTTWLgB5Prl2OW2D6BN0BPZFJu2mYO4gCGLCL87Prab Kclr+8FaPG3iJ5LkH4lmLWcrUJIkyN9QkL7DbpqSoI0kPhlfcNRU2DQMz g==; 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" 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" 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: [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> X-Mailer: git-send-email 2.39.1.windows.1 In-Reply-To: <20230321235650.675-1-ray.ni@intel.com> References: <20230321235650.675-1-ray.ni@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- 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=0D Unit tests of the MtrrLib instance of the MtrrLib class=0D =0D - Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
=0D + Copyright (c) 2018 - 2023, Intel Corporation. All rights reserved.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -122,6 +122,13 @@ UnitTestMtrrLibAsmCpuid ( )=0D {=0D switch (Index) {=0D + case CPUID_SIGNATURE:=0D + if (Eax !=3D NULL) {=0D + *Eax =3D CPUID_VERSION_INFO;=0D + }=0D +=0D + return Index;=0D + break;=0D case CPUID_VERSION_INFO:=0D if (Edx !=3D NULL) {=0D *Edx =3D mCpuidVersionInfoEdx.Uint32;=0D --=20 2.39.1.windows.1