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.web10.29838.1612157759494363449 for ; Sun, 31 Jan 2021 21:35:59 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: yun.lou@intel.com) IronPort-SDR: 6pc4EZd8LauAFG0OaJIgdMrFfozCV7mFgC+9v4A1VMnWbGTIK+t68SJsISroJpQJbRBuibOVwV 1sH6ff1FoEXw== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="167740406" X-IronPort-AV: E=Sophos;i="5.79,391,1602572400"; d="scan'208";a="167740406" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2021 21:35:57 -0800 IronPort-SDR: Js4D0aLEY6Tbkgds6BLoYxz23iKIlPyw8ve6Q3p0fDQ+JE0JGtYXHCHopVCVDcBIoGCpm8vP91 vL4Fg47XDICA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,391,1602572400"; d="scan'208";a="368971440" Received: from shwdeopenlab102.ccr.corp.intel.com ([10.239.183.61]) by fmsmga008.fm.intel.com with ESMTP; 31 Jan 2021 21:35:55 -0800 From: "Jason Lou" To: devel@edk2.groups.io Cc: Jason , Ray Ni , Eric Dong , Laszlo Ersek , Rahul Kumar Subject: [PATCH v1 1/1] UefiCpuPkg/CpuCacheInfoLib: Add more dependency of CpuCacheInfoLib Date: Mon, 1 Feb 2021 13:35:51 +0800 Message-Id: <20210201053551.5232-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=3D3190 Add more dependency to enforce the executability of CpuCacheInfoLib. Signed-off-by: Jason Lou Cc: Ray Ni Cc: Eric Dong Cc: Laszlo Ersek Cc: Rahul Kumar --- UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c | 7 +------ UefiCpuPkg/Include/Library/CpuCacheInfoLib.h | 2 -- UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf | 2 +- UefiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.inf | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c b/UefiCpu= Pkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c index d1f9830c91e7..d46fb0425851 100644 --- a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c +++ b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c @@ -346,8 +346,6 @@ CpuCacheInfoCollectCpuCacheInfoData ( @retval EFI_INVALID_PARAMETER CpuCacheInfo is NULL while CpuCa= cheInfoCount contains the value=0D greater than zero.=0D @retval EFI_UNSUPPORTED Processor does not support CPUID= _CACHE_PARAMS Leaf.=0D - @retval EFI_NOT_FOUND EDKII_PEI_MP_SERVICES2_PPI or EF= I_MP_SERVICES_PROTOCOL interface=0D - is not found.=0D @retval EFI_OUT_OF_RESOURCES Required resources could not be = allocated.=0D @retval EFI_BUFFER_TOO_SMALL CpuCacheInfoCount is too small t= o hold the response CpuCacheInfo=0D array. CpuCacheInfoCount has bee= n updated with the length needed=0D @@ -384,10 +382,7 @@ GetCpuCacheInfo ( //=0D // Initialize COLLECT_CPUID_CACHE_DATA_CONTEXT.MpServices.=0D //=0D - Status =3D CpuCacheInfoGetMpServices (&Context.MpServices);=0D - if (EFI_ERROR(Status)) {=0D - return Status;=0D - }=0D + CpuCacheInfoGetMpServices (&Context.MpServices);=0D =0D NumberOfProcessors =3D CpuCacheInfoGetNumberOfProcessors (Context.MpServ= ices);=0D =0D diff --git a/UefiCpuPkg/Include/Library/CpuCacheInfoLib.h b/UefiCpuPkg/Incl= ude/Library/CpuCacheInfoLib.h index a23b8b12b5ee..a7f29b188775 100644 --- a/UefiCpuPkg/Include/Library/CpuCacheInfoLib.h +++ b/UefiCpuPkg/Include/Library/CpuCacheInfoLib.h @@ -59,8 +59,6 @@ typedef struct { @retval EFI_INVALID_PARAMETER CpuCacheInfo is NULL while CpuCa= cheInfoCount contains the value=0D greater than zero.=0D @retval EFI_UNSUPPORTED Processor does not support CPUID= _CACHE_PARAMS Leaf.=0D - @retval EFI_NOT_FOUND EDKII_PEI_MP_SERVICES2_PPI or EF= I_MP_SERVICES_PROTOCOL interface=0D - is not found.=0D @retval EFI_OUT_OF_RESOURCES Required resources could not be = allocated.=0D @retval EFI_BUFFER_TOO_SMALL CpuCacheInfoCount is too small t= o hold the response CpuCacheInfo=0D array. CpuCacheInfoCount has bee= n updated with the length needed=0D diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf b/Ue= fiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf index 1fd45380b871..c481080e49d8 100644 --- a/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf +++ b/UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf @@ -40,4 +40,4 @@ [Protocols] [Pcd]=0D =0D [Depex]=0D - TRUE=0D + gEfiMpServiceProtocolGuid=0D diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.inf b/Ue= fiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.inf index c8aa33c95a8f..0c73015cac8b 100644 --- a/UefiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.inf +++ b/UefiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.inf @@ -40,4 +40,4 @@ [Ppis] [Pcd]=0D =0D [Depex]=0D - TRUE=0D + gEdkiiPeiMpServices2PpiGuid=0D --=20 2.28.0.windows.1