public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"abdattar@amd.com" <abdattar@amd.com>
Cc: "Chiu, Chasel" <chasel.chiu@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	"Dong, Eric" <eric.dong@intel.com>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v1 2/2] MinPlatformPkg: AcpiProcessorUid for multi-socket
Date: Wed, 27 Oct 2021 08:16:47 +0000	[thread overview]
Message-ID: <MW4PR11MB5821A9CC017371B8ABC73054CD859@MW4PR11MB5821.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211022144746.10671-3-abdattar@amd.com>

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abdul Lateef Attar via groups.io
Sent: Friday, October 22, 2021 7:48 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
Subject: [edk2-devel] [edk2-platforms] [PATCH v1 2/2] MinPlatformPkg: AcpiProcessorUid for multi-socket

Corrects the AcpiProcessorUid for Multi socket/package.

The ProcessorInfoBuffer.Location.Package holds the stale entry of the last processor. In multi-socket system it holds the Socket/Package number of last socket/package, resulting wrong AcpiProcessorUid assignment for socket 0 processors.

Hence do the bit shift on stored SocketNum.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Abdul Lateef Attar <abdattar@amd.com>
---
 Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 032903029a95..785cf4c2f911 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -287,7 +287,7 @@ SortCpuLocalApicInTable (
   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 = (ProcessorInfoBuffer.Location.Package << mNumOfBitShift) + Index;

+        mCpuApicIdOrderTable[CurrProcessor].AcpiProcessorUid = 
+ (mCpuApicIdOrderTable[CurrProcessor].SocketNum << mNumOfBitShift) + 
+ Index;

         Index++;

       }

     }

--
2.25.1







  reply	other threads:[~2021-10-27  8:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 14:47 [edk2-[PATCH v1 0/2] APIC table updates Abdul Lateef Attar
2021-10-22 14:47 ` [edk2-platforms] [PATCH v1 1/2] MinPlatformPkg: Update APIC Table based on mode Abdul Lateef Attar
2021-10-27  8:16   ` [edk2-devel] " Nate DeSimone
2021-10-27 16:33     ` Attar, AbdulLateef (Abdul Lateef)
2021-10-28  2:48       ` Nate DeSimone
2021-10-28 12:50         ` Attar, AbdulLateef (Abdul Lateef)
2021-10-29 21:59           ` Nate DeSimone
2021-10-22 14:47 ` [edk2-platforms] [PATCH v1 2/2] MinPlatformPkg: AcpiProcessorUid for multi-socket Abdul Lateef Attar
2021-10-27  8:16   ` Nate DeSimone [this message]
2021-10-27  8:16 ` [edk2-[PATCH v1 0/2] APIC table updates Nate DeSimone
2021-10-28  4:05   ` Attar, AbdulLateef (Abdul Lateef)
2021-11-02 21:42 ` Nate DeSimone

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=MW4PR11MB5821A9CC017371B8ABC73054CD859@MW4PR11MB5821.namprd11.prod.outlook.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