From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.85]) by mx.groups.io with SMTP id smtpd.web12.11557.1633709134167129965 for ; Fri, 08 Oct 2021 09:05:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=UsYM38LX; spf=pass (domain: arm.com, ip: 40.107.6.85, mailfrom: sami.mujawar@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=ZBRqUB9oNWcCqdGj6x6Jz+ArYfCm9JnoBxOPmI4kmSI=; b=UsYM38LXQXMTQ3wQ1n2vuJbgqDfePYdtCZI1N6CNxnbki3bttVTl91HsMHX1N6kq8rIeRuTPstX5h8vHhgQkIlk46aCffvS6Q2RvXwgrnuzLQNZSjIkStNTUOg6cz/3CVFheXwg8OeR9MafdprPQhvDLaAYXVmsA8n/8I3rkZfU= Received: from AS9PR06CA0136.eurprd06.prod.outlook.com (2603:10a6:20b:467::28) by AM5PR0802MB2499.eurprd08.prod.outlook.com (2603:10a6:203:a1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17; Fri, 8 Oct 2021 16:05:31 +0000 Received: from VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:467:cafe::40) by AS9PR06CA0136.outlook.office365.com (2603:10a6:20b:467::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.16 via Frontend Transport; Fri, 8 Oct 2021 16:05:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT045.mail.protection.outlook.com (10.152.19.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 16:05:31 +0000 Received: ("Tessian outbound e27daf245730:v103"); Fri, 08 Oct 2021 16:05:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c3aff418c26e7481 X-CR-MTA-TID: 64aa7808 Received: from bfafdaddc269.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 21F02813-540C-4A8B-B1AB-367615E1DE0F.1; Fri, 08 Oct 2021 16:05:23 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id bfafdaddc269.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 08 Oct 2021 16:05:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xgx4EZFW668tMfC/fa7zpNK6VJjYK68mX11tbQh79haYPgcaE6YcnckQeZSsfCBLB3pZMSsblrsp2JwfdkOpm/LyQLNfCS9S8h5xoDxyHoJ4OXm7XtjQw94HZz1/qoNY6WLQiAGMRzWAieHSNGbOK4LcAJKkOLiJuT7L83wgRdBbx1SOQYxt8kok1tqSDNQ4jyrCq0qCdmU3EdV1x1O+S3Nc1sKOcncXNHHAvTrawnaxoY6O8gaPQ2j7H981OnEyiRE5Pu0u+Davk9McDbMcnE6uVALRluyb46S/3tpAQhK/mawFkdYS84e69v3LFDGBSW/LKa3FY2Dzf/IM2hq/KA== 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=ZBRqUB9oNWcCqdGj6x6Jz+ArYfCm9JnoBxOPmI4kmSI=; b=Byl67c4dyJpdmSfxXjp6I4PK/vx9iIcLqTChL9nm1jylob+DQtAPe3oZy4EOy3Kqmozxz8ixbinBCsufCXIuKx28aOK5FCkR777yir+p0VSYBYbHM/VtUBWG0lI7wWohtdNWTZE90luCVAXMnwr1tq3i2QA0WqcFhYnA08sKnmMfKgCNr6lhqhSdcmrpsQnhUhuCvNORPfsLj18yej6fFTbhh6oWRpBLAt9puX9p5Dz/J5NF+LIfEYvd7tdLD9UzwtErD/UrNtAprsdSAVgFamuL47GK5IuQpuQkZLBA8gDx5qvZPien5kxrOf08gOIIIqMWQX1pEvv5Fa2qOUwAqg== 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=ZBRqUB9oNWcCqdGj6x6Jz+ArYfCm9JnoBxOPmI4kmSI=; b=UsYM38LXQXMTQ3wQ1n2vuJbgqDfePYdtCZI1N6CNxnbki3bttVTl91HsMHX1N6kq8rIeRuTPstX5h8vHhgQkIlk46aCffvS6Q2RvXwgrnuzLQNZSjIkStNTUOg6cz/3CVFheXwg8OeR9MafdprPQhvDLaAYXVmsA8n/8I3rkZfU= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM7PR08MB5333.eurprd08.prod.outlook.com (2603:10a6:20b:104::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.21; Fri, 8 Oct 2021 16:05:21 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65%4]) with mapi id 15.20.4587.022; Fri, 8 Oct 2021 16:05:21 +0000 Subject: Re: [PATCH v3 00/21] Create a SSDT CPU topology generator To: Pierre.Gondois@arm.com, devel@edk2.groups.io, Alexei.Fedorov@arm.com, nd References: <20211008144632.31894-1-Pierre.Gondois@arm.com> From: "Sami Mujawar" Message-ID: <359d9a1c-a793-2d0c-1ff8-fe65c06e54fd@arm.com> Date: Fri, 8 Oct 2021 17:05:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20211008144632.31894-1-Pierre.Gondois@arm.com> X-ClientProxiedBy: LO4P123CA0342.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::23) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 Received: from [10.1.196.43] (217.140.106.52) by LO4P123CA0342.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 16:05:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 535023c9-896d-4d2c-8ddf-08d98a75740c X-MS-TrafficTypeDiagnostic: AM7PR08MB5333:|AM5PR0802MB2499: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: xzGqK7syIUZhAu9bnMbgi2nXxZX+ATpgq2PMuEA6fwtBdhVi5DJteK9/V8VaWOosiaPaUqadp9taQfKx4rMG0tmz5w0/cjqLqpMHfAFq1ipKs/mYwWP/UB25lUBkqNsbWr3MlSQfJmuSkPpkUv6qz/IR7+yHUepcjG/GUF5AJLiKNc/TMd3gWYHCpGMy6f/Wy+Wivn4eKyS6sjiZs0fHQh/V2BO7p8nKaGzPuQqZaT0tKIT/CI6kcj1KI8Dx6ja0kOKZ482H2d1nSAR4YvzrNqANbyps3ALSbx6A09/kgNEagcFsgEUJsclW8bFQj1p5l/qYPB6egcjROyr5/IDwlODGWTN962qEH/pw/g27Y6Hcj/7P5K6No2Ng8TMQrRJt4irYK8EchnSRDfcuvoFrakGXSO+Mshjd5sGYCDi2/ROrax+Q4KS5JUTWfPBRBqE8whmjrkGr+NVQQJayM4GTDWH+Y0I75MiTvGmnkbu0P/2gQYMk+JKY5rEP9uEyS4nyLxCcFcdTjnNilPJ0iJl0VDQ4bUf3XSuzCANToFejuJBYRE63l5mIgiv2l5l3DaY/yTE6YH6dm9SIjjrmj4lY8G+1bFKNjzoojJxD1Un3g+XTutKajQUvIMr0y4nilJUtCx1LrmLqx+b5UqD92oCXs20eP5M+RK7MjeghxkkJ8DgNd2pExx2n4YHfSVDhTlE6ZqWowJTylMIsI37AxbMKQDECxSNR7Tnkxz+gTOXs036fu+P+Y22RTQlFXyXUiHo5rp+YICtpedM9tN42sHLQOK7cZwL2QkaPoscbdD/realFVqYhi1RIbYL6CTglb5gmkWrkyCtaB/aADQdigi9bHeVilzTU3xMLbaReba42XEY= 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:(4636009)(366004)(36756003)(38350700002)(66556008)(66476007)(38100700002)(5660300002)(52116002)(53546011)(6636002)(19627235002)(186003)(44832011)(2906002)(66946007)(6862004)(26005)(316002)(37006003)(16576012)(83380400001)(508600001)(86362001)(956004)(31686004)(6486002)(8676002)(8936002)(966005)(31696002)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5333 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 32e06c35-cf9f-41d2-d1bd-08d98a756dda X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QyrrgU/CDCF8hL81HpFZ8/kEe6Wxn4K9USoljEhJ8Q8b9b08efikcUN0yK2cMaIlW48p+zGvVreJKdO1FyIm7UjRTCg32iINI0RJnJhevxdD4qn524NzW/Z/ya+EhqCl5YxeLzBmTILXT6E3Hkl87m6IK/2PozCUTaZcQbp0JQUb4eTe2ji470meI1b8FpIokMbInjZ9raLVMzahPrfRCFmUSIAuGVSmx2dj4dvgijUUpeWaU8BngtlqkTBX3Bd7SzfTOmkxqVUc9EGitwHXL6yXJW1MM8TjUBtITtY+fnpFIyoWi0U8D83flIEWFyM9TxN2nyoyHln5qlodbDGezX21JjlYEWSqrFkRc25pIPCzpi9YGkcAE/rL/6KcaxlwInzFmvy3PU8rkMHtYaGyLlZy0M6lo3cKxs42Ruf9dew6/WXkOQg+6YEZ8b9No/+0AGsANP7h4wsR2W18J6gTatwmj6sreAo4dKWA8BwLQNSeqSiqv49UMBji/NJXNCIs8yrvMAxepgMVwhXLwLWQLsz1oo51YdMeQgSp01VuGxNlTGKUTGjfJNDPXA03ViaHsFPvIFMCJ/wcCXSRkyTNoCZIRga37irSoo7PuVsaieeGo8x7ArmOfRitYjxIdQsooPVWIrghKQjBnvc0LD3k8pqHn4oj2rA2qkCZm5o55vVh9nt+Ig1X8He9dTAMRdisXhT3QaYPZmy9c0aZ1QaQ1m72Tdt8mlmEv/UffqlmRMyBbc5GLXFPfiYJd4elVpdhuSYCQfdBW99pje97ao5D+DOGNHtVJw+0zKeihlQ8N+6EzxuIE3MykrrH3IQI3xg2 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:(4636009)(46966006)(36840700001)(6636002)(86362001)(26005)(966005)(316002)(82310400003)(81166007)(8936002)(83380400001)(70586007)(2906002)(186003)(47076005)(5660300002)(53546011)(70206006)(336012)(31696002)(36860700001)(356005)(31686004)(6486002)(36756003)(16576012)(37006003)(8676002)(956004)(19627235002)(2616005)(44832011)(6862004)(508600001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 16:05:31.1322 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 535023c9-896d-4d2c-8ddf-08d98a75740c 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: VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2499 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-GB Merged as 30400318a278..769e63999ff5 Thanks. Regards, Sami Mujawar On 08/10/2021 03:46 PM, Pierre.Gondois@arm.com wrote: > From: Pierre Gondois > > v2: > - Update or error handling. [Sami/Pierre] > - Various comments. [Sami] > and > New patches: > DynamicTablesPkg: Remove unnecessary includes > DynamicTablesPkg: Add missing parameter check > DynamicTablesPkg: Add AddSsdtAcpiHeader() > DynamicTablesPkg: Add AmlRdSetEndTagChecksum() > DynamicTablesPkg: Add AmlSetRdListCheckSum() > DynamicTablesPkg: Set EndTag's Checksum if RdList is modified > DynamicTablesPkg: Clear pointer in node creation fcts > DynamicTablesPkg: Update error handling for node creation > > v3: > -Fix typo and error handling. [Sami] > > As part of the DynamicTablesPkg, add a generator creating a > SSDT table representing a CPU topology. Low Power Idle (LPI) > states can also be generated along the CPUs. > This patch-set also adds new functions to generate AML bytecode. > > The changes can be seen at: https://github.com/PierreARM/edk2/tree/1449_C= reate_ssdt_cpu_topology_generator_v3 > > Pierre Gondois (21): > DynamicTablesPkg: Remove unnecessary includes > DynamicTablesPkg: Add missing parameter check > DynamicTablesPkg: Add AddSsdtAcpiHeader() > DynamicTablesPkg: Add AmlRdSetEndTagChecksum() > DynamicTablesPkg: Add AmlSetRdListCheckSum() > DynamicTablesPkg: Set EndTag's Checksum if RdList is modified > DynamicTablesPkg: Clear pointer in node creation fcts > DynamicTablesPkg: Update error handling for node creation > DynamicTablesPkg: Make AmlNodeGetIntegerValue public > DynamicTablesPkg: AML Code generation for Register() > DynamicTablesPkg: AML Code generation for Resource data EndTag > DynamicTablesPkg: AML code generation for a Package > DynamicTablesPkg: Helper function to compute package length > DynamicTablesPkg: AML code generation for a ResourceTemplate > DynamicTablesPkg: AML code generation for a Method > DynamicTablesPkg: AML code generation to Return a NameString > DynamicTablesPkg: AML code generation for a Method returning a NS > DynamicTablesPkg: AML code generation for a _LPI object > DynamicTablesPkg: AML code generation to add an _LPI state > DynamicTablesPkg: Add CM_ARM_LPI_INFO object > DynamicTablesPkg: SSDT CPU topology and LPI state generator > > DynamicTablesPkg/DynamicTables.dsc.inc | 6 + > DynamicTablesPkg/Include/AcpiTableGenerator.h | 7 +- > .../Include/ArmNameSpaceObjects.h | 68 + > .../Include/Library/AmlLib/AmlLib.h | 168 ++ > .../Include/Library/TableHelperLib.h | 35 + > .../SsdtCmn600Generator.c | 2 - > .../SsdtCpuTopologyGenerator.c | 1228 +++++++++++++++ > .../SsdtCpuTopologyGenerator.h | 134 ++ > .../SsdtCpuTopologyLibArm.inf | 33 + > .../SsdtSerialPortGenerator.c | 3 - > .../Library/Common/AmlLib/AmlEncoding/Aml.c | 87 +- > .../Library/Common/AmlLib/AmlEncoding/Aml.h | 47 +- > .../Common/AmlLib/CodeGen/AmlCodeGen.c | 1350 ++++++++++++++++- > .../AmlLib/CodeGen/AmlResourceDataCodeGen.c | 210 ++- > .../AmlLib/CodeGen/AmlResourceDataCodeGen.h | 92 ++ > .../AmlLib/ResourceData/AmlResourceData.c | 33 + > .../AmlLib/ResourceData/AmlResourceData.h | 21 + > .../Library/Common/AmlLib/Tree/AmlClone.c | 2 - > .../Library/Common/AmlLib/Tree/AmlNode.c | 18 +- > .../Library/Common/AmlLib/Tree/AmlNode.h | 12 +- > .../Common/AmlLib/Tree/AmlNodeInterface.c | 7 + > .../Library/Common/AmlLib/Tree/AmlTree.c | 72 +- > .../Library/Common/AmlLib/Utils/AmlUtility.c | 79 +- > .../Library/Common/AmlLib/Utils/AmlUtility.h | 50 +- > .../SsdtSerialPortFixupLib.c | 1 - > .../ConfigurationManagerObjectParser.c | 35 + > .../Common/TableHelperLib/TableHelper.c | 89 ++ > 27 files changed, 3814 insertions(+), 75 deletions(-) > create mode 100644 DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopolog= yLibArm/SsdtCpuTopologyGenerator.c > create mode 100644 DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopolog= yLibArm/SsdtCpuTopologyGenerator.h > create mode 100644 DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopolog= yLibArm/SsdtCpuTopologyLibArm.inf > 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.