public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "JackX Lin" <JackX.Lin@intel.com>
To: devel@edk2.groups.io
Cc: JackX Lin <jackx.lin@intel.com>, JackX Lin <JackX.Lin@intel.com>,
	Chasel Chiu <chasel.chiu@intel.com>,
	Dong Eric <eric.dong@intel.com>,
	Jiewen Yao <jiewen.yao@intel.com>, Ray Ni <ray.ni@intel.com>,
	Rangasai V Chaganty <rangasai.v.chaganty@intel.com>,
	Donald Kuo <Donald.Kuo@intel.com>,
	Chandana C Kumar <chandana.c.kumar@intel.com>
Subject: [edk2-platforms: PATCH] Modify processor _UID ordering by CPU default fused in MADT
Date: Wed, 27 Jul 2022 14:11:49 +0800	[thread overview]
Message-ID: <20220727061149.1495-1-jackx.lin@intel.com> (raw)

BIOS should not reordering cpu processor_uid

Signed-off-by: JackX Lin <JackX.Lin@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Dong Eric <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Donald Kuo <Donald.Kuo@intel.com>
Cc: Chandana C Kumar <chandana.c.kumar@intel.com>
Cc: JackX Lin <JackX.Lin@intel.com>
---
 Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index c7e87cbd7d..f4c45336c5 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -173,7 +173,6 @@ SortCpuLocalApicInTable (
   EFI_CPU_ID_ORDER_MAP                      *CpuIdMapPtr;
   UINT32                                    CoreThreadMask;
   EFI_CPU_ID_ORDER_MAP                      *TempCpuApicIdOrderTable;
-  UINT32                                    Socket;
 
   Index      = 0;
   Status     = EFI_SUCCESS;
@@ -198,6 +197,7 @@ SortCpuLocalApicInTable (
       CpuIdMapPtr->Thread  = ProcessorInfoBuffer.Location.Thread;
       CpuIdMapPtr->Flags   = ((ProcessorInfoBuffer.StatusFlag & PROCESSOR_ENABLED_BIT) != 0);
       CpuIdMapPtr->SocketNum = ProcessorInfoBuffer.Location.Package;
+      CpuIdMapPtr->AcpiProcessorUid = (ProcessorInfoBuffer.Location.Package << mNumOfBitShift) + CurrProcessor;
 
       //update processorbitMask
       if (CpuIdMapPtr->Flags == 1) {
@@ -280,18 +280,6 @@ SortCpuLocalApicInTable (
     }
   }
 
-  //
-  // 5. Re-assign AcpiProcessorId for AcpiProcessorUid uses purpose.
-  //
-  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].AcpiProcessorUid = (mCpuApicIdOrderTable[CurrProcessor].SocketNum << mNumOfBitShift) + Index;
-        Index++;
-      }
-    }
-  }
-
   //keep for debug purpose
   DEBUG ((DEBUG_INFO, "APIC ID Order Table ReOrdered\n"));
   DebugDisplayReOrderTable (mCpuApicIdOrderTable);
-- 
2.32.0.windows.2


             reply	other threads:[~2022-07-27  6:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27  6:11 JackX Lin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-28  7:24 [edk2-platforms:PATCH] Modify processor _UID ordering by CPU default fused in MADT JackX Lin
2022-08-01  3:02 ` Donald Kuo
2022-08-02 16:37 ` Kumar, Chandana C
2022-08-05  6:42 ` Ni, Ray
2022-08-08  8:19   ` JackX Lin
2022-08-08  8:21 [edk2-platforms: PATCH] " JackX Lin
2022-08-09  7:12 ` Ni, Ray
2022-08-09  7:52   ` Donald Kuo
2022-08-10  3:47 ` Ni, Ray
2022-08-10  3:51   ` JackX Lin
2022-08-10  3:52     ` Ni, Ray
2022-08-10  4:32     ` JackX Lin
2022-08-10  5:09       ` Ni, Ray
2022-08-10  4:28 JackX Lin
2022-08-10  5:06 ` Ni, Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220727061149.1495-1-jackx.lin@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox