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.web11.23947.1658949182778408640 for ; Wed, 27 Jul 2022 12:13:02 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=eCcRqbd+; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: ankit.sinha@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658949182; x=1690485182; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=T9hCwxjZkqG+ZlywbC42UCIJVG6Yk/Oxnpx4i8IPM04=; b=eCcRqbd+ULWYFalc8GGSRd2yruAdTWLndmZfB23BeyKLugKoedD6dB7L JNkHUweM8r/yelzz8lDS+sLyi2uc3QYPfznJSO0usk0jH+iS56B1fasJR eto1EjcgbqBpknKv+3dEkYT5KCv6E8Y5KhA4Q5EiO/SrSvtMra/Ggb3ES 1qPYir0ZXdNNd4bmT4Piamwxo1m2uoZgtNF3UCpzYgjibgLEOTja/njts 7Dvc+PU3vhOQt8yKLScTdm1rkBEPvLpVbOxZA+b7kcPRhMRUHAv5WJ+Cd OMWhkPW5BNNwD683Edytidxx7VUdEIjv25x7jSuKjplK/ar/W3wrOs56y Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="268707163" X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="268707163" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 12:13:02 -0700 X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="597532497" Received: from ankitsin-mobl4.amr.corp.intel.com ([10.209.124.186]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 12:13:01 -0700 From: "Sinha, Ankit" To: devel@edk2.groups.io Cc: Nate DeSimone , Isaac Oram , Eric Dong Subject: [edk2-devel][edk2-platforms][PATCH V2 1/1] MinPlatformPkg: AcpiTables: Add additional thread mapping in MADT Date: Wed, 27 Jul 2022 12:12:53 -0700 Message-Id: <20220727191253.488-1-ankit.sinha@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Adding second, third and fourth thread mapping to MADT Cc: Nate DeSimone Cc: Isaac Oram Cc: Eric Dong Signed-off-by: Ankit Sinha --- Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c index c7e87cbd7d9d..524f9914b0b1 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c @@ -261,7 +261,7 @@ SortCpuLocalApicInTable ( } // - // 3. Sort and map the second threads to the middle of the CpuApicIdOrderTable + // 3. Sort and map the second, third and fourth threads to the middle of the CpuApicIdOrderTable // for (Index = 0; Index < mNumberOfCpus; Index++) { if ((TempCpuApicIdOrderTable[Index].Thread) == 1) { //second thread @@ -270,6 +270,20 @@ SortCpuLocalApicInTable ( } } + for (Index = 0; Index < mNumberOfCpus; Index++) { + if ((TempCpuApicIdOrderTable[Index].Thread) == 2) { // third thread + CopyMem (&mCpuApicIdOrderTable[CurrProcessor], &TempCpuApicIdOrderTable[Index], sizeof (EFI_CPU_ID_ORDER_MAP)); + CurrProcessor++; + } + } + + for (Index = 0; Index < mNumberOfCpus; Index++) { + if ((TempCpuApicIdOrderTable[Index].Thread) == 3) { // fourth thread + CopyMem (&mCpuApicIdOrderTable[CurrProcessor], &TempCpuApicIdOrderTable[Index], sizeof (EFI_CPU_ID_ORDER_MAP)); + CurrProcessor++; + } + } + // // 4. Sort and map the not enabled threads to the bottom of the CpuApicIdOrderTable // -- 2.27.0.windows.1