From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.270.1630448965569863863 for ; Tue, 31 Aug 2021 15:29:25 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: nathaniel.l.desimone@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10093"; a="218628813" X-IronPort-AV: E=Sophos;i="5.84,367,1620716400"; d="scan'208";a="218628813" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2021 15:29:24 -0700 X-IronPort-AV: E=Sophos;i="5.84,367,1620716400"; d="scan'208";a="466605709" Received: from nldesimo-desk1.amr.corp.intel.com ([10.212.163.217]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2021 15:29:24 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Isaac Oram , Liming Gao , Eric Dong , Ray Ni , Jack Lin Subject: [edk2-platforms] [PATCH V1] MinPlatformPkg: Fix Purley and Whitley builds Date: Tue, 31 Aug 2021 15:28:59 -0700 Message-Id: <20210831222859.4342-1-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit f4e12 causes a re-definition warning for the MAX_SOCKETS macro on PurleyOpenBoardPkg and WhitleyOpenBoardPkg. Cc: Chasel Chiu Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong Cc: Ray Ni Cc: Jack Lin Signed-off-by: Nate DeSimone --- .../Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c index c03d899163..9a3a6437eb 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c @@ -7,7 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "AcpiPlatform.h" -#define MAX_SOCKET (FixedPcdGet32 (PcdMaxCpuSocketCount)) #pragma pack(1) @@ -213,7 +212,7 @@ SortCpuLocalApicInTable ( CpuIdMapPtr->SocketNum = (UINT32)-1; } //end if PROC ENABLE } //end for CurrentProcessor - + //keep for debug purpose DEBUG ((DEBUG_INFO, "::ACPI:: APIC ID Order Table Init. CoreThreadMask = %x, mNumOfBitShift = %x\n", CoreThreadMask, mNumOfBitShift)); DebugDisplayReOrderTable (TempCpuApicIdOrderTable); @@ -244,7 +243,7 @@ SortCpuLocalApicInTable ( } // - // 1. Sort TempCpuApicIdOrderTable, + // 1. Sort TempCpuApicIdOrderTable, // sort it by using ApicId from minimum to maximum (Socket0 to SocketN), and the BSP must in the fist location of the table. // So, start sorting the table from the second element and total elements are mNumberOfCpus-1. // @@ -283,7 +282,7 @@ SortCpuLocalApicInTable ( // // 5. Re-assigen AcpiProcessorId for AcpiProcessorUId uses purpose. // - for (Socket = 0; Socket < MAX_SOCKET; Socket++) { + for (Socket = 0; Socket < FixedPcdGet32 (PcdMaxCpuSocketCount); Socket++) { for (CurrProcessor = 0, Index = 0; CurrProcessor < mNumberOfCpus; CurrProcessor++) { if (mCpuApicIdOrderTable[CurrProcessor].Flags && (mCpuApicIdOrderTable[CurrProcessor].SocketNum == Socket)) { mCpuApicIdOrderTable[CurrProcessor].AcpiProcessorId = (ProcessorInfoBuffer.Location.Package << mNumOfBitShift) + Index; -- 2.27.0.windows.1