From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.127]) by mx.groups.io with SMTP id smtpd.web11.13226.1639884958823645855 for ; Sat, 18 Dec 2021 19:35:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=YOcWneEt; spf=pass (domain: os.amperecomputing.com, ip: 40.107.220.127, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tj1VEPqqevtbTBae6uoTKzS8/V//Xf3vqB3JLENavtVMmsc9GeMqGsIvwfzdKuNDJF6hf2aK+3Agu9rMZw91oPoLq5IxMAovGrnOktMQ9ANFamzuRvqNWYG5hhr8g2QOGpbjnti2xYz2pnqnuVTlOhauXga/5W0A0PwVMjW3Biv3lR0S1Ak4ea2VKAWGpCNQGN0qWOZ8Uy2DZ1pN151iMKgWGSsSExciisGGNcyk/Y4oETb1NrIGMZT6hPuWx0qIH1Bz116eKU5TMntktjz7iefgxSrelAIAVSNFMaNyRWC2kDh4GVmNOt47pW6pX/gGiYxpheMgLBO8xpl20ki42w== 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=c+cX9/4bD0NfCk6uzg32jxJJZ6xCcL9vWIMqzF4vmx8=; b=LZ4R9Gv8apvo0d2FhT1Yz3I6m78a5nrIFJInsf2vTuG7/riDMBdcSS7WMtO07cZC8QqBsgZG14tHD1cz620OAjIfChhtQH49fu2GFTgBRdZYiTjASvS4omkk0TRQEln1fdkACvBNCxBdb1VKbgjBwGe4i7loQrmGS1pOLW4I4SAzZ0XomfQv6LBHu6A4Jfue3MFCgCD5JlsmWzyRUKJdI1Gdn2/3eOPw7Mstwe4MfuUgNMozjeWUfXWuZT5xCeBeHfLO5rkMGPaK7K8Y1RqqVvHhI2aEiPJw4oeCOtJuJhGusAtFmJfxvAJfIOIYfvwjYDUJlixODqarM3fjF+7NAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c+cX9/4bD0NfCk6uzg32jxJJZ6xCcL9vWIMqzF4vmx8=; b=YOcWneEtRXqBJ0snuAMGV6eOR56uysBXH2gMpxhfDJl4FBry8kLhvydhtX+dnoxMKFCqy8MrGC/uIkuSUA3h6+TvlrRz9mAge3wJmiMJ2ioE3SelZ9ET1+Zd4sW47hctvJRwMfCHZMTRWi9z1WzbY7jq11OGr6871fA/naIouZ0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by PH0PR01MB7458.prod.exchangelabs.com (2603:10b6:510:f1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12; Sun, 19 Dec 2021 03:35:55 +0000 Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::b519:e888:c4c8:b552]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::b519:e888:c4c8:b552%8]) with mapi id 15.20.4778.017; Sun, 19 Dec 2021 03:35:55 +0000 Message-ID: Date: Sun, 19 Dec 2021 10:35:41 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH v2 14/17] Silicon/Ampere: Update ArmPlatformLib to work with changed ARM_CORE_INFO To: Rebecca Cran References: <20211216220800.9628-1-rebecca@nuviainc.com> <20211216220800.9628-15-rebecca@nuviainc.com> Cc: devel@edk2.groups.io, Ard Biesheuvel , Samer El-Haj-Mahmoud , Leif Lindholm , Sami Mujawar , Wenyi Xie , Peng Xie , Ling Jia , Yiqi Shu , Vu Nguyen , Thang Nguyen , Chuong Tran , Pete Batard , Masami Hiramatsu , Graeme Gregory , Radoslaw Biernacki , Marcin Wojtas From: "Nhi Pham" In-Reply-To: <20211216220800.9628-15-rebecca@nuviainc.com> X-ClientProxiedBy: SG2PR02CA0045.apcprd02.prod.outlook.com (2603:1096:3:18::33) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99f63df0-7a86-45a6-5074-08d9c2a0a98f X-MS-TrafficTypeDiagnostic: PH0PR01MB7458:EE_ X-LD-Processed: 3bc2b170-fd94-476d-b0ce-4229bdc904a7,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 64bCWYkmHLje0bo7bAYmNHuDlEmkD5NbEpOIrW7eLyj2gdS5LV2xYpU4C3ssLL4z6zA8/r354uQXvGPWA/qRrqX2EiIFPi9dy0st3RldasYxD6CvgUz9THlO10dppC8OoCg9cFydAghGt5GJJWEkHgmbNGq9ne4+nNVOi6h5lPvmVVdqIMRm5Stq5m2CPNRH7YWr6JKZcQvbaSjNW1oxIaYJB2HxpTWMSBmTSJ9RbV5fKqHhFPM/lycgWLsSUWQvb4r0GK7XsPpwdPxlS/Fek8hI5LyAKLaXxRtqCb/t2HwqxitUuFs0ORvfEwLG888p6cTqH+fNc6awb01RENhYRHsc9V4FdSFwtNTpmWoJ4L81MkIc0AP0ifewbggp5U2ci4Db49w/lzSZJxFMdJ8bCJJ0SeubJ+cFldnsSHyval24CragaS2wzONCmft3AcfQkcqxphn8BywMyJo7/4ND/f7QHmnXi3ilzOYm/eco5wgu9AaXHSi3WAzUVuOmXl0sArG94/WqgP33yvlTrD5OgKaSuVyznC+94n56QZH1FaKxuB9LjIyj27b8BjEFDGEqRyMMmyTT6Zl0/em9WZdcQPb5crXqEvEe/Ep8ocPmC8ZiF0CrYxFBGlrTPICJLmRj7P4nfqf22daG0zNx8OvZWh6otj9KJfOLHFk1WwgkOcF/8MM9y+vql4ppOIBSaBfeNKH1bT93hDcxEveL5c4Ulj9DzakIuz4dco2yR9DrGBM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7287.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(31696002)(2906002)(66946007)(6666004)(66476007)(186003)(52116002)(38100700002)(8936002)(7416002)(316002)(6916009)(54906003)(83380400001)(66556008)(8676002)(5660300002)(86362001)(508600001)(2616005)(6512007)(4326008)(15650500001)(6486002)(31686004)(38350700002)(26005)(6506007)(53546011)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UG5SZXF6NVhxY095VDFTNDIxK2h5SzJFTlg5TndoaFozZmR6SnJhekhjaEx0?= =?utf-8?B?Mmd5T1FpZGJJSW1UU0RtRmJvTzBuSWxGd1FyNFprRXB0NXRlSkJpZkd5NTFt?= =?utf-8?B?RC91THp5Uy9kQTdsSGRuVlJVVFp4aWROb2V2WUlSa2pLcitZdENkeUJBLzJI?= =?utf-8?B?elFiNFBNTW9uWmpYVXgwTEdMeUg1cHIvUU81djRFMFFuVUVBOEFkU0Z5MHZE?= =?utf-8?B?Q2F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g1UmQ5T2NBTFQy?= =?utf-8?B?ZVdZT2hKaC9HYzRVSWcxTzcySXB4SEM5djlWcHFuMXFsWW5NT2hkOUtTdERQ?= =?utf-8?B?TU8rQ3AySTBxMEtYYVFvZXMzUlRoUWhzZXhwdlFXWURKTXk0a0hvOTRoYkwz?= =?utf-8?B?MXJTWjZaMDdiRURRMzdlaWs3WVdiWkFkd2VZWUpOYy9MZW5jSW9WVDBtdlFY?= =?utf-8?B?WVZwUHBob3o3VDVUM21UeWlzcnJBPT0=?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99f63df0-7a86-45a6-5074-08d9c2a0a98f X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2021 03:35:54.8826 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7T3eqIc8N5A/UrL7G5nb/OrG1CUIbaL2nSn71a2tl3q4bd14iKhVsiLGlPFsEqKVwiKtObD+8pDjjfhYtnJrXf/flcCrHDgIdPkyH1Sdpuo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR01MB7458 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Rebecca, Leif is merging the rest of Altra port to the edk2-platforms which has SRAT ACPI table consuming the CPU Core Info table. Therefore, we will need to fix the SRAT too. I would defer the fix until the Altra port is fully merged. On 17/12/2021 05:07, Rebecca Cran wrote: > The ARM_CORE_INFO struct has been updated so the MPIDR is now a single > field instead of separate cluster/core fields. Update ArmPlatformLib. > > Signed-off-by: Rebecca Cran > --- > Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c > index 5b4be0e55516..f2ec923d6f8d 100644 > --- a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c > +++ b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformLib.c > @@ -108,9 +108,8 @@ PrePeiCoreGetMpCoreInfo ( > } > SocketId = SOCKET_ID (Index); > ClusterId = CLUSTER_ID (Index); > - mArmPlatformMpCoreInfoTable[mArmPlatformCoreCount].ClusterId = SocketId; > - mArmPlatformMpCoreInfoTable[mArmPlatformCoreCount].CoreId = > - (ClusterId << 8) | (Index % PLATFORM_CPU_NUM_CORES_PER_CPM); > + mArmPlatformMpCoreInfoTable[mArmPlatformCoreCount].Mpidr = GET_MPID ( > + SocketId, (ClusterId << 8) | (Index % PLATFORM_CPU_NUM_CORES_PER_CPM)); For Ampere Altra, the correct MPIDR encoding is SocketId << 32 | ClusterId << 16 | (Index % PLATFORM_CPU_NUM_CORES_PER_CPM) << 8 It would be the same what Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiMadt.c (not available yet - being merged in) is describing. Best regards, Nhi > mArmPlatformMpCoreInfoTable[mArmPlatformCoreCount].MailboxClearAddress = 0; > mArmPlatformMpCoreInfoTable[mArmPlatformCoreCount].MailboxClearValue = 0; > mArmPlatformMpCoreInfoTable[mArmPlatformCoreCount].MailboxGetAddress = 0;