From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.83]) by mx.groups.io with SMTP id smtpd.web12.5282.1658404020213569959 for ; Thu, 21 Jul 2022 04:47:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=sRKWFXO4; spf=pass (domain: arm.com, ip: 40.107.21.83, mailfrom: sami.mujawar@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=hPkES27UKlQ2JB0C7WOq2h/Yytu+q0GkEmLgt9Pj4/1qUtwxPtMo8Zi70seB4PcrrvgVmuUF1zWW2V3Czw8RSBJ5n1AROd98et6z0+LdrPoS2tQOEajRvvotVD3h9Ol5B9tn2lPJgoIlrWBTTOz9xoFvjF2qQ9uVThMtVwFi+dEc9kTOA4u7xGLuvzq+G59ySZCLoCIwEhf52jmUUcODEKVZ0M1IlcRcuqejVzKZyYEPl+D1hb2iahGkSLH/7BWGECvZur7S+/RIQid6D3pU3aKOw3nRUOMv8vwGG7RQQVIRyNbb8gq3uz/c/OHrcPd25wJIoBZiQN2OOCRZE9Gttg== ARC-Message-Signature: i=2; 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=61wNiAUcgZ3JodijN0cWu090HOwzuu1IKaxgA/HV/jM=; b=UOnngHfHAtF1MrRnvGEbj7Vl1aBnaBTtS0cl1lpNZU9bt1yeFxx/d3WNW3MCEu96pWSnsZc/VOHStiTY9kNoOjokOMypxyOSGKX87tCx1I/RqD69y0utGOGDHHGxltpOnD+2Ng1oDW3JPXJeesyO3m1sm7CoAr8UiACgIOqMdWRHqxD33rDS3d11sb4n+3Nop19oAUKanQQDzajNCoNOITghZKznoB9aCsM7iX2oqhgEFEhcRwXB/rvkLkgiWz1mH1wdaDbFlvDR45R8KZ57yY0ySiO3kSjt3ZAsmuwT/oJS/bE5zB7bCBg0GR5SfzBPMvnz5dDA3u5R3g1xbuMpAw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=61wNiAUcgZ3JodijN0cWu090HOwzuu1IKaxgA/HV/jM=; b=sRKWFXO4AkvSQANZdNrQ4txsvZrzEbnOOegWGAB8bDfW/1i203fefsWJT6BMrokcIJZi4bPvN9SWq9fmpSZmFCka2IfMHesMGV/VQhD+/PQz1hzkyfvu1WkVSqwHnVzR4lMwfvuBD8sXilMHFWNt9Cg1HJRDOdClP2gt+TAWKDw= Received: from AM6PR08CA0041.eurprd08.prod.outlook.com (2603:10a6:20b:c0::29) by AM6PR08MB4689.eurprd08.prod.outlook.com (2603:10a6:20b:c3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.15; Thu, 21 Jul 2022 11:46:47 +0000 Received: from AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:c0:cafe::c) by AM6PR08CA0041.outlook.office365.com (2603:10a6:20b:c0::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19 via Frontend Transport; Thu, 21 Jul 2022 11:46:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT053.mail.protection.outlook.com (10.152.16.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Thu, 21 Jul 2022 11:46:45 +0000 Received: ("Tessian outbound c883b5ba7b70:v123"); Thu, 21 Jul 2022 11:46:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5848865a517de930 X-CR-MTA-TID: 64aa7808 Received: from 13e2f5485abf.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 84AF516F-B373-443A-8C5B-925AF329F859.1; Thu, 21 Jul 2022 11:46:34 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 13e2f5485abf.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 21 Jul 2022 11:46:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EnAvGJcHE/293xaeD1yH6nTdeqkbhwMVEeINomUvc2CyYTxEjBNc1n1Ku2Tj0+27loZVRnUZy8lPdCUduQlvpyDrzi42uV8wsUw+09INEDuCMZIX4PbQvUZAvHqDXMGmYywJzmNs4XW9l5tncEW+/BCd+6wPFpd8WYAemR96CQEX5kV+xKIHKzlAgNBMSV9kJN5SBxOhPZmBnV6erzKP6Ft3AJFf9rkb5XwSonLz8Ne65qp4WRVN5lLNfE71XkiHayxz9Uyd5ohjuUVkruNN5fihaK/lhlda7XzTuQApLbrnXlqMSRba40S1/kDiFrKmGSz4w1x7Eo4QZUN3zFXMwA== 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=61wNiAUcgZ3JodijN0cWu090HOwzuu1IKaxgA/HV/jM=; b=EotG6hzxdTcjxHSU6+poFYXid1rCsO2EeInfhJpzdxdUi9BkTCr8hmm2GaU5ZffKfMSW/QfiVrFeyFUJQfch/4iQ6/XgEuvJC9/i8T3RrkqCtM90MYvPDFLDe00rQ+j1S8xNXpl7bgNS5ucqBY7sc1JtB4Q/TKWif9fvzFxIO9s5uHKD1BRvKjSrvLyb0uZx8618W+E7bbGM1PN8pmtUj0LMtPaWBjZhoE7d7U2QCVhPX/Zv7Up0GDVO922TBKw1uUcSJsgnOCa3Ry8FykqWgqKtHab9v68pG6BPpscb2s6uCT894ABx8QqzRQ+Xqv+ZDkDnpL3KBzKGkUim1Ii4ZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=61wNiAUcgZ3JodijN0cWu090HOwzuu1IKaxgA/HV/jM=; b=sRKWFXO4AkvSQANZdNrQ4txsvZrzEbnOOegWGAB8bDfW/1i203fefsWJT6BMrokcIJZi4bPvN9SWq9fmpSZmFCka2IfMHesMGV/VQhD+/PQz1hzkyfvu1WkVSqwHnVzR4lMwfvuBD8sXilMHFWNt9Cg1HJRDOdClP2gt+TAWKDw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by DBAPR08MB5863.eurprd08.prod.outlook.com (2603:10a6:10:1a1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Thu, 21 Jul 2022 11:46:32 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::d562:5a52:f638:7fe9]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::d562:5a52:f638:7fe9%4]) with mapi id 15.20.5458.018; Thu, 21 Jul 2022 11:46:32 +0000 Message-ID: <518c6649-c447-cb9d-7664-60d96059b43c@arm.com> Date: Thu, 21 Jul 2022 12:46:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [edk2-platforms] [PATCH 1/1] Platform/Sgi: Add support to disable isolated cpus To: Nishant Sharma , devel@edk2.groups.io, leif@nuviainc.com, Ard.Biesheuvel@arm.com, thomas.abraham@arm.com, Leif Lindholm , nd@arm.com References: <20220617060702.26684-1-nishant.sharma@arm.com> From: "Sami Mujawar" In-Reply-To: <20220617060702.26684-1-nishant.sharma@arm.com> X-ClientProxiedBy: LO6P123CA0005.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:338::10) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d8663e9f-66e5-4987-3be2-08da6b0eb069 X-MS-TrafficTypeDiagnostic: DBAPR08MB5863:EE_|AM5EUR03FT053:EE_|AM6PR08MB4689:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: L1y38yh1Qz3fGt/5KQS4cxMvri68AAyM1FR1IIjJdnvuMRV2BKJbewkElmAdvIeJLaA6rXPrmK3x5GAdclKzWhyFQCP6vNaVEFyjrEqZk3V9URd+gRZLZmZAja1yuh5I00Rk5CN53DKnhu7nrzSm+tHhXRZ71vSuQ0aUFhwJ7UOn7d1ZogjaLpYqPYo/O89N9XqOOJ2OXg9N6/D5CArJRQg9wSU1BhK6unOiyOG13U8bNb83pu4PQKtuJA9MTLDoBcYNOjr8lq5/pKmuheLWZ+Ta71Ec1PsoKvulcIBJkAzWpkSRPI1fsEL2So1uIJusB1ZEbEPSBluuEGptneUTXQ9XT0919W/LjgulbSavLy7o55dD7sH+uBp/tRKiiCwWkXRzrdxnv1gWN3DcptcBrb4zvaxgGQm/1ZKDERm/uTbF8hvvdfelE/0ZApg+DJrDihWG8fZV5IxrEpS61LReXxSK/1dAKhmrsEWQwcxgpevkFyXLULMGtrgyguN83bG8JGcT5JMzl64FA1OiqjGcGBL7Easzvinx+6OQ31GRfA3aCy7mt7Bq77WcJdmNdSrII/etkFyjbI0A9p5Yt1ya7/HiClZW4J4rbUy32AM+MzCmjCpp1j/E0TZvPsHzQ7ZtkdIP4dPfEA+AV+fX7HnhfqwKeM98n1pp7qRsO5YzgZtIM/Au/w0EM8Z7EkJa1hHC9QDSHaoykMBNziI1CnPbVTevLUaF/w1PtuCSMhQmrkN2EqwQSdqOy2e62Ww1O+c9UG4suLkxHtlbaB3TLGTJkkdzFG25mMkQ+7LlMGarDA4Z25dvcxd9+tfrWk72RM8BLcNRnbabo7ETbkD6HKxiPQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(366004)(396003)(136003)(346002)(376002)(6486002)(6512007)(478600001)(38100700002)(26005)(30864003)(36756003)(83380400001)(31686004)(8936002)(66476007)(316002)(66556008)(186003)(8676002)(19627235002)(110136005)(6636002)(86362001)(2616005)(33964004)(5660300002)(2906002)(31696002)(6506007)(41300700001)(44832011)(53546011)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5863 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2939307b-d410-4a8a-4ed4-08da6b0ea84b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tlCPQhrrTW6PRBWYhif2NjVKucxBQg7i+udiXfR1oZRLoWPTxA2p+AbMyfo9nK5e/aVddbYRRIpqHf9llvy76a+plKdv7Vv2cWCSK15FkUFO41p8k5lwNZ/CZmvnNuh5cEyTCtr2b2XdFWoTfbBHg4veXAdlxROjaylxGEMbaajUxtPcOwecjgJyiRNg5BWy24Fw+05JhM3rcXg+kI86n4RdrsZtOfGy/OKPvkszjTQaY/fvj7ZtPF5LdCDrhmP1XXkGI9oRjdyDSlJ/2j631rWv56AVNNKkeQAlfgzkCjofzVbjBSvYgHUOS/AAUZZAwPEGCVJtotQxxyxJujzIjM9UQ95cPDewj6ReQw5ToTAjlf285xJ9EEOjtdwY927FVEXFxqFxVjVKDiBQ+SsY/2RhEW2i6GypHSVf2dwFld1k0f7KffCMAjexF+m64MD3bAwU5VmJL3rBhvF5XD1aZZ/2lfbkAuKlU8ouGLjwRV27JP78eUKwFbOl7aXP8/IYx70ZTv18wcxhbSv62EoCg87Iuq7K8STyzgFwicP7uD7PHkv4cRqhSk1w40nRg95Zyxt7RhuB8VwyXu4dcN9SJItuq0wdfZgPswYPkfrQxbthltWLTOx4nUoIx66e6R2RQfZUqE51kgqCuZdWFn9omBaLFyXkqlM50WmluWfex9zZByiJ7asgAuKOjf9H0pedYjeLhYXfR6uUATUBDHHgU3raA8qaXoEmZEPDk4KYDJi2ScyKGZFS36Z21FRYEruzEdDisrjBuszsZHNIfT3J4Q2EG/fUDj3ORmJllxtV5im9TtbwKUEdNkRzk1vw2hRhyOUcyEDyK8KTAOpgN7gczg== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230016)(4636009)(136003)(396003)(39860400002)(376002)(346002)(40470700004)(46966006)(36840700001)(86362001)(36860700001)(8936002)(31696002)(356005)(5660300002)(6512007)(81166007)(82740400003)(40480700001)(44832011)(2906002)(33964004)(186003)(53546011)(6506007)(26005)(30864003)(36756003)(2616005)(19627235002)(40460700003)(110136005)(6636002)(41300700001)(6486002)(82310400005)(336012)(478600001)(70206006)(83380400001)(31686004)(8676002)(70586007)(316002)(47076005)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2022 11:46:45.9122 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8663e9f-66e5-4987-3be2-08da6b0eb069 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4689 Content-Type: multipart/alternative; boundary="------------LDXFxQ4TSK3iA9GVo0OgzG0K" --------------LDXFxQ4TSK3iA9GVo0OgzG0K Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Hi Nishant, Please find my response inline marked [SAMI]. Regards, Sami Mujawar On 17/06/2022 07:07 am, Nishant Sharma wrote: Isolated CPUs are those that are not to be used on the platform for various reasons. The isolated CPU list is an array of MPID values of [SAMI] Can you explain the use-case/reason, please? the CPUs that have to be isolated. This list is supplied via the NT_FW_CONFIG dtb. Add support to search for isolated CPUs MPID list and, if present, update the MADT table to disable the corresponding CPUs. Signed-off-by: Nishant Sharma --- Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 1 - Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf | 8 +- Platform/ARM/SgiPkg/Include/SgiPlatform.h | 7 ++ Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 131 ++++++= +++++++++++++- Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c | 45 ++++++= - 5 files changed, 186 insertions(+), 6 deletions(-) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf index 4b36c3e5ceb2..e13c2f08ce6e 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf @@ -18,7 +18,6 @@ Dbg2.aslc Fadt.aslc Gtdt.aslc - Iort.aslc [SAMI] Why is IORT table being removed here? Mcfg.aslc RdN2Cfg1/Dsdt.asl RdN2Cfg1/Madt.aslc diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf = b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf index 407160c07563..fbf061ad3bdb 100644 --- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf +++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, ARM Limited. All rights reserved. +# Copyright (c) 2018-2022, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -13,6 +13,7 @@ ENTRY_POINT =3D SgiPlatformPeim [Packages] + ArmPlatformPkg/ArmPlatformPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdePkg/MdePkg.dec Platform/ARM/SgiPkg/SgiPlatform.dec @@ -21,6 +22,11 @@ FdtLib PeimEntryPoint +[FixedPcd] + gArmSgiTokenSpaceGuid.PcdChipCount + gArmPlatformTokenSpaceGuid.PcdCoreCount + gArmPlatformTokenSpaceGuid.PcdClusterCount + [Sources] SgiPlatformPeim.c diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPk= g/Include/SgiPlatform.h index dddb58832d73..311286ce5337 100644 --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h @@ -65,11 +65,18 @@ #define DRAM_BLOCK2_BASE_REMOTE(ChipId) \ (SGI_REMOTE_CHIP_MEM_OFFSET (ChipId) + FixedPcdGet64 (PcdDramBlo= ck2Base)) +// List of isolated CPUs MPID +typedef struct { + UINT64 Count; // Number of elements present in the list + UINT64 Mpid[]; // List containing isolated CPU MPIDs +} SGI_ISOLATED_CPU_LIST; + // ARM platform description data. typedef struct { UINTN PlatformId; UINTN ConfigId; UINTN MultiChipMode; + SGI_ISOLATED_CPU_LIST IsolatedCpuList; } SGI_PLATFORM_DESCRIPTOR; // Arm SGI/RD Product IDs diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platfo= rm/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c index 2f72e7152ff3..80190120ff32 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c @@ -1,14 +1,17 @@ /** @file * -* Copyright (c) 2018, ARM Limited. All rights reserved. +* Copyright (c) 2018 - 2022, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * **/ +#include + #include #include #include +#include #include VOID @@ -16,6 +19,127 @@ InitVirtioDevices ( VOID ); +/** + Search for a MPID in a list + + Performs a linear search for a specified MPID on the given linear + list of MPIDs. + + @param[in] MpidList Pointer to list. + @param[in] Count Number of the elements in the list. + @param[in] Mpid Target MPID. + + @retval TRUE MPID is present. + @retval FALSE MPID is not present. +**/ +STATIC +BOOLEAN +CheckIfMpidIsPresent ( + IN UINT64 *MpidList, + IN UINT64 Count, + IN UINT64 Mpid + ) +{ + UINT64 Idx; + + for (Idx =3D 0; Idx < Count; Idx++) { + if (MpidList[Idx] =3D=3D Mpid) { + return TRUE; + } + } + + return FALSE; +} + +/** + Disables isolated CPUs in the MADT table + + Parse the IsolatedCpuInfo from the Hob list and updates the MADT table t= o [SAMI] Nit. updates -> update + disable cpu's which are not available on the platfrom. + + @param[in] AcpiHeader Points to the Madt table. + @param[in] HobData Points to the unusable cpuinfo in hoblist. +**/ +STATIC +VOID +UpdateMadtTable ( + IN EFI_ACPI_DESCRIPTION_HEADER *AcpiHeader, + IN SGI_PLATFORM_DESCRIPTOR *HobData + ) +{ + UINT8 *StructureListHead; + UINT8 *StructureListTail; + EFI_ACPI_6_4_GIC_STRUCTURE *GicStructure; + BOOLEAN MpidPresent; + + if (HobData->IsolatedCpuList.Count =3D=3D 0) { + return; + } + + StructureListHead =3D + ((UINT8 *)AcpiHeader) + + sizeof(EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER); + StructureListTail =3D (UINT8 *)AcpiHeader + AcpiHeader->Length; + + // Locate ACPI GICC structure in the MADT table. + while (StructureListHead < StructureListTail) { + if (StructureListHead[0] =3D=3D EFI_ACPI_6_4_GIC) { [SAMI] This is definitely not the way to parse an ACPI table. Please dont d= o this. Also, why are you not using DynamicTables framework? It is designed to hand= le such cases. [/SAMI] + GicStructure =3D (EFI_ACPI_6_4_GIC_STRUCTURE *)StructureListHead; + // Disable the CPU if its MPID is present in the list. + MpidPresent =3D CheckIfMpidIsPresent( + HobData->IsolatedCpuList.Mpid, + HobData->IsolatedCpuList.Count, + GicStructure->MPIDR + ); + if (MpidPresent =3D=3D TRUE) { + DEBUG (( + DEBUG_INFO, + "Disabling Core: %lu, MPID: 0x%llx in MADT\n", + GicStructure->AcpiProcessorUid, + GicStructure->MPIDR + )); + GicStructure->Flags =3D 0; + } + } + + // Second element in the structure component header is length + StructureListHead +=3D StructureListHead[1]; + } +} + +/** + Callback to validate and/or update ACPI table. + + On finding a MADT table, disable the isolated CPUs in the MADT table. Th= e + list of isolated CPUs are obtained from the HOB data. + + @param[in] AcpiHeader Target ACPI table. + + @retval TURE Table validated/updated successfully. + @retval FALSE Error in Table validation/updation. +**/ +STATIC +BOOLEAN +CheckAndUpdateAcpiTable ( + IN EFI_ACPI_DESCRIPTION_HEADER *AcpiHeader + ) +{ + VOID *SystemIdHob; + SGI_PLATFORM_DESCRIPTOR *HobData; + + // This check updates the MADT table to disable isolated CPUs present on= the + // platform. + if (AcpiHeader->Signature =3D=3D EFI_ACPI_1_0_APIC_SIGNATURE) { [SAMI] Why EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE is not us= ed here? + SystemIdHob =3D GetFirstGuidHob (&gArmSgiPlatformIdDescriptorGuid); + if (SystemIdHob !=3D NULL) { + HobData =3D (SGI_PLATFORM_DESCRIPTOR *)GET_GUID_HOB_DATA (SystemIdHo= b); + UpdateMadtTable (AcpiHeader, HobData); + } + } + + return TRUE; +} + EFI_STATUS EFIAPI ArmSgiPkgEntryPoint ( @@ -25,7 +149,10 @@ ArmSgiPkgEntryPoint ( { EFI_STATUS Status; - Status =3D LocateAndInstallAcpiFromFv (&gArmSgiAcpiTablesGuid); + Status =3D LocateAndInstallAcpiFromFvConditional ( + &gArmSgiAcpiTablesGuid, + &CheckAndUpdateAcpiTable + ); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n", __FUNCTION= __)); return Status; diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c b= /Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c index 7df52cc4fd7c..f778dc8ac7c1 100644 --- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c +++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2018, ARM Limited. All rights reserved. +* Copyright (c) 2018-2022, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -38,6 +38,8 @@ GetSgiSystemId ( CONST VOID *NtFwCfgDtBlob; SGI_NT_FW_CONFIG_INFO_PPI *NtFwConfigInfoPpi; EFI_STATUS Status; + UINT64 IsolatedCpuCount; + UINT64 CoreCount; Status =3D PeiServicesLocatePpi (&gNtFwConfigDtInfoPpiGuid, 0, NULL, (VOID**)&NtFwConfigInfoPpi); @@ -83,6 +85,32 @@ GetSgiSystemId ( HobData->MultiChipMode =3D fdt32_to_cpu (*Property); } + Property =3D fdt_getprop (NtFwCfgDtBlob, Offset, "isolated-cpu-list", NU= LL); + if (Property =3D=3D NULL) { + DEBUG ((DEBUG_INFO, "%s property not found\n", "isolated-cpu-list")); + HobData->IsolatedCpuList.Count =3D 0; + } else { + CopyMem (&IsolatedCpuCount, Property, sizeof (IsolatedCpuCount)); + CoreCount =3D + FixedPcdGet32 (PcdChipCount) * + FixedPcdGet32 (PcdClusterCount) * + FixedPcdGet32 (PcdCoreCount); + if (IsolatedCpuCount > CoreCount) { + DEBUG (( + DEBUG_ERROR, + "IsolatedCpuCount(%u) is higher than CoreCount(%u)\n", + IsolatedCpuCount, + CoreCount + )); + return EFI_SUCCESS; [SAMI] Is the status code returned here correct? Should this be EFI_INVALID= _PARAMETER? Also the function name GetSgiSystemId() seems to no longer refl= ect what the function does. Hace you considered renaming it. + } + CopyMem ( + &HobData->IsolatedCpuList, + Property, + sizeof(HobData->IsolatedCpuList) + (CoreCount * sizeof(UINT64)) [SAMI] Coding convention is not followed here and at other places. Can you = fix, please? + ); + } + return EFI_SUCCESS; } @@ -104,11 +132,24 @@ SgiPlatformPeim ( { SGI_PLATFORM_DESCRIPTOR *HobData; EFI_STATUS Status; + UINT64 CoreCount; + UINTN HobSize; + CoreCount =3D + FixedPcdGet32 (PcdChipCount) * + FixedPcdGet32 (PcdClusterCount) * + FixedPcdGet32 (PcdCoreCount); + + // Additional size for SGI_ISOLATED_CPU_LIST. + // Size =3D (MPID register size in bytes * CoreCount) + + // sizeof(SGI_PLATFORM_DESCRIPTOR) + HobSize =3D + sizeof (SGI_PLATFORM_DESCRIPTOR) + + (CoreCount * sizeof(UINT64)); // Create platform descriptor HOB HobData =3D (SGI_PLATFORM_DESCRIPTOR *)BuildGuidHob ( &gArmSgiPlatformIdDescriptorGuid, - sizeof (SGI_PLATFORM_DESCRIPTOR))= ; + HobSize); // Get the system id from the platform specific nt_fw_config device tree if (HobData =3D=3D NULL) { IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you. --------------LDXFxQ4TSK3iA9GVo0OgzG0K Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Nishant,

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar

On 17/06/2022 07:07 am, Nishant Sharma wrote= :
Isolated CPUs are those that are not=
 to be used on the platform for
various reasons. The isolated CPU list is an array of MPID values of
[SAMI] Can you explain the use-case/reason, please?
the CPUs that have to be isolated. This list is supplied via the
NT_FW_CONFIG dtb.

Add support to search for isolated CPUs MPID list and, if present,
update the MADT table to disable the corresponding CPUs.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf         |   1 -
 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf |   8 +-
 Platform/ARM/SgiPkg/Include/SgiPlatform.h                     |   7 ++
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c         | 131 ++++++=
+++++++++++++-
 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c  |  45 ++++++=
-
 5 files changed, 186 insertions(+), 6 deletions(-)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf b/Platfo=
rm/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf
index 4b36c3e5ceb2..e13c2f08ce6e 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf
@@ -18,7 +18,6 @@
   Dbg2.aslc

   Fadt.aslc

   Gtdt.aslc

-  Iort.aslc
[SAMI] Why is IORT table being removed here?

   Mcfg.aslc

   RdN2Cfg1/Dsdt.asl

   RdN2Cfg1/Madt.aslc

diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf =
b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf
index 407160c07563..fbf061ad3bdb 100644
--- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf
+++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf
@@ -1,5 +1,5 @@
 #

-#  Copyright (c) 2018, ARM Limited. All rights reserved.

+#  Copyright (c) 2018-2022, ARM Limited. All rights reserved.

 #

 #  SPDX-License-Identifier: BSD-2-Clause-Patent

 #

@@ -13,6 +13,7 @@
   ENTRY_POINT                    =3D SgiPlatformPeim

=20

 [Packages]

+  ArmPlatformPkg/ArmPlatformPkg.dec

   EmbeddedPkg/EmbeddedPkg.dec

   MdePkg/MdePkg.dec

   Platform/ARM/SgiPkg/SgiPlatform.dec

@@ -21,6 +22,11 @@
   FdtLib

   PeimEntryPoint

=20

+[FixedPcd]

+  gArmSgiTokenSpaceGuid.PcdChipCount

+  gArmPlatformTokenSpaceGuid.PcdCoreCount

+  gArmPlatformTokenSpaceGuid.PcdClusterCount

+

 [Sources]

   SgiPlatformPeim.c

=20

diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPk=
g/Include/SgiPlatform.h
index dddb58832d73..311286ce5337 100644
--- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h
+++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
@@ -65,11 +65,18 @@
 #define DRAM_BLOCK2_BASE_REMOTE(ChipId) \

           (SGI_REMOTE_CHIP_MEM_OFFSET (ChipId) + FixedPcdGet64 (PcdDramBlo=
ck2Base))

=20

+// List of isolated CPUs MPID

+typedef struct {

+  UINT64  Count;                // Number of elements present in the list

+  UINT64  Mpid[];               // List containing isolated CPU MPIDs

+} SGI_ISOLATED_CPU_LIST;

+

 // ARM platform description data.

 typedef struct {

   UINTN  PlatformId;

   UINTN  ConfigId;

   UINTN  MultiChipMode;

+  SGI_ISOLATED_CPU_LIST  IsolatedCpuList;

 } SGI_PLATFORM_DESCRIPTOR;

=20

 // Arm SGI/RD Product IDs

diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platfo=
rm/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
index 2f72e7152ff3..80190120ff32 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
@@ -1,14 +1,17 @@
 /** @file

 *

-*  Copyright (c) 2018, ARM Limited. All rights reserved.

+*  Copyright (c) 2018 - 2022, ARM Limited. All rights reserved.

 *

 *  SPDX-License-Identifier: BSD-2-Clause-Patent

 *

 **/

=20

+#include <IndustryStandard/Acpi.h>

+

 #include <Library/AcpiLib.h>

 #include <Library/DebugLib.h>

 #include <Library/HobLib.h>

+#include <Library/UefiBootServicesTableLib.h>

 #include <SgiPlatform.h>

=20

 VOID

@@ -16,6 +19,127 @@ InitVirtioDevices (
   VOID

   );

=20

+/**

+  Search for a MPID in a list

+

+  Performs a linear search for a specified MPID on the given linear

+  list of MPIDs.

+

+  @param[in]  MpidList  Pointer to list.

+  @param[in]  Count     Number of the elements in the list.

+  @param[in]  Mpid      Target MPID.

+

+  @retval TRUE   MPID is present.

+  @retval FALSE  MPID is not present.

+**/

+STATIC

+BOOLEAN

+CheckIfMpidIsPresent (

+  IN UINT64  *MpidList,

+  IN UINT64  Count,

+  IN UINT64  Mpid

+  )

+{

+  UINT64 Idx;

+

+  for (Idx =3D 0; Idx < Count; Idx++) {

+    if (MpidList[Idx] =3D=3D Mpid) {

+      return TRUE;

+    }

+  }

+

+  return FALSE;

+}

+

+/**

+  Disables isolated CPUs in the MADT table

+

+  Parse the IsolatedCpuInfo from the Hob list and updates the MADT table t=
o
[SAMI] Nit.  updates -> update

+  disable cpu's which are not available on the platfrom.

+

+  @param[in] AcpiHeader  Points to the Madt table.

+  @param[in] HobData     Points to the unusable cpuinfo in hoblist.

+**/

+STATIC

+VOID

+UpdateMadtTable (

+  IN EFI_ACPI_DESCRIPTION_HEADER  *AcpiHeader,

+  IN SGI_PLATFORM_DESCRIPTOR      *HobData

+  )

+{

+  UINT8 *StructureListHead;

+  UINT8 *StructureListTail;

+  EFI_ACPI_6_4_GIC_STRUCTURE *GicStructure;

+  BOOLEAN MpidPresent;

+

+  if (HobData->IsolatedCpuList.Count =3D=3D 0) {

+    return;

+  }

+

+  StructureListHead =3D

+    ((UINT8 *)AcpiHeader) +

+    sizeof(EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER);

+  StructureListTail =3D (UINT8 *)AcpiHeader + AcpiHeader->Length;

+

+  // Locate ACPI GICC structure in the MADT table.

+  while (StructureListHead < StructureListTail) {

+    if (StructureListHead[0] =3D=3D EFI_ACPI_6_4_GIC) {

[SAMI] This is definitely not the way to parse an ACPI table. Please don= t do this.

Also, why are you not using DynamicTables framework? It is designed to h= andle such cases.

[/SAMI]


+      GicStructure =3D (EFI_ACPI_6_4_GIC_STRUCTURE *)StructureListHead;

+      // Disable the CPU if its MPID is present in the list.

+      MpidPresent =3D CheckIfMpidIsPresent(

+        HobData->IsolatedCpuList.Mpid,

+        HobData->IsolatedCpuList.Count,

+        GicStructure->MPIDR

+        );

+      if (MpidPresent =3D=3D TRUE) {

+        DEBUG ((

+          DEBUG_INFO,

+          "Disabling Core: %lu, MPID: 0x%llx in MADT\n",

+          GicStructure->AcpiProcessorUid,

+          GicStructure->MPIDR

+          ));

+        GicStructure->Flags =3D 0;

+      }

+    }

+

+    // Second element in the structure component header is length

+    StructureListHead +=3D StructureListHead[1];

+  }

+}

+

+/**

+  Callback to validate and/or update ACPI table.

+

+  On finding a MADT table, disable the isolated CPUs in the MADT table. Th=
e

+  list of isolated CPUs are obtained from the HOB data.

+

+  @param[in] AcpiHeader  Target ACPI table.

+

+  @retval  TURE   Table validated/updated successfully.

+  @retval  FALSE  Error in Table validation/updation.

+**/

+STATIC

+BOOLEAN

+CheckAndUpdateAcpiTable (

+  IN EFI_ACPI_DESCRIPTION_HEADER  *AcpiHeader

+  )

+{

+  VOID *SystemIdHob;

+  SGI_PLATFORM_DESCRIPTOR *HobData;

+

+  // This check updates the MADT table to disable isolated CPUs present on=
 the

+  // platform.

+  if (AcpiHeader->Signature =3D=3D EFI_ACPI_1_0_APIC_SIGNATURE) {
[SAMI] Why EFI_ACPI_6_4_MULTIPLE_APIC_DESCR= IPTION_TABLE_SIGNATURE is not used here?

+    SystemIdHob =3D GetFirstGuidHob (&gArmSgiPlatformIdDescriptorGuid)=
;

+    if (SystemIdHob !=3D NULL) {

+      HobData =3D (SGI_PLATFORM_DESCRIPTOR *)GET_GUID_HOB_DATA (SystemIdHo=
b);

+      UpdateMadtTable (AcpiHeader, HobData);

+    }

+  }

+

+  return TRUE;

+}

+

 EFI_STATUS

 EFIAPI

 ArmSgiPkgEntryPoint (

@@ -25,7 +149,10 @@ ArmSgiPkgEntryPoint (
 {

   EFI_STATUS              Status;

=20

-  Status =3D LocateAndInstallAcpiFromFv (&gArmSgiAcpiTablesGuid);

+  Status =3D LocateAndInstallAcpiFromFvConditional (

+             &gArmSgiAcpiTablesGuid,

+             &CheckAndUpdateAcpiTable

+             );

   if (EFI_ERROR (Status)) {

     DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n", =
__FUNCTION__));

     return Status;

diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c b=
/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
index 7df52cc4fd7c..f778dc8ac7c1 100644
--- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
+++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
@@ -1,6 +1,6 @@
 /** @file

 *

-*  Copyright (c) 2018, ARM Limited. All rights reserved.

+*  Copyright (c) 2018-2022, ARM Limited. All rights reserved.

 *

 *  SPDX-License-Identifier: BSD-2-Clause-Patent

 *

@@ -38,6 +38,8 @@ GetSgiSystemId (
   CONST VOID                    *NtFwCfgDtBlob;

   SGI_NT_FW_CONFIG_INFO_PPI     *NtFwConfigInfoPpi;

   EFI_STATUS                    Status;

+  UINT64                        IsolatedCpuCount;

+  UINT64                        CoreCount;

=20

   Status =3D PeiServicesLocatePpi (&gNtFwConfigDtInfoPpiGuid, 0, NULL,

              (VOID**)&NtFwConfigInfoPpi);

@@ -83,6 +85,32 @@ GetSgiSystemId (
     HobData->MultiChipMode =3D fdt32_to_cpu (*Property);

   }

=20

+  Property =3D fdt_getprop (NtFwCfgDtBlob, Offset, "isolated-cpu-list=
", NULL);

+  if (Property =3D=3D NULL) {

+    DEBUG ((DEBUG_INFO, "%s property not found\n", "isolate=
d-cpu-list"));

+    HobData->IsolatedCpuList.Count =3D 0;

+  } else {

+    CopyMem (&IsolatedCpuCount, Property, sizeof (IsolatedCpuCount));

+    CoreCount =3D

+      FixedPcdGet32 (PcdChipCount) *

+      FixedPcdGet32 (PcdClusterCount) *

+      FixedPcdGet32 (PcdCoreCount);

+    if (IsolatedCpuCount > CoreCount) {

+      DEBUG ((

+            DEBUG_ERROR,

+            "IsolatedCpuCount(%u) is higher than CoreCount(%u)\n"=
;,

+            IsolatedCpuCount,

+            CoreCount

+            ));

+      return EFI_SUCCESS;
[SAMI] Is the status code returned here correct? Should this be EFI_INVALID= _PARAMETER? Also the function name GetSgiSystemId() seems to no longer refl= ect what the function does. Hace you considered renaming it.

+    }

+    CopyMem (

+      &HobData->IsolatedCpuList,

+      Property,

+      sizeof(HobData->IsolatedCpuList) + (CoreCount * sizeof(UINT64))
[SAMI] Coding convention is not followed here and at other places. Can you = fix, please?

+      );

+  }

+

   return EFI_SUCCESS;

 }

=20

@@ -104,11 +132,24 @@ SgiPlatformPeim (
 {

   SGI_PLATFORM_DESCRIPTOR       *HobData;

   EFI_STATUS                    Status;

+  UINT64                        CoreCount;

+  UINTN                         HobSize;

=20

+  CoreCount =3D

+    FixedPcdGet32 (PcdChipCount) *

+    FixedPcdGet32 (PcdClusterCount) *

+    FixedPcdGet32 (PcdCoreCount);

+

+  // Additional size for SGI_ISOLATED_CPU_LIST.

+  // Size =3D (MPID register size in bytes * CoreCount) +

+  //        sizeof(SGI_PLATFORM_DESCRIPTOR)

+  HobSize =3D

+    sizeof (SGI_PLATFORM_DESCRIPTOR) +

+    (CoreCount * sizeof(UINT64));

   // Create platform descriptor HOB

   HobData =3D (SGI_PLATFORM_DESCRIPTOR *)BuildGuidHob (

                                          &gArmSgiPlatformIdDescriptorG=
uid,

-                                         sizeof (SGI_PLATFORM_DESCRIPTOR))=
;

+                                         HobSize);

=20

   // Get the system id from the platform specific nt_fw_config device tree

   if (HobData =3D=3D NULL) {

IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in any medium. Thank you. --------------LDXFxQ4TSK3iA9GVo0OgzG0K--