From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.14856.1630317359714310170 for ; Mon, 30 Aug 2021 02:56:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: jackx.lin@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10091"; a="198482682" X-IronPort-AV: E=Sophos;i="5.84,363,1620716400"; d="scan'208";a="198482682" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 02:55:58 -0700 X-IronPort-AV: E=Sophos;i="5.84,363,1620716400"; d="scan'208";a="427785691" Received: from lins2x-mobl1.gar.corp.intel.com ([10.213.37.126]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 02:55:55 -0700 From: "JackX Lin" To: devel@edk2.groups.io Cc: Chasel Chiu , Dong Eric , Jiewen Yao , Ray Ni , Rangasai V Chaganty , Donald Kuo , Chandana C Kumar Subject: [edk2-platforms:PATCH V1] Platform/Intel: Fix macro re-defined Date: Mon, 30 Aug 2021 17:55:46 +0800 Message-Id: <20210830095546.795-1-JackX.Lin@intel.com> X-Mailer: git-send-email 2.32.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3365 Check MAX_SOCKET exists before its creation. Signed-off-by: JackX Lin Cc: Chasel Chiu Cc: Dong Eric Cc: Jiewen Yao Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Donald Kuo Cc: Chandana C Kumar Cc: JackX Lin --- Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c index c03d899163..5a11f426ec 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c @@ -7,7 +7,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "AcpiPlatform.h" +#ifndef MAX_SOCKET #define MAX_SOCKET (FixedPcdGet32 (PcdMaxCpuSocketCount)) +#endif #pragma pack(1) @@ -213,7 +215,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 +246,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. // -- 2.32.0.windows.2