Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol

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 <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
This commit is contained in:
Michael D Kinney 2019-05-08 15:19:35 -07:00
parent 24990e84d3
commit e5a0cf9125
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/**
Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
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);
//