[edk2-devel] [edk2-platforms] [PATCH V1] MinPlatformPkg: Fix Purley and Whitley builds

Nate DeSimone posted 1 patch 2 years, 7 months ago
Failed in applying to current master (apply log)
.../Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c    | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
[edk2-devel] [edk2-platforms] [PATCH V1] MinPlatformPkg: Fix Purley and Whitley builds
Posted by Nate DeSimone 2 years, 7 months ago
Commit f4e12 causes a re-definition warning
for the MAX_SOCKETS macro on PurleyOpenBoardPkg
and WhitleyOpenBoardPkg.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jack Lin <JackX.Lin@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 .../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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80034): https://edk2.groups.io/g/devel/message/80034
Mute This Topic: https://groups.io/mt/85288718/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-platforms] [PATCH V1] MinPlatformPkg: Fix Purley and Whitley builds
Posted by Oram, Isaac W 2 years, 7 months ago
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>

-----Original Message-----
From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com> 
Sent: Tuesday, August 31, 2021 3:29 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Lin, JackX <jackx.lin@intel.com>
Subject: [edk2-platforms] [PATCH V1] MinPlatformPkg: Fix Purley and Whitley builds

Commit f4e12 causes a re-definition warning for the MAX_SOCKETS macro on PurleyOpenBoardPkg and WhitleyOpenBoardPkg.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jack Lin <JackX.Lin@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 .../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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80037): https://edk2.groups.io/g/devel/message/80037
Mute This Topic: https://groups.io/mt/85288718/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-