From nobody Thu May 2 07:54:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82525+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=none dis=none) header.from=groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16349140708201003.9539771173861; Fri, 22 Oct 2021 07:47:50 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 0JiAYY1788612xzcjvr3a8JW; Fri, 22 Oct 2021 07:47:50 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.71]) by mx.groups.io with SMTP id smtpd.web10.9393.1634914069216772265 for ; Fri, 22 Oct 2021 07:47:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hnYAVj5pRnT7ePB9VobjOmoCT42nCJnXxVc4SW2DaegfOoNgcljx3wWCM/mjfwTlixUEg/BuGjYnLploeDS0yfyr3n+AdsjUEuTATW39lzL0DyojdIkOesGmwNAfSe2uDN7cdq2eOZOk3Aijb62/RQcHkxHPdwkjUeaKkCM9f1+9JTG2PtheT0sEHI7o+2cqB89S+wxgv42DminjxEpZn/h1Uc9k7vaEJFd/4UrS8fbSW7exA4dcgWbDB+jHs4pkagS9/hSYAE8bkgzrn8m9BVSFPOO2MkyiDglpouKS8JxkU4RYsbhezwnDPWLvJSoyEFaG9iypHcHTwDdvqPu+zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iR152yqtYWDZ2QTUkDWPTacyWFevvJ34VTnXw0P5K0s=; b=KXp8gbJXc5+oAfWL+gsNCZyjLGSF2Hrq3C/F2YkD5XS8hcehHYf+se/IlETNyFldoHh7OgIzHmecM2/E/yCAkXJpyKm6GMoiCBZBJ/a3vrG2riUBQJvXg4jQbRwIsw/mZ8ShgME53p2tl18QmXKiykQOdUIvUFRVnuQHeVONSaaI4e09e0EX3rD+XuH24HAvgudNLy5LhLOUCDXxbQIdoIDen51AVvxTz33ma2skgg3lOenAJqWNpUjpKwVFJy0arhbwKO92SuOEY3plBv7kSUjZ/E6yK/z7ib+RvgomOxh/wDo3GpzqQMUyqNRrEjiyCeelxv0ImuXRGl/5QE6LhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from BN0PR04CA0088.namprd04.prod.outlook.com (2603:10b6:408:ea::33) by BN6PR12MB1187.namprd12.prod.outlook.com (2603:10b6:404:1b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Fri, 22 Oct 2021 14:47:45 +0000 X-Received: from BN8NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ea:cafe::8a) by BN0PR04CA0088.outlook.office365.com (2603:10b6:408:ea::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.15 via Frontend Transport; Fri, 22 Oct 2021 14:47:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82525+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; X-Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT006.mail.protection.outlook.com (10.13.177.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 14:47:45 +0000 X-Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 22 Oct 2021 09:47:44 -0500 X-Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 22 Oct 2021 07:47:44 -0700 X-Received: from BLR-LAB-SFW01.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2308.15 via Frontend Transport; Fri, 22 Oct 2021 09:47:42 -0500 From: "Abdul Lateef Attar via groups.io" To: CC: Chasel Chiu , Nate DeSimone , Liming Gao , "Eric Dong" Subject: [edk2-devel] [edk2-platforms] [PATCH v1 1/2] MinPlatformPkg: Update APIC Table based on mode Date: Fri, 22 Oct 2021 20:17:45 +0530 Message-ID: <20211022144746.10671-2-abdattar@amd.com> In-Reply-To: <20211022144746.10671-1-abdattar@amd.com> References: <20211022144746.10671-1-abdattar@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 69eeaa27-7c81-4204-b4d9-08d9956ae8d9 X-MS-TrafficTypeDiagnostic: BN6PR12MB1187: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: l/egXajDKkKKDu8E/pbZmXWyvb8dqtyFXwBawWC/xJrcOjzRX3u81XpgoFf+2i4bk+/vpwZI/4jTqEq3Y5sBh+if5sfSb1hIG0QAR8gqWUFh53hTZHlC0EdnL4yn34zb5vyjdjO06o2ycWeiX7S+VbXeM1xrhC/NCPpOJUSq+lwxnhgwmUX4TfEGaE4MZRci73VC6kIQ3q6Epjpv66uDO3ZBtPibqVGEm9J36BdDupla0WxM1a3GZd1ysUl7Og7z9G+Xb1PPs0FALv38rCLJEg8fjLxAtn4fXBdb11eqpJWCnfW1/t/HDI34xla2cGz2rITGdEvLLuckwebqA9MJ6DICHS9NmNqCsGjT6080WEjLrArrFFIo1L9DltG+TiIOvYN050qcO455GkSBrwkgcA7XXNgcRHIFfy6oY/iJe1YfWLrQ7wrgJ4CJYZwSDPhiqjrE5iMzUffeepWaFMnaZn7fPAtFvaQi+ck8xezStod7iAdppHTrftfT6rte4FOSaMOOOER2bAiUDzpxkJHu6H5OqlVIK42iylsNL/+iwT3uGFjC297IWvGpHLY+366mbJbw2CbFk1u2qez5gzVaSGkEw94UOmfvEo91cIgfFugFV1Msa7LTC/KHOsaoPQwvrKbpZhY4IHrX79rA1jlcRRL5opM8nFlt+GG4YZmn3J+j34i1cH+A8xkQYVnhHXg6PIVI3xZkliNlmdGpOjDACrbSUNFgfVho/2Gzp5A8+4A= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2021 14:47:45.4530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 69eeaa27-7c81-4204-b4d9-08d9956ae8d9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1187 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abdattar@amd.com X-Gm-Message-State: r4BLCsADKBVDd4wzGv7vF1evx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634914070; bh=PtZJNpxDwjhuRPpPXu/zNJff8HC6pAwb4wpgXWWYhgQ=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=thY49l4CNUyeqmC49VxSehd+rbPg/vKtAc3K/NxZJeGN4tryKFsfeR0nwit+BTwlH6u +mpZ/kB0Nm/YSA7hFfU2oZiy5t4Yynp81S2u0vXWEXoAlPK7Ds6WXmC60CMiQdI7vnw0T 3qghl+zaOItFiFGkvotSxyNQh/LShvsVBRc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634914072041100004 Content-Type: text/plain; charset="utf-8" Detects the APIC mode by calling GetApicMode(). if current platform is in X2APIC mode sets the global mX2ApicEnabled. Also install the APIC NMI structure only if platform is not in X2APIC mode. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Abdul Lateef Attar Reviewed-by: Nate DeSimone --- Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 35 ++++++++= ++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b= /Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c index f5c4f2c3f1a9..032903029a95 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c @@ -3,6 +3,7 @@ =20 Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation.
+Copyright (c) 2021, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -947,21 +948,23 @@ InstallMadtFromScratch ( // // Build Local APIC NMI Structures // - LocalApciNmiStruct.Type =3D EFI_ACPI_6_3_LOCAL_APIC_NMI; - LocalApciNmiStruct.Length =3D sizeof (EFI_ACPI_6_3_LOCAL_APIC_NMI_STRUCT= URE); - LocalApciNmiStruct.AcpiProcessorUid =3D 0xFF; // Applies to all pro= cessors - LocalApciNmiStruct.Flags =3D 0x0005; // Flags - Edge-tigge= red, Active High - LocalApciNmiStruct.LocalApicLint =3D 0x1; + if (!mX2ApicEnabled) { + LocalApciNmiStruct.Type =3D EFI_ACPI_6_3_LOCAL_APIC_NMI; + LocalApciNmiStruct.Length =3D sizeof (EFI_ACPI_6_3_LOCAL_APIC_NMI_STRU= CTURE); + LocalApciNmiStruct.AcpiProcessorUid =3D 0xFF; // Applies to all p= rocessors + LocalApciNmiStruct.Flags =3D 0x0005; // Flags - Edge-tig= gered, Active High + LocalApciNmiStruct.LocalApicLint =3D 0x1; =20 - ASSERT (MadtStructsIndex < MaxMadtStructCount); - Status =3D CopyStructure ( - &MadtTableHeader.Header, - (STRUCTURE_HEADER *) &LocalApciNmiStruct, - &MadtStructs[MadtStructsIndex++] - ); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "CopyMadtStructure (APIC NMI) failed: %r\n", Stat= us)); - goto Done; + ASSERT (MadtStructsIndex < MaxMadtStructCount); + Status =3D CopyStructure ( + &MadtTableHeader.Header, + (STRUCTURE_HEADER *) &LocalApciNmiStruct, + &MadtStructs[MadtStructsIndex++] + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "CopyMadtStructure (APIC NMI) failed: %r\n", St= atus)); + goto Done; + } } =20 // @@ -1454,6 +1457,10 @@ InstallAcpiPlatform ( DEBUG ((DEBUG_INFO, "mNumberOfCpus - %d\n", mNumberOfCpus)); DEBUG ((DEBUG_INFO, "mNumberOfEnabledCPUs - %d\n", mNumberOfEnabledCPUs)= ); =20 + if (LOCAL_APIC_MODE_X2APIC =3D=3D GetApicMode ()) { + mX2ApicEnabled =3D TRUE; + } + DEBUG ((DEBUG_INFO, "mX2ApicEnabled - 0x%x\n", mX2ApicEnabled)); DEBUG ((DEBUG_INFO, "mForceX2ApicId - 0x%x\n", mForceX2ApicId)); =20 --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82525): https://edk2.groups.io/g/devel/message/82525 Mute This Topic: https://groups.io/mt/86515674/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 2 07:54:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82526+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=none dis=none) header.from=groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 163491407148861.036696121733485; Fri, 22 Oct 2021 07:47:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id wxa3YY1788612xYkwbLhQqWg; Fri, 22 Oct 2021 07:47:51 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.64]) by mx.groups.io with SMTP id smtpd.web11.9353.1634914070271876577 for ; Fri, 22 Oct 2021 07:47:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HyfgUwput2ImPMPwXNTAoeYbuQlzy5yifzXf/xmXZcZV9p+qdpY1OuB1Ia7vZZ0RBwVqgDvhBvcn9xzOYGaRdkiaUmaEZa16ELSGJxJR/ds8tLaZAoQ9ZTF9LszHfiubbskxE9QYqPBL3HYhuQQp4uf7jqRdcbt44LzFsWWDFqajX9EDCkaN+jREe1ocgXO3FwiPDo3w8/AoSBWdvxLw5BbCCTwtz2WBWXPVkSd9WgvdbS5PNmaGZBgMSbvIvykX2MQeGDs7H8g59ivYP0BrBPrEnx60BZCu4q2BC7SMWwWDL/icz8J5+WY0qtnePwapvRM+m7XtKl9fUUEC0Ux8Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NCraOCj06C+tlRdL4+W+c+CjA+3Hgl7gLI4JidaSf+0=; b=VrLp6aWge06zPo8+EoGEyrqq+hCrg4ht8J8WyiqOH+GeeM+WvZmuEehLy6w4KleFm5uh17+OOUHW7TM3B18N6A8qmwkHFUXSOWc0fNHZh4Ckc2qE0pXCeyVSVwKL5glnHIyf0AdfWeARThGab2MWOx6uVusNmFCnZzdT1PvTXZ3dONNXkfLmvX35N5qAQXYX2r8f80N3gfGil910ptlt1VasrDlEG/kT9HumiKkbSKgGs2yGv0BZnLhA7F3NPWFun4/50309l7UEQDjTpHfNX5A2//bCG5jn0PXXNCyj3pRKfnYKw6OmysVAwBb7NXqJSq9KEzn7oCkHFkqC37AI0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from CO2PR04CA0112.namprd04.prod.outlook.com (2603:10b6:104:7::14) by DM6PR12MB3546.namprd12.prod.outlook.com (2603:10b6:5:18d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Fri, 22 Oct 2021 14:47:48 +0000 X-Received: from CO1NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:104:7:cafe::4c) by CO2PR04CA0112.outlook.office365.com (2603:10b6:104:7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 14:47:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82526+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT036.mail.protection.outlook.com (10.13.174.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 14:47:47 +0000 X-Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 22 Oct 2021 09:47:47 -0500 X-Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 22 Oct 2021 07:47:46 -0700 X-Received: from BLR-LAB-SFW01.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2308.15 via Frontend Transport; Fri, 22 Oct 2021 09:47:45 -0500 From: "Abdul Lateef Attar via groups.io" To: CC: Chasel Chiu , Nate DeSimone , Liming Gao , "Eric Dong" Subject: [edk2-devel] [edk2-platforms] [PATCH v1 2/2] MinPlatformPkg: AcpiProcessorUid for multi-socket Date: Fri, 22 Oct 2021 20:17:46 +0530 Message-ID: <20211022144746.10671-3-abdattar@amd.com> In-Reply-To: <20211022144746.10671-1-abdattar@amd.com> References: <20211022144746.10671-1-abdattar@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ee61d766-80ed-4872-b5d4-08d9956aea40 X-MS-TrafficTypeDiagnostic: DM6PR12MB3546: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: svrBM2QxLNEczc3wx7DsrvBh/gNQz7OKwYHbAIKYds7uHo8NechfWbQMe8LytGydfq6MPzvBGPBOVrOnsbRM8FCZttMXc9Eew5aDWb2epPpo23d7zLpk88CPCnqGdGEz7AGh80ThQ32wfy/JbRnG0hfWrVchG6gXX2/A08WfCJJzVmoUBfnfOGljmxjXneJKenKfdjfJwCf6YmlkKC9Pe8SO/TM/ejcauwwR/KNJ2FjWjnuIujXtpNsd9c7o8wsOG8D4lc4DGyqeunumxfOfJxcQyNZ95Ksc/k9A2UeIWH332eaUQk7MfzMkyZtRhDY9zLhFnvazCa7Q7/1PtQU1aPacYoOK/JeTCSNu+dNrdAu9KC4uBNcr0rIofU+kxG1bILwVE3W3bGyQJZFPMh/E3SsxPi2PsMZBmOSJ2HHUY7so9VqOSIo9q4Mrxm4bLiE6lHQNFgT4LW6Rj3kDHBxdo3DEBwBVHGmjp8QupHVxSac9X5+u3dt5/J24lrBpqFgX6krDp9I3alhhOvxkT7N0EZvUQD0R2TUYlLYqNUqzysbf2bpuHg2Aos/KpZr1+klBAY37B0UNP2P8qkRdicYOp1SgJ0B3Rf//zG1tjtFvFETWbk8M8Jz4fh4TrSgV5lKlHalfX7n3UfMnVbfj0zpzxjTwTRpOXeX8vF5L4jzi7lW8saSwI7ieMNMqh+068HblEWWVK12EcGovphr8Ntjq/a4UZ5yQqrCXdmZE83MexbY= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2021 14:47:47.7388 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee61d766-80ed-4872-b5d4-08d9956aea40 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3546 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abdattar@amd.com X-Gm-Message-State: fkkD4eL5YekKjLTvrzUmsBYgx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634914071; bh=odZcFloj5HQrIrmBvxmHZegKNVXH8VmXB0R2Ar7jUQM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=kxYDJ1j3WNUuGlyK9ZKMl5TdYfT4+qCRpxvJsCOAgL7rsuRdMegz5GfMZaP+vAc0vHk RmJTodgDW1lX8vgAOwEt2K9jv/XMPFFlYhlD0ZZRonCW9tD9lfyCTTZdNeuEeVARaH0Rt eAcbnRjCK1ANM15Kgq3R57X7YGM0RKZavPI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634914974393100002 Content-Type: text/plain; charset="utf-8" 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 Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Abdul Lateef Attar Reviewed-by: Nate DeSimone --- 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 =3D 0; Socket < FixedPcdGet32 (PcdMaxCpuSocketCount); Socket= ++) { for (CurrProcessor =3D 0, Index =3D 0; CurrProcessor < mNumberOfCpus; = CurrProcessor++) { if (mCpuApicIdOrderTable[CurrProcessor].Flags && (mCpuApicIdOrderTab= le[CurrProcessor].SocketNum =3D=3D Socket)) { - mCpuApicIdOrderTable[CurrProcessor].AcpiProcessorUid =3D (Processo= rInfoBuffer.Location.Package << mNumOfBitShift) + Index; + mCpuApicIdOrderTable[CurrProcessor].AcpiProcessorUid =3D (mCpuApic= IdOrderTable[CurrProcessor].SocketNum << mNumOfBitShift) + Index; Index++; } } --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82526): https://edk2.groups.io/g/devel/message/82526 Mute This Topic: https://groups.io/mt/86515675/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-