From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.37665.1628865753910540035 for ; Fri, 13 Aug 2021 07:42:34 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: yun.lou@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10075"; a="202762584" X-IronPort-AV: E=Sophos;i="5.84,319,1620716400"; d="scan'208";a="202762584" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2021 07:42:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,319,1620716400"; d="scan'208";a="528588037" Received: from shwdeopenlab102.ccr.corp.intel.com ([10.239.183.74]) by fmsmga002.fm.intel.com with ESMTP; 13 Aug 2021 07:42:31 -0700 From: "Jason Lou" To: devel@edk2.groups.io Cc: Jason , Ray Ni , Eric Dong , Laszlo Ersek , Rahul Kumar Subject: [PATCH v2] UefiCpuPkg/CpuCacheInfoLib: Correct logical for identifying cache type Date: Fri, 13 Aug 2021 22:42:29 +0800 Message-Id: <20210813144229.6166-1-yun.lou@intel.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3265 Correct the logical for identifying "Direct mapped" cache type. Signed-off-by: Jason Lou Cc: Ray Ni Cc: Eric Dong Cc: Laszlo Ersek Cc: Rahul Kumar --- UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c b/UefiCpu= Pkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c index ae81ea9ce2..c0077d6770 100644 --- a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c +++ b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c @@ -237,7 +237,7 @@ CpuCacheInfoCollectCoreAndCacheData ( CacheData[CacheParamLeafIndex].CacheType =3D (UINT8)CacheP= aramEax.Bits.CacheType;=0D CacheData[CacheParamLeafIndex].CacheWays =3D (UINT16)Cache= ParamEbx.Bits.Ways;=0D CacheData[CacheParamLeafIndex].FullyAssociativeCache =3D (UINT8)CacheP= aramEax.Bits.FullyAssociativeCache;=0D - CacheData[CacheParamLeafIndex].DirectMappedCache =3D (UINT8)CacheP= aramEdx.Bits.ComplexCacheIndexing;=0D + CacheData[CacheParamLeafIndex].DirectMappedCache =3D (UINT8)(Cache= ParamEdx.Bits.ComplexCacheIndexing =3D=3D 0);=0D CacheData[CacheParamLeafIndex].CacheShareBits =3D (UINT16)Cache= ParamEax.Bits.MaximumAddressableIdsForLogicalProcessors;=0D CacheData[CacheParamLeafIndex].CacheSizeinKB =3D (CacheParamEb= x.Bits.Ways + 1) *=0D (CacheParamEbx.Bits.LinePartitions + 1) * (CacheParamEbx.Bits.Line= Size + 1) * (CacheParamEcx + 1) / SIZE_1KB;=0D --=20 2.28.0.windows.1