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.46]) by mx.groups.io with SMTP id smtpd.web11.11864.1611067066039411905 for ; Tue, 19 Jan 2021 06:37:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=BDqdJFbb; spf=pass (domain: arm.com, ip: 40.107.21.46, 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=2K6n7zwgrWKSJRJmze9LYzacW1zUyAJryDE6HuLakGQ=; b=BDqdJFbbwiQwA8mg99MUfFvS7B1bpb24ihQpdjWySb5zOu8AblI0F3hy/dj3pWXGqMc5eEQHKkNNfRPduWswOrsNxn69130Ju6Iv78bHbzrmCYJYhWlIBTWzMDd+aVpZeI4uptMxJ+KLh43NW2zFAjIn42hx+HrHkdRePdy8cjA= Received: from AM5PR0701CA0014.eurprd07.prod.outlook.com (2603:10a6:203:51::24) by AM6PR08MB5094.eurprd08.prod.outlook.com (2603:10a6:20b:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Tue, 19 Jan 2021 14:37:42 +0000 Received: from VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:51:cafe::27) by AM5PR0701CA0014.outlook.office365.com (2603:10a6:203:51::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.6 via Frontend Transport; Tue, 19 Jan 2021 14:37:42 +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 VE1EUR03FT010.mail.protection.outlook.com (10.152.18.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.12 via Frontend Transport; Tue, 19 Jan 2021 14:37:41 +0000 Received: ("Tessian outbound af289585f0f4:v71"); Tue, 19 Jan 2021 14:37:41 +0000 X-CR-MTA-TID: 64aa7808 Received: from 7d12eb412de0.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8DFCB0F8-DE0A-46E2-9A2E-865B2A4F299A.1; Tue, 19 Jan 2021 14:37:36 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7d12eb412de0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 19 Jan 2021 14:37:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VmqWQ1voyCH8cqbHdOfA94qsAnxbofCMo0iiv7H9Y5cB3F+Vsx+OVJWhE9j2k5n34MvhCSp0kViELsIf1iJr61/57AzE2ev/HBuDrketmr+WKssFpnq7rTq8eVNAR81gNbIoJH8dRwS1Ic//rSg7X+U/CjMRdxq9APAp/cMT/k+dQC/08G0vnG+RQWmjOajm/AKZxIESWxji3FfeXawWWJ1bb7xfiFTN0PZaDgkYwdMv0Pd5bbvAaZZq0BxIkwkh5IZt8CD2sfUUW8GXlslUKaddcF9RR3i67OdFo3bOR8vQ/Ia7Hw0LyHxvOTw9mypEf553ViHF6OK2rftrRQ2bDg== 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-SenderADCheck; bh=2K6n7zwgrWKSJRJmze9LYzacW1zUyAJryDE6HuLakGQ=; b=RqKrjymXXIAMq8AGfKlkyCjIAUc1XNy34XSGww1yve8dOpI60jwgqCXbyYAomcKyjZxvVOaKzBQQelN6W4HDj08K23yXqKxX9G61+g3rd1s/p2NbySRrxfG4mCcYl8SbsrNnUvKRSxAy7pPoWBWbcnNEbhRd/Y3xTWA1WHuosL25WaWFTaOSjcvmbfHT6mR5ewpJwYlw4ZriWJbxycQ8sxs3Lw1/1SOZQUHcoEFPvsRW2cmcFebl9fTIGs1yf4uHdTzkZ4cuNCqLzdn2Nxekn8Epi7Nm1xAu3rOm7u69ypZ5O+k+4U9Qv5VMr1RyK57edAd1OgdlZfJCsikLC4WOkg== 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=2K6n7zwgrWKSJRJmze9LYzacW1zUyAJryDE6HuLakGQ=; b=BDqdJFbbwiQwA8mg99MUfFvS7B1bpb24ihQpdjWySb5zOu8AblI0F3hy/dj3pWXGqMc5eEQHKkNNfRPduWswOrsNxn69130Ju6Iv78bHbzrmCYJYhWlIBTWzMDd+aVpZeI4uptMxJ+KLh43NW2zFAjIn42hx+HrHkdRePdy8cjA= Received: from DB7PR08MB3097.eurprd08.prod.outlook.com (2603:10a6:5:1d::27) by DB8PR08MB5354.eurprd08.prod.outlook.com (2603:10a6:10:114::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Tue, 19 Jan 2021 14:37:33 +0000 Received: from DB7PR08MB3097.eurprd08.prod.outlook.com ([fe80::8c43:eec3:76be:9001]) by DB7PR08MB3097.eurprd08.prod.outlook.com ([fe80::8c43:eec3:76be:9001%4]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 14:37:33 +0000 From: "Sami Mujawar" To: "devel@edk2.groups.io" , "leif@nuviainc.com" , Vikas Singh CC: "Meenakshi Aggarwal (meenakshi.aggarwal@nxp.com)" , Paul Yang , Augustine Philips , Samer El-Haj-Mahmoud , "V Sethi (v.sethi@nxp.com)" , arokia.samy , Kuldip Dwivedi , Ard Biesheuvel , Vikas Singh , nd Subject: Re: [edk2-devel] [PATCH v0] Platform/NXP: Add Dynamic Acpi for layerscape platforms Thread-Topic: [edk2-devel] [PATCH v0] Platform/NXP: Add Dynamic Acpi for layerscape platforms Thread-Index: AQHW3bP99PB5dTzgx0mNBCdX3kq7cqogRUgAgAmEMoCAA/CSAIABGqlg Date: Tue, 19 Jan 2021 14:37:33 +0000 Message-ID: References: <1609226758-19867-1-git-send-email-vikas.singh@puresoftware.com> <1609226758-19867-2-git-send-email-vikas.singh@puresoftware.com> <20210110032612.GK1664@vanye> <20210118165530.GX1664@vanye> In-Reply-To: <20210118165530.GX1664@vanye> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 098E9073F3AE56448CEDF132A418C29F.0 x-checkrecipientchecked: true Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.99.251] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 45e5feb4-8fc5-47b2-d4a4-08d8bc87c6f5 x-ms-traffictypediagnostic: DB8PR08MB5354:|AM6PR08MB5094: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fHoAnMvzjTU5zMAtpr39+5ppQC0S5e64NNMvPM9ZU1D4MieAqZuhCVlET0T0FuWVLIR/fPMhVi4ANsyrI/mJLVIQBM5ik5DYy9HaGRsc/Sr8gd8RN6kT0e8oJXM4pNn3Z9eU3UqJ0CgxnRcoHOAQB/bHpX9z2tp0T7+WmjfAzpURB/U8MgNeJ2QIiHnmYVfAJCyBa6piqE9AqZGBVwawKh9km0VesyKdPdZd0AW5xApKSQ1CNNBGnDPtvL8NGKlUmzMxRYg6jq8FKnXdktoLpJBE1HVPfb7XSdu8WC4E3CFbrNaqPfs5jyYjnF6Ub4gZqRGn2+VyHLQwpLN8lBv3/HYDrPHRdYetJlF3wDc1QMKdkWFX4cP1KOrNzjvYC+Ih5zZXk3Q4glnuUfHZBloFCShVisoxKjF4OZbAJKDKE5QCaVD06zVVo7RSuaNR9gqocq7XA5CUOSUJuq1hAC75fNkZhBTPEJsW8NP45TRWKYf8ARHe956vpW+HddrVUI9QGw+rG48llEd50PxvBqoh7/gebo+llJ+omVmkFW+bf6Lo6zS1g9K9WKmMk4iRz4G+0cPA2SJid8NTd/UN8CLcyjUkJ6PDnvqkQzcW3p4nGqQ= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR08MB3097.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(376002)(346002)(136003)(366004)(39850400004)(9686003)(186003)(55016002)(52536014)(2906002)(26005)(316002)(33656002)(8676002)(66446008)(4326008)(66556008)(5660300002)(53546011)(76116006)(966005)(71200400001)(64756008)(66946007)(83380400001)(54906003)(7696005)(86362001)(19627235002)(66476007)(478600001)(6506007)(110136005)(8936002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ZOQUgkV0//0iZPQGH5BRqBlGy4TudJcvEebfIYhkyNJtgxB0BEDmjXmmNPus?= =?us-ascii?Q?QSGYHfoO3+nSOqX5AnNktI/1AdunSZyv2yTfZTJBx3LqMInUK387YZH4gNFq?= =?us-ascii?Q?qrOVDG+0kw32LySI5nrKAJbPRdZpkrkpNiuTgGKPzHlbP/Bi0lfGYS0LqLvc?= =?us-ascii?Q?Lu7OzatrMO7lfIDEk5unCF+xDKR1szMYlKkqcVb5b71a1wujjQ1WWqPPBHn5?= =?us-ascii?Q?eCOZ65I3uX7Wxc3EdyWAkl6chfexIr+440sTN9pfuXBs/faUhXCHbwcVHt70?= =?us-ascii?Q?4tFQe6U6IVX63c8wYFzA7VnWX0UHdrwh1QEAnHwfWmBxMM8rnSMoCyU9QByE?= =?us-ascii?Q?kypvuqsj2ooau87n+Eo6XERfw4qwS/b9f6Ak4UbX5IRu4XLY3ISzxAsPlqSO?= =?us-ascii?Q?KtKf3UWhPumdTNtLiH6Qikkqe0O9p6XuLv5xJFN/IGsoxGSpoB4CXRVhKfYt?= =?us-ascii?Q?gn3H0M+aDHggkJWW0FwoD9FJYqdARN3renB+iylVvIsNrpn99fnANcdcqVIE?= =?us-ascii?Q?pYykfJ+NrINh8oZ81YGzcXEq/jfLh2ewTp+O/aJBKMZlei9wqPcOiG6UfIo+?= =?us-ascii?Q?rkaxUzP4YBkE9tYuS/Q3AmCp6YYA9/rYnK+8r9hO7jG92330wSBIbtaaWNus?= =?us-ascii?Q?hnDcaI2z5D4Or3rUrUBJflzvOCZNYSE+k0R2dvr0N9LVzyDUMo31RDVPfIse?= =?us-ascii?Q?GBeccC4HpZ33cb1/HuW+pBEUYYqfDu3SBg1s9HHALP060xJbiOVfVe8+OqFa?= =?us-ascii?Q?5VdyHHmefnvTsrkiRvnt9mUf8jilE2LMN0A4v6rXZMONab6Of7CuOY34R+vk?= =?us-ascii?Q?FE5LSAA7raebz4W4wGSBViENL58YxQ99Gd1t+ZJlbkKZvnFMUGvZhmvXvZsY?= =?us-ascii?Q?M6v6B5FGMNh7265Ryfk9zbt4tPUFhLLKnSZifyjLKyg5B7GdF/9TbSiYQssZ?= =?us-ascii?Q?7qzdOBhUqkE7zO8HXmkOJ9DZg5EXEb5fRVU8qlMjRQI=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5354 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 149950d1-244e-44cd-d74c-08d8bc87c24e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CXeiz7kXZwEcbPoGAFlWOEIWYc0LUoC4WPRciTK5OhSMe4+uJtAcpPb2c4Af42i5sWpwNyEUcqSp7IuJPOGyi2dif/Ds1zR6GrsV3cZkG+aRT5O05JVW6oedvCwfAl8NqATYfZDMvfl5pSt4c/OuS4QiNTleQDij4enXzX06XTfzBCkObBdvuPZpTo+JWzRY4YRw1N/SuohocXPVy+BvhmFYAjKF/+IySvv00kSwZssT0DhJTCgJtC09VpCpdyr93cyN58i+KltLJu758UVMZNRX6WQ540YjDtCe4lb4f+s4oDyTtj8+XgNuzQj9lUDkF8qdJCh7YJ5CQTibUu26gG6ssOH4Pwmbbb4P8irJkDG285nKR9S3tv5VSGwZi50PC/CL9AnZJInvnYqlHR/A+h4G/43tqqye/kLG4M47mUv8J/sqTp4DSczPAOghuw/Sj7wG5jSXxUPnUPruzKExZXPwzD2a+KWtkCeyJcmFHVUNq6JF1h0CeVD7DYyqHHkFu52QyXjkHWI9dzqcbaqm0XV7UsXFQ0oC9y+KO15VEZw= 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)(136003)(39850400004)(396003)(346002)(376002)(46966006)(26005)(478600001)(52536014)(70206006)(7696005)(47076005)(356005)(2906002)(33656002)(83380400001)(316002)(70586007)(336012)(54906003)(55016002)(110136005)(8936002)(82740400003)(966005)(186003)(9686003)(82310400003)(6506007)(8676002)(53546011)(86362001)(4326008)(5660300002)(81166007)(19627235002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 14:37:41.5812 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45e5feb4-8fc5-47b2-d4a4-08d8bc87c6f5 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: VE1EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5094 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Leif, Please find my response inline marked [SAMI]. Regards, Sami Mujawar -----Original Message----- From: devel@edk2.groups.io On Behalf Of Leif Lindho= lm via groups.io Sent: 18 January 2021 04:56 PM To: Vikas Singh Cc: devel@edk2.groups.io; Sami Mujawar ; Meenakshi A= ggarwal (meenakshi.aggarwal@nxp.com) ; Paul Yan= g ; Augustine Philips ; Samer= El-Haj-Mahmoud ; V Sethi (v.sethi@nxp.com) <= v.sethi@nxp.com>; arokia.samy ; Kuldip Dwived= i ; Ard Biesheuvel ; Vikas Singh Subject: Re: [edk2-devel] [PATCH v0] Platform/NXP: Add Dynamic Acpi for la= yerscape platforms +Sami, On Sat, Jan 16, 2021 at 10:15:41 +0530, Vikas Singh wrote: > On Sun, Jan 10, 2021 at 8:56 AM Leif Lindholm wrote: > > > > On Tue, Dec 29, 2020 at 12:55:58 +0530, Vikas Singh wrote: > > > These changes intend to add > > > > Hopefully they actually do. > > > > > - Common Configuration Manager (CM) for all fsl platforms. > > > - Platform headers consumed by CM for LX2160ARDB. > > > - Clk dsdt properties for LX2160ARDB. > > > > This sounds like (at least) three patches. > > > Leif, I plan to disintegrate the complete changes into 2 patch set's > and will be sharing this series early next week. > set1: Add Common Configuration Manager (CM) for all fsl platforms and > headers consumed by CM for LX2160ARDB. > set2: Add platform specific DSDT generator and Clk dsdt properties for > LX2160ARDB. This sounds sensible. > > > > > > Signed-off-by: Vikas Singh > > > --- > > > .../ConfigurationManager/ConfigurationManager.dec | 24 + > > > .../ConfigurationManager.dsc.inc | 21 + > > > .../ConfigurationManagerDxe/ConfigurationManager.c | 709 ++++++++++= +++++++++++ > > > .../ConfigurationManagerDxe/ConfigurationManager.h | 229 +++++++ > > > .../ConfigurationManagerDxe.inf | 52 ++ > > > .../Include/PlatformAcpiTableGenerator.h | 20 + > > > Platform/NXP/Env.cshrc | 73 +++ > > > .../LX2160aRdbPkg/AcpiTablesInclude/Dsdt/Clk.asl | 40 ++ > > > .../LX2160aRdbPkg/AcpiTablesInclude/Dsdt/Dsdt.asl | 15 + > > > .../AcpiTablesInclude/PlatformAcpiDsdtLib.inf | 39 ++ > > > .../PlatformAcpiDsdtLib/RawDsdtGenerator.c | 146 +++++ > > > .../AcpiTablesInclude/PlatformAcpiLib.h | 24 + > > > Platform/NXP/LX2160aRdbPkg/Include/Platform.h | 244 +++++++ > > > Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dec | 6 +- > > > Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dsc | 30 + > > > Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf | 12 + > > > Platform/NXP/build.sh | 121 ++++ > > > 17 files changed, 1804 insertions(+), 1 deletion(-) > > > create mode 100644 Platform/NXP/ConfigurationManager/ConfigurationM= anager.dec > > > create mode 100644 Platform/NXP/ConfigurationManager/ConfigurationM= anager.dsc.inc > > > create mode 100644 Platform/NXP/ConfigurationManager/ConfigurationM= anagerDxe/ConfigurationManager.c > > > create mode 100644 Platform/NXP/ConfigurationManager/ConfigurationM= anagerDxe/ConfigurationManager.h > > > create mode 100644 Platform/NXP/ConfigurationManager/ConfigurationM= anagerDxe/ConfigurationManagerDxe.inf > > > create mode 100644 Platform/NXP/ConfigurationManager/Include/Platfo= rmAcpiTableGenerator.h > > > create mode 100755 Platform/NXP/Env.cshrc > > > create mode 100644 Platform/NXP/LX2160aRdbPkg/AcpiTablesInclude/Dsd= t/Clk.asl > > > create mode 100644 Platform/NXP/LX2160aRdbPkg/AcpiTablesInclude/Dsd= t/Dsdt.asl > > > create mode 100644 Platform/NXP/LX2160aRdbPkg/AcpiTablesInclude/Pla= tformAcpiDsdtLib.inf > > > create mode 100644 Platform/NXP/LX2160aRdbPkg/AcpiTablesInclude/Pla= tformAcpiDsdtLib/RawDsdtGenerator.c > > > create mode 100644 Platform/NXP/LX2160aRdbPkg/AcpiTablesInclude/Pla= tformAcpiLib.h > > > create mode 100644 Platform/NXP/LX2160aRdbPkg/Include/Platform.h > > > create mode 100755 Platform/NXP/build.sh > > > > > > diff --git a/Platform/NXP/ConfigurationManager/ConfigurationManagerD= xe/ConfigurationManager.h b/Platform/NXP/ConfigurationManager/Configuration= ManagerDxe/ConfigurationManager.h > > > new file mode 100644 > > > index 0000000..cf09ef9 > > > --- /dev/null > > > +++ b/Platform/NXP/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManager.h > > > @@ -0,0 +1,229 @@ > > > +/** @file > > > + Configuration Manager headers > > > + > > > + Copyright 2020 NXP > > > + Copyright 2020 Puresoftware Ltd > > > + > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > + > > > + @par Glossary: > > > + - Cm or CM - Configuration Manager > > > + - Obj or OBJ - Object > > > +**/ > > > + > > > +#ifndef CONFIGURATION_MANAGER_H__ > > > +#define CONFIGURATION_MANAGER_H__ > > > + > > > +#include > > > +#include > > > + > > > +/** The configuration manager version > > > +*/ > > > +#define CONFIGURATION_MANAGER_REVISION CREATE_REVISION (0, 0) > > > + > > > +/** The OEM ID > > > +*/ > > > +#define CFG_MGR_OEM_ID { 'N', 'X', 'P', ' ', ' ', ' ' } > > > + > > > +/** A helper macro for populating the GIC CPU information > > > + */ > > > +#define GICC_ENTRY( = \ > > > + CPUInterfaceNumber, = \ > > > + Mpidr, = \ > > > + PmuIrq, = \ > > > + VGicIrq, = \ > > > + EnergyEfficiency = \ > > > + ) { = \ > > > + CPUInterfaceNumber, /* UINT32 CPUInterfaceNumber *= / \ > > > + CPUInterfaceNumber, /* UINT32 AcpiProcessorUid *= / \ > > > + EFI_ACPI_6_2_GIC_ENABLED, /* UINT32 Flags *= / \ > > > + 0, /* UINT32 ParkingProtocolVersion *= / \ > > > + PmuIrq, /* UINT32 PerformanceInterruptGsiv *= / \ > > > + 0, /* UINT64 ParkedAddress *= / \ > > > + GICC_BASE, /* UINT64 PhysicalBaseAddress *= / \ > > > + GICV_BASE, /* UINT64 GICV *= / \ > > > + GICH_BASE, /* UINT64 GICH *= / \ > > > + VGicIrq, /* UINT32 VGICMaintenanceInterrupt *= / \ > > > + 0, /* UINT64 GICRBaseAddress *= / \ > > > + Mpidr, /* UINT64 MPIDR *= / \ > > > + EnergyEfficiency /* UINT8 ProcessorPowerEfficiency *= / \ > > > +} > > > + > > > +/** A helper macro for returning configuration manager objects > > > +*/ > > > +#define HANDLE_CM_OBJECT(ObjId, CmObjectId, Object, ObjectCount) = \ > > > + case ObjId: { = \ > > > + CmObject->ObjectId =3D CmObjectId; = \ > > > + CmObject->Size =3D sizeof (Object); = \ > > > + CmObject->Data =3D (VOID*)&Object; = \ > > > + CmObject->Count =3D ObjectCount; = \ > > > + DEBUG (( = \ > > > + DEBUG_INFO, = \ > > > + #CmObjectId ": Ptr =3D 0x%p, Size =3D %d, Count =3D %d\n", = \ > > > + CmObject->Data, = \ > > > + CmObject->Size, = \ > > > + CmObject->Count = \ > > > + )); = \ > > > + break; = \ > > > + } > > > > This is code obfuscation. Please don't invent your own programming > > languages. In C, the case, the start bracket, the break and the end > > bracket always go inline. > > The rest would be better as a static helper function than a macro. > > > Leif, changes are in accordance with : > https://raw.githubusercontent.com/tianocore-docs/Docs/master/Specificati= ons/CCS_2_1_Draft.pdf Do you mean 5.5.2.1: Functional macros are generally discouraged. ? > and in reference to : > https://github.com/tianocore/edk2-platforms/blob/master/Platform/ARM/Jun= oPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h#L9= 4 Clearly I was asleep at the wheel when reviewing that set. So let me state unambiguously: Hiding *gotos* away in a header macro turns the language into something other than C. Sami: please rewrite the referenced code in a way that does not obfuscate the program flow. [SAMI] I will submit a patch that removes the macros and uses static funct= ions.=20 [/SAMI] Vikas: please submit a v2 that does not obfuscate the program flow. > > > +/** The number of ACPI tables to install > > > +*/ > > > +#define PLAT_ACPI_TABLE_COUNT 6 > > > > This feels suboptimal. > > Could this be calculated at run- or compile time? > > > Leif, I plan to chnage like this : PLAT_ACPI_TABLE_COUNT =3D > CM_MANDATORY_TBLS + OEM_ACPI_TBLS > Here CM_MANDATORY_TBLS must be known to CM upfront and is fixed as per > thr CM's implementation (min tables needed to boot any os). > OEM_ACPI_TBLS should be coming form platforms headers only. > Unfortunately this can not be done at runtime /compile time. OK. This is still an improvement over direct hard-coding. > > > diff --git a/Platform/NXP/ConfigurationManager/Include/PlatformAcpiT= ableGenerator.h b/Platform/NXP/ConfigurationManager/Include/PlatformAcpiTab= leGenerator.h > > > new file mode 100644 > > > index 0000000..da3c571 > > > --- /dev/null > > > +++ b/Platform/NXP/ConfigurationManager/Include/PlatformAcpiTableGen= erator.h > > > @@ -0,0 +1,20 @@ > > > +/** @file > > > + Acpi Table generator headers > > > + > > > + Copyright 2020 NXP > > > + Copyright 2020 Puresoftware Ltd > > > + > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > + > > > +**/ > > > + > > > +#ifndef PLATFORM_ACPI_TABLE_GENERATOR_H_ > > > +#define PLATFORM_ACPI_TABLE_GENERATOR_H_ > > > + > > > +typedef enum PlatAcpiTableId { > > > + EPlatAcpiTableIdReserved =3D 0x0000, ///< Reserved > > > + EPlatAcpiTableIdDsdt, > > > + EPlatAcpiTableIdMax > > > +} EPLAT_ACPI_TABLE_ID; > > > > Where does the EPlat prefix come from? What does it stand for? > > > Leif, this will be corrected. > e.g: EPlatAcpiTableIdReserved -> PlatAcpiTableIdReserved > These Id's will be used by OEM/platforms defined generators etc. Makes sense. > > > + > > > +#endif Best Regards, Leif