From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) Received: from mga12.intel.com (mga12.intel.com []) by groups.io with SMTP; Wed, 08 May 2019 21:31:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 21:31:16 -0700 X-ExtLoop1: 1 Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.98.74]) by orsmga004.jf.intel.com with ESMTP; 08 May 2019 21:31:16 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol Date: Wed, 8 May 2019 21:30:59 -0700 Message-Id: <20190509043111.15272-5-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190509043111.15272-1-michael.d.kinney@intel.com> References: <20190509043111.15272-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The NumberOfEnabledProcessors parameter to the MP Services Protocol service GetNumberOfProcessors() is not optional and is not allowed to be NULL. Add the CpuEnabledCount local variable and pass it into GetNumberOfProcessors(). Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c index 28de8457ce..3583e324e6 100644 --- a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c +++ b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c @@ -1,5 +1,5 @@ /** - Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -40,6 +40,7 @@ PpmPolicyEntry( EFI_HANDLE Handle; EFI_STATUS Status; UINTN CpuCount; + UINTN CpuEnabledCount; UINT8 CPUMobileFeature; PCH_STEPPING Stepping; @@ -63,7 +64,7 @@ PpmPolicyEntry( // // Get processor count from MP service. // - Status = MpService->GetNumberOfProcessors (MpService, &CpuCount, NULL); + Status = MpService->GetNumberOfProcessors (MpService, &CpuCount, &CpuEnabledCount); ASSERT_EFI_ERROR (Status); // -- 2.21.0.windows.1