]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuCacheInfoLib: Add MpService dependency
authorLou, Yun <Yun.Lou@intel.com>
Tue, 2 Feb 2021 00:41:29 +0000 (08:41 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 3 Feb 2021 07:41:46 +0000 (07:41 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3190

Add MpService dependency to enforce the executability of CpuCacheInfoLib.

Signed-off-by: Jason Lou <yun.lou@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
UefiCpuPkg/Include/Library/CpuCacheInfoLib.h
UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf
UefiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.inf

index a23b8b12b5eedc4e538b1d06a300dec59344dd0f..a7f29b1887750e91140267eb636cc4a8a934121e 100644 (file)
@@ -59,8 +59,6 @@ typedef struct {
   @retval         EFI_INVALID_PARAMETER   CpuCacheInfo is NULL while CpuCacheInfoCount contains the value\r
                                           greater than zero.\r
   @retval         EFI_UNSUPPORTED         Processor does not support CPUID_CACHE_PARAMS Leaf.\r
-  @retval         EFI_NOT_FOUND           EDKII_PEI_MP_SERVICES2_PPI or EFI_MP_SERVICES_PROTOCOL interface\r
-                                          is not found.\r
   @retval         EFI_OUT_OF_RESOURCES    Required resources could not be allocated.\r
   @retval         EFI_BUFFER_TOO_SMALL    CpuCacheInfoCount is too small to hold the response CpuCacheInfo\r
                                           array. CpuCacheInfoCount has been updated with the length needed\r
index d1f9830c91e74b0b65b996b5e4cb583906a899c9..d46fb04258513960891d4ce2103386bb2afc58ef 100644 (file)
@@ -346,8 +346,6 @@ CpuCacheInfoCollectCpuCacheInfoData (
   @retval         EFI_INVALID_PARAMETER   CpuCacheInfo is NULL while CpuCacheInfoCount contains the value\r
                                           greater than zero.\r
   @retval         EFI_UNSUPPORTED         Processor does not support CPUID_CACHE_PARAMS Leaf.\r
-  @retval         EFI_NOT_FOUND           EDKII_PEI_MP_SERVICES2_PPI or EFI_MP_SERVICES_PROTOCOL interface\r
-                                          is not found.\r
   @retval         EFI_OUT_OF_RESOURCES    Required resources could not be allocated.\r
   @retval         EFI_BUFFER_TOO_SMALL    CpuCacheInfoCount is too small to hold the response CpuCacheInfo\r
                                           array. CpuCacheInfoCount has been updated with the length needed\r
@@ -384,10 +382,7 @@ GetCpuCacheInfo (
   //\r
   // Initialize COLLECT_CPUID_CACHE_DATA_CONTEXT.MpServices.\r
   //\r
-  Status = CpuCacheInfoGetMpServices (&Context.MpServices);\r
-  if (EFI_ERROR(Status)) {\r
-    return Status;\r
-  }\r
+  CpuCacheInfoGetMpServices (&Context.MpServices);\r
 \r
   NumberOfProcessors = CpuCacheInfoGetNumberOfProcessors (Context.MpServices);\r
 \r
index 1fd45380b871d449ac1a6750e8f76fe28b8758a2..c481080e49d8a340131a69ce2bff619d9feb781e 100644 (file)
@@ -40,4 +40,4 @@
 [Pcd]\r
 \r
 [Depex]\r
-  TRUE\r
+  gEfiMpServiceProtocolGuid\r
index c8aa33c95a8fc76d1f2ff9a92a1e3fce38d6ff12..0c73015cac8becd569e3fa8ff1e6af58b1edd9c8 100644 (file)
@@ -40,4 +40,4 @@
 [Pcd]\r
 \r
 [Depex]\r
-  TRUE\r
+  gEdkiiPeiMpServices2PpiGuid\r