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.75]) by mx.groups.io with SMTP id smtpd.web11.1171.1619805919422492754 for ; Fri, 30 Apr 2021 11:05:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=ynVOo2xU; spf=pass (domain: arm.com, ip: 40.107.21.75, mailfrom: samer.el-haj-mahmoud@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=VEKURnyN0YKRtZEu1bYj81mJnSjByBLTpbyTreqb4jg=; b=ynVOo2xUTMV/0Pp3EjK1qZ4LNAaENIad3IkgT8FYaqqN0xJ0fd+2C/8o6YImbY72G/PySJdkOculVBsexvXuwvlXA3hLT1HqWhiQuNHyKhF5z60NRznOg1FWL2DCqx0ZGeWgSNe/YJvtRrodiGqRSbQtD3wl88epzXlGunX71N8= Received: from AS8PR04CA0150.eurprd04.prod.outlook.com (2603:10a6:20b:127::35) by VI1PR08MB3069.eurprd08.prod.outlook.com (2603:10a6:803:45::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Fri, 30 Apr 2021 18:05:16 +0000 Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:127:cafe::5f) by AS8PR04CA0150.outlook.office365.com (2603:10a6:20b:127::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Fri, 30 Apr 2021 18:05:15 +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 VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Fri, 30 Apr 2021 18:05:15 +0000 Received: ("Tessian outbound 13cdc29c30b8:v91"); Fri, 30 Apr 2021 18:05:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9d488cd566f97abb X-CR-MTA-TID: 64aa7808 Received: from c66d8609e9b2.4 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E09976AA-C4BC-4ADE-89DA-7A4E0B4BAF2F.1; Fri, 30 Apr 2021 18:05:04 +0000 Received: from FRA01-MR2-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c66d8609e9b2.4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 30 Apr 2021 18:05:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OkdIQJay/EjyX0cNH7aG9aQun+AAwWwnOOBTn2k2CLGyodI/fa5+IXsix58rGsRtUhqrRITFNR86rlFaL2jDphMz4mo3Ydp4EWUM1X1L/IDXMWrPsz2Up/2i1MvWmb0fgByHNpWeZtf3bZuNP+oaKqTDXrL98xXykVcd/nmMf29tz7cCar1LuQnyj0E2B3mJJ7U+XxDV0dFXDsu1W4XO7ink9Vt7nDqvf7Rfx1oXN5ifO4JKpglKkPfni0CmiSZ+Xh3vVft0f/BCRsbr466Ka7E2dr8GmYauEQobeUMpwaACAbxgCI2aY0RJsurBejM/QY33vN4wqM85SpbQ9D1Wrw== 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=VEKURnyN0YKRtZEu1bYj81mJnSjByBLTpbyTreqb4jg=; b=oXXzgjb5TNfPuen/yeIumMVumaIpzfSI7LclVG6bj51TNvOf6YY+9qCgM0CGdGWI4U1OIsZDOjQH9Ds/A2tbw3JMQjjLx67Wpu/mTrlYA9xNHyDBzR8b8O8olSK9rpjzyrV8Vy1N6ebJ3jO7EMQkp941pHliq9rMrhk7VNZMMFGPYUxaFkggvEzvuiOAf+Lm0IVpVeA5FtmkWQxQ8YeDKvaMNzSxa+9+W/aBT+VuPFT95TxTSf9WB2yBPL0hqT/ojl7/9YnYaapyRB6pvXvyrlvdPcVvMkdgRjq+L7+J713/xtpDpEqVuzTOFyF78YQsX9vmHB1ZAeGikhIEhESVXg== 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=VEKURnyN0YKRtZEu1bYj81mJnSjByBLTpbyTreqb4jg=; b=ynVOo2xUTMV/0Pp3EjK1qZ4LNAaENIad3IkgT8FYaqqN0xJ0fd+2C/8o6YImbY72G/PySJdkOculVBsexvXuwvlXA3hLT1HqWhiQuNHyKhF5z60NRznOg1FWL2DCqx0ZGeWgSNe/YJvtRrodiGqRSbQtD3wl88epzXlGunX71N8= Received: from PAXPR08MB6987.eurprd08.prod.outlook.com (2603:10a6:102:1df::15) by PR2PR08MB4634.eurprd08.prod.outlook.com (2603:10a6:101:1f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.26; Fri, 30 Apr 2021 18:05:01 +0000 Received: from PAXPR08MB6987.eurprd08.prod.outlook.com ([fe80::7c65:78c4:8d03:62ad]) by PAXPR08MB6987.eurprd08.prod.outlook.com ([fe80::7c65:78c4:8d03:62ad%7]) with mapi id 15.20.4087.035; Fri, 30 Apr 2021 18:05:01 +0000 From: "Samer El-Haj-Mahmoud" To: "devel@edk2.groups.io" , Samer El-Haj-Mahmoud , "Andrei Warkentin (awarkentin@vmware.com)" , Jeremy Linton CC: Ard Biesheuvel , "leif@nuviainc.com" , "pete@akeo.ie" , Samer El-Haj-Mahmoud Subject: Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Thread-Topic: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Thread-Index: AQHXLDxK9rrtmosIqEClGyylGxm9MaqqrQyAgAf3JdCAGQOlEIAB1fRg Date: Fri, 30 Apr 2021 18:05:01 +0000 Message-ID: References: <20210408055843.2883563-1-jeremy.linton@arm.com>,<20210408055843.2883563-4-jeremy.linton@arm.com> <167578A6C978A75F.9301@groups.io> <167A591C4A42BD1B.6294@groups.io> In-Reply-To: <167A591C4A42BD1B.6294@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: [99.132.126.10] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 7bc91050-f21a-4c5b-9ecc-08d90c0281bb x-ms-traffictypediagnostic: PR2PR08MB4634:|VI1PR08MB3069: 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: s4N/b9kK6HI1KJev04FHIyM2vn8/kQvpfvDKODdBAxgZ65lEgXi4j+73X3YYkFgBwiPKNj/WEfFqAn/6aItBPon6kJc4AhpalKZnbx5JxYX3LRhlvQmMYD2lLpqLteqxmVe5KuhjFvOO8Ky8O373RK8UN6JJGVqXRbfM5Rm8psccaMMnuXTETxVAaqC9LNflGfefTS7cOrwGctDUhYEiNExOeYnYGlyUdHrE57byZZ4jRr+OjrD8oYW39bmqmyHxOhWlgj/oEGjdN6syPakkifE6appphPVTZkkdYc0coZ6TyMLL9ennDx4zV08q8pm8YnlmUSglOP1OizQVdnI0yu4Cmy+DuSxsYhYwoelprmD0P/VyiS3LDjx5g5eEb4JPi4EGtheLevcy3wfCJtGWlLXKa2zhYBn+LT8WwySZ5JQl390YulbWzgAmdbAwD5UIubbSniEEIC7vyPD0xUZSL2C34tarZTM8t7N0SpiL0rzkXVOKTVpIfpPCjCTl9QnPbecZLFly+ZWLJLxA17aFI4BHmlqQJcd4RE7b5GK272aJ7IpSqkh3SXLDSBkoyJclwnGHj6OMI2zBdIis3IFYlrif0TW+1rymWdzuA57josg2EkMS2FC2F273p1Krbamgmgg5riWMdOoQg/JdtENMHFzv//yErTqW3CZJq0Ds0GRgUqzzO9WNqbhbOuWxyx3F X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6987.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39850400004)(136003)(396003)(346002)(376002)(122000001)(64756008)(38100700002)(33656002)(66946007)(6506007)(478600001)(8676002)(76116006)(53546011)(166002)(66476007)(66556008)(66446008)(5660300002)(71200400001)(966005)(4326008)(86362001)(83380400001)(8936002)(6636002)(316002)(7696005)(54906003)(9686003)(26005)(110136005)(76236003)(2906002)(55016002)(186003)(52536014);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?+FEo1RVaFffIOUM/+h/KNtjckrCj9VRvp+/EyMHgu6YPmAQ1FL5zYmc3itFw?= =?us-ascii?Q?PIszjDK6HjY+wH7i6f+oKld6sUVFDhmoK3dHKElL5oiCAHlauiySRwlsKhK4?= =?us-ascii?Q?8xD/0GsXd3tS6ooUG4B6BK2jQ0YJgJT7yuMvCSRBqX4PdGOxzujxK0u2lc9S?= =?us-ascii?Q?T0w9DfpLzxR6p4UYX4oIg8izLdRgkMxXYsosIhEJBZ6FprQn6i353jA1Y11B?= =?us-ascii?Q?qkc5pZtz5VSjafSLCg2nLvnkmt8bgV+X2fEtkR+xeE4W5T51Uq/aCpgqLD4s?= =?us-ascii?Q?dT+ekrRjtY2i5oyP6ZR6LkWEyZP9f0ugNCLO7meW1B5JrqyhxCmaivXgSx+q?= =?us-ascii?Q?vck8hJuu4jaVgGctrzTmhef6DgddUvgFzwPCB2S6Z3RCGCDmmOM7pBIY0TeZ?= =?us-ascii?Q?IHscjm+rFsbS8oKAbYX9fZskBIfO9k+fajEsgxuc55wdF4W+ImWOY0e0ab4h?= =?us-ascii?Q?aGizqcoEx/VjnDQhaA2x+uvbAdJPOjcO4iHOZhHkhvHpi4qNSmeJC/nNzEQr?= =?us-ascii?Q?mXxe2y/odaohYBsxCAiF5XrCBjOQYvo+aJ30pNCt1yUVoyJQNQLpW0pH8X5U?= =?us-ascii?Q?z2VC2JrfKCiLbhNxz30dItn/FMLp3xxofqcW0RkK4P6yjQzE8kdgRymTPw5q?= =?us-ascii?Q?Ols4jSS9hdSGPgUHloziZTN+1BzwGZTW83bYAnzqtnFO3gmS38f2lflsfulq?= =?us-ascii?Q?yBGS2fUGaSWO5ICpS/fIYzZ6qm/IPgizJRVUaf0D9oAq6l1hLXb32RJjQgaV?= =?us-ascii?Q?LO0DgTfOGyHHQlDAuvVWrSzQrKDrCLzasAdiK8XQoO5tGFkfZ/N9tKvkaRrs?= =?us-ascii?Q?/5yNaAbCJNhhRQlhSJMboEgS9trHyI/0fvRw1pRC3qZVqWMX4W4+4Be2oNVR?= =?us-ascii?Q?WllRnTgBvU9f/kH280OlgME9ND8mrMpaVgGvp5IsMFNPIH+QmWv6mCdA6wXO?= =?us-ascii?Q?MasSnUGXMFFLTJf9lidXzxyNjF0Dfh+JDOpOM4WfaS6Kf/vtEjtvUJLRLJX7?= =?us-ascii?Q?2/gHin0rmzt91p9Co/i9FrU4RWaT1ktpeXmzgpA3KoVEYo/zeQAVyThsn6eG?= =?us-ascii?Q?UgUeFrMqGIYLpMgUpkJKZD1J3Wo8+R7sSTEOh/lCFWru+ihX+ww4jMWAJMF9?= =?us-ascii?Q?QnOKPWbpyg6iAmdRak+LiIdcA4gS3UdXe9bHMXogxt5zL5FO+qxjBzliaUeP?= =?us-ascii?Q?tJqPEOgKgTxWHPR3IpMOflxyLShIcjVeuN0leNu+dIULJPCfBgMpQ4qb/my9?= =?us-ascii?Q?h+OUPLpUKXMYYxPqFbBUVaZwz5lYLGnZec2JOr78688N/W0HJotbYMISUu38?= =?us-ascii?Q?652eUuH3O1LaaXJrLNF0InS3?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4634 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: Samer.El-Haj-Mahmoud@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 570d1866-e2df-4ddd-87b1-08d90c02791d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GZLKEnE9deoLvFtIBc1CYtuaZKYc0iR5HvlbltehoyeTTnYG47VkFJi3bvC+yB1IeR8e3tL3aI0TyiLy30anVNwEmJXh/ll1SuiK7KIkZ54mj9po/OvYt7bh2lbS+UtZJXQVRfFjtCYB1oPLc0WzMVv8PmrzdxkRrLcPCngIhpKTkBxVJAoTeBnHCiktuaUrIXiExKCL5TZbFA8/vy9ctmyGR1Rdm2eQQXcutpRtfYcNZE9960SyER7eClW+BBKpcXhPFW8apgzmRiypxGZQ2VloC+35EzTfpeJ/ehJEyQVPKzoHn25znZ4d7fedTIKcx9Um7fqwpgRCrWrQQQ3wqzFTRefggyz0g7eLjd0LTFkLEtjoI23XwBQmFxI8P3OqMdMGSUsTIfjC3wy/rV+iqFInPRf/2f9SZVXu0NINPw8C3jGRffYQAADohD5r038NUBgIwxuy+48r6wATxGQTtWUGCTvcgcEXhWeV6360da6N5pg4PhrM23zxkaEtjABO7h7WMNkVuaCd6wgJd6sZqvFcJWlm8yQXB4FkkWy5NrLwN98l2h8TLMRa2wG7FDcUdLz4oSJ3p9kLjIHa/VzWVM6ZI013WjFtbTP+m6eOYLxnO56TSAinHbDn+JL00TrX1VIvpKvMDFkcYtndnsO9SEc7G5u7LhSm4ZALOdg+/hA5L7sUPTTUTGRqbKOReuz2A0Rc7aH+E/Wu1WZQJZtmf7/YsmiYMhi5MBP+8XtwR7L1zyBHVSNA7umqTPbTHU+gKOJxm8hoaemx6DoWVbbPvw== 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)(39850400004)(376002)(396003)(136003)(346002)(46966006)(36840700001)(36860700001)(52536014)(8676002)(82310400003)(30864003)(55016002)(26005)(2906002)(15843345004)(110136005)(47076005)(33656002)(9686003)(6636002)(166002)(76236003)(81166007)(5660300002)(83380400001)(7696005)(356005)(34020700004)(966005)(478600001)(70206006)(86362001)(54906003)(70586007)(4326008)(82740400003)(186003)(53546011)(316002)(336012)(8936002)(6506007);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2021 18:05:15.3931 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7bc91050-f21a-4c5b-9ecc-08d90c0281bb 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: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3069 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PAXPR08MB698737F461CD73C5CBD6208F905E9PAXPR08MB6987eurp_" --_000_PAXPR08MB698737F461CD73C5CBD6208F905E9PAXPR08MB6987eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Update: UEFI Forum ASWG (ACPI spec working group) approved the submitted EC= R as an errata for future ACPI 6.4 spec publication. We can go ahead and proceed with this patch as submitted, based on that EC= R clarification. With that, Reviewed-By: Samer El-Haj-Mahmoud Samer.El-Haj-Mahmoud@arm.com Thanks, --Samer From: devel@edk2.groups.io On Behalf Of Samer El-Ha= j-Mahmoud via groups.io Sent: Thursday, April 29, 2021 10:03 AM To: devel@edk2.groups.io; Samer El-Haj-Mahmoud ; Andrei Warkentin (awarkentin@vmware.com) ; Jere= my Linton ; rfc@edk2.groups.io Cc: Ard Biesheuvel ; leif@nuviainc.com; pete@akeo.= ie; Samer El-Haj-Mahmoud Subject: Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Cor= rect _DMA consumer Any further comments on the ACPI ECR documented in: https://bugzilla.tiano= core.org/show_bug.cgi?id=3D3335 ? I already have comments from Jeremey and Andrew saying it looks good. If t= here are no objections, I will let ASWG know to approve the ECR for future = ACPI spec publication. Thanks, --Samer From: devel@edk2.groups.io > On Behalf Of Samer El-Haj-Mahmoud via gro= ups.io Sent: Tuesday, April 13, 2021 12:45 PM To: Andrei Warkentin (awarkentin@vmware.com)= >; Jeremy Linton >; devel@edk2.groups.io Cc: Ard Biesheuvel >= ; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud > Subject: Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Cor= rect _DMA consumer I just got to this thread. Apologies for the delay. I went through the ACPI spec. Here is what I see: https://uefi.org/specs/ACPI/6.4/19_ASL_Reference/ACPI_Source_Language_Refe= rence.html#qwordmemory-qword-memory-resource-descriptor-macro "ResourceUsage specifies whether the Memory range is consumed by this devi= ce (ResourceConsumer) or passed on to child devices (ResourceProducer). If = nothing is specified, then ResourceConsumer is assumed." https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configurati= on.html#dma-direct-memory-access " It specifies the ranges the bus controller (bridge) decodes on the child= -side of its interface. (This is analogous to the _CRS object, which descri= bes the resources that the bus controller decodes on the parent-side of its= interface.) Any ranges described in the resources of a _DMA object can be = used by child devices for DMA or bus master transactions.." The way I read the spec, this wording in the _DMA definition "Any ranges d= escribed in the resources of a _DMA object can be used by child devices.." = suggests that this should be a ResourceProducer, per the QWordMemory resour= ce descriptor definition above The _DMA example in section 6.2.4 uses a "ResourceConsumer", when it shoul= d really be "ResourceProducer" according to these definitions: It describes= , the child devices view of the address range, so the "translation" added = is the CPU's view of the same range. I submitted a "code first" ECR to correct the ACPI spec example (here : ht= tps://bugzilla.tianocore.org/show_bug.cgi?id=3D3335). Please provide feedba= ck on the BZ (or this thread) whether you agree or not, so we can take this= to ASWG/UEFI Forum for discussion and approval Thanks, --Samer From: Andrei Warkentin > Sent: Thursday, April 8, 2021 10:24 AM To: Jeremy Linton >; d= evel@edk2.groups.io Cc: Ard Biesheuvel >= ; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud > Subject: Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA con= sumer I don't know... the ACPI spec is weird. https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configurati= on.html#dma-direct-memory-access ...lists ResourceConsumer for _DMA. A ________________________________ From: Jeremy Linton > Sent: Thursday, April 8, 2021 12:58 AM To: devel@edk2.groups.io > Cc: ard.biesheuvel@arm.com >; leif@nuviainc.com >; pete@akeo.ie >; samer.el-haj-mahmoud@a= rm.com >; Andrei Warkentin >; Jeremy Linton > Subject: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consume= r Bridge devices should be marked as producers so that their children can consume the resources. In linux if this isn't true then the translation gets ignored and the DMA values are incorrect. This fixes DMA on all the devices that need a translation. Signed-off-by: Jeremy Linton > --- Platform/RaspberryPi/AcpiTables/Dsdt.asl | 2 +- Platform/RaspberryPi/AcpiTables/Emmc.asl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/Raspberry= Pi/AcpiTables/Dsdt.asl index d116f965e1..32cd5fc9f9 100644 --- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl +++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl @@ -205,7 +205,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "RPIFDN", "RPI= ", 2) // Only the first GB is available. // Bus 0xC0000000 -> CPU 0x00000000. // - QWordMemory (ResourceConsumer, + QWordMemory (ResourceProducer, , MinFixed, MaxFixed, diff --git a/Platform/RaspberryPi/AcpiTables/Emmc.asl b/Platform/Raspberry= Pi/AcpiTables/Emmc.asl index 179dd3ecdb..0fbc2a79ea 100644 --- a/Platform/RaspberryPi/AcpiTables/Emmc.asl +++ b/Platform/RaspberryPi/AcpiTables/Emmc.asl @@ -32,7 +32,7 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN", "RPI4EMM= C", 2) } Name (_DMA, ResourceTemplate() { - QWordMemory (ResourceConsumer, + QWordMemory (ResourceProducer, , MinFixed, MaxFixed, -- 2.13.7 IMPORTANT NOTICE: The contents of this email and any attachments are confi= dential and may also be privileged. If you are not the intended recipient, = please notify the sender immediately and do not disclose the contents to an= y other person, use it for any purpose, or store or copy the information in= any medium. Thank you. IMPORTANT NOTICE: The contents of this email and any attachments are confi= dential and may also be privileged. If you are not the intended recipient, = please notify the sender immediately and do not disclose the contents to an= y other person, use it for any purpose, or store or copy the information in= any medium. Thank you. IMPORTANT NOTICE: The contents of this email and any attachments are confi= dential and may also be privileged. If you are not the intended recipient, = please notify the sender immediately and do not disclose the contents to an= y other person, use it for any purpose, or store or copy the information in= any medium. Thank you. --_000_PAXPR08MB698737F461CD73C5CBD6208F905E9PAXPR08MB6987eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Update: UEFI Forum ASWG (ACPI spec working group) a= pproved the submitted ECR as an errata for future ACPI 6.4 spec publication= .

 

We can go ahead and proceed with this patch as subm= itted, based on that ECR clarification.

 

With that,

 

Reviewed-By: Samer El-Haj-Mahmoud Samer.El-Haj-Mahmoud@arm.com

 

Thanks,

--Samer

 

 

From: devel@edk2.groups.io <devel@edk2.gr= oups.io> On Behalf Of Samer El-Haj-Mahmoud via groups.io
Sent: Thursday, April 29, 2021 10:03 AM
To: devel@edk2.groups.io; Samer El-Haj-Mahmoud <Samer.El-Haj-Mah= moud@arm.com>; Andrei Warkentin (awarkentin@vmware.com) <awarkentin@v= mware.com>; Jeremy Linton <Jeremy.Linton@arm.com>; rfc@edk2.groups= .io
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.co= m; pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com><= br> Subject: Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTabl= es: Correct _DMA consumer

 

Any further comments on the ACPI ECR documented in:= https://bugzilla.tianocore.org/show_bug.cgi?id=3D3335 ?

 

I already have comments from Jeremey and Andrew say= ing it looks good. If there are no objections, I will let ASWG know to appr= ove the ECR for future ACPI spec publication.

 

Thanks,

--Samer

 

 

 

 

From: devel@edk2.groups.io <deve= l@edk2.groups.io> On Behalf Of Samer El-Haj-Mahmoud via groups.io
Sent: Tuesday, April 13, 2021 12:45 PM
To: Andrei Warkentin (awar= kentin@vmware.com) <awarken= tin@vmware.com>; Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <Ar= d.Biesheuvel@arm.com>; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTabl= es: Correct _DMA consumer

 

I just got to this thread. Apologies for the delay.=

 

I went through the ACPI spec. Here is what I see:

 

https://uefi.org/= specs/ACPI/6.4/19_ASL_Reference/ACPI_Source_Language_Reference.html#qwordme= mory-qword-memory-resource-descriptor-macro

 

Res=
ourceUsage specifies whether the Memory range is consumed by this device (R=
esourceConsumer) or passed on to child devices (ResourceProducer). If nothi=
ng is specified, then ResourceConsumer is assumed.”=
 =
;
https://uefi.org/specs/ACPI/6.4/06_Device_Configurati=
on/Device_Configuration.html#dma-direct-memory-access=
 
“&nb=
sp;It specifies the ranges the bus controller (bridge) decodes on the child=
-side of its interface. (This is analogous to the _CRS object, which descri=
bes the resources that the bus controller decodes on the parent-side of its=
 interface.) Any ranges described in the resources of a _DMA object can be =
used by child devices for DMA or bus master transactions..”
 =
;
The way I read the spec, this wording in the _DMA defin=
ition “Any ranges described in the resources of a _DMA object can be =
used by child devices..” suggests that this should be a ResourceProdu=
cer, per the QWordMemory resource descriptor definition above
 

The _DMA example in section 6.2.4 uses a “Res= ourceConsumer”, when it should really be “ResourceProducer̶= 1; according to these definitions: It describes , the child devices view of= the address range, so the "translation" added is the CPU's view of the same range.

 
I submitted a “code first” ECR to correct t=
he ACPI spec example (here : https://bugzilla.tianocore.org/show_bug.cgi?id=3D3335). Please provide feedback on the BZ (or this thread) whether you agree o=
r not, so we can take this to ASWG/UEFI Forum for discussion and approval
 
Thanks,
--Samer
 =
;
 =
;

 

From: Andrei Warkentin <awarkentin@vmware.com>
Sent: Thursday, April 8, 2021 10:24 AM
To: Jeremy Linton <Jere= my.Linton@arm.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <Ar= d.Biesheuvel@arm.com>; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _= DMA consumer

 

I don't know... the ACPI spec is weird.

 

 

...lists ResourceConsumer for _DMA.

 

A

 


From: Jeremy Linton <jeremy.linton@arm.com>
Sent: Thursday, April 8, 2021 12:58 AM
To: devel@edk2.groups.io <devel@edk2.groups.io><= br> Cc: ard.biesheuvel@arm.co= m <ard.biesheuvel@arm.com<= /a>>; leif@nuviainc.com <leif@nuviainc.com>; pete@akeo.ie <pete@akeo.ie>; samer.el-haj-mahmoud@arm.c= om <samer.el-haj-mah= moud@arm.com>; Andrei Warkentin <awarkentin@vmware.com>; Jeremy Linton <jeremy.linton@arm.com>= ;
Subject: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA = consumer

 

Bridge devices shoul= d be marked as producers so that their
children can consume the resources. In linux if this isn't
true then the translation gets ignored and the DMA values
are incorrect. This fixes DMA on all the devices that
need a translation.

Signed-off-by: Jeremy Linton <= jeremy.linton@arm.com>
---
 Platform/RaspberryPi/AcpiTables/Dsdt.asl | 2 +-
 Platform/RaspberryPi/AcpiTables/Emmc.asl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/Raspberry= Pi/AcpiTables/Dsdt.asl
index d116f965e1..32cd5fc9f9 100644
--- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl
+++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl
@@ -205,7 +205,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT"= ;, 5, "RPIFDN", "RPI", 2)
         // Only the first GB is a= vailable.

         // Bus 0xC0000000 -> C= PU 0x00000000.

         //

-        QWordMemory (ResourceConsumer,=

+        QWordMemory (ResourceProducer,=

           ,

           MinFixed,

           MaxFixed,

diff --git a/Platform/RaspberryPi/AcpiTables/Emmc.asl b/Platform/Raspberry= Pi/AcpiTables/Emmc.asl
index 179dd3ecdb..0fbc2a79ea 100644
--- a/Platform/RaspberryPi/AcpiTables/Emmc.asl
+++ b/Platform/RaspberryPi/AcpiTables/Emmc.asl
@@ -32,7 +32,7 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RP= IFDN", "RPI4EMMC", 2)
       }

 

       Name (_DMA, ResourceTemplate() {

-        QWordMemory (ResourceConsumer,=

+        QWordMemory (ResourceProducer,=

           ,

           MinFixed,

           MaxFixed,

--
2.13.7

IMPORTANT NOTICE: The contents of this email and an= y attachments are confidential and may also be privileged. If you are not t= he intended recipient, please notify the sender immediately and do not disc= lose the contents to any other person, use it for any purpose, or store or copy the information in any medium. T= hank you.

IMPORTANT NOTICE: The contents of this email and an= y attachments are confidential and may also be privileged. If you are not t= he intended recipient, please notify the sender immediately and do not disc= lose the contents to any other person, use it for any purpose, or store or copy the information in any medium. T= hank you.

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