From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.71]) by mx.groups.io with SMTP id smtpd.web12.7327.1619704992928282391 for ; Thu, 29 Apr 2021 07:03:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=rEoEnQm8; spf=pass (domain: arm.com, ip: 40.107.7.71, 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=vQMMk4RY9LYqs1//ftxhkoM4lJcvWjlozQ1LBR2iWP0=; b=rEoEnQm8EptSmpXff9oCFgUxEyO7U6SrlWV5SVPgb2gPPO+Ilqm+KC+jn+1TKaU2v+Jlwb5SxRPSOUROILhd9vQjc8VX61lcBLxqUtU1lfMtz/orNSoNRwHdMobJVDAIRHh0Dg5m5MrvdhEpVCTRMKELXbZ+ZcReLiEtbKJdWho= Received: from DU2PR04CA0207.eurprd04.prod.outlook.com (2603:10a6:10:28d::32) by VI1PR08MB2832.eurprd08.prod.outlook.com (2603:10a6:802:25::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20; Thu, 29 Apr 2021 14:03:08 +0000 Received: from DB5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28d:cafe::84) by DU2PR04CA0207.outlook.office365.com (2603:10a6:10:28d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25 via Frontend Transport; Thu, 29 Apr 2021 14:03:08 +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 DB5EUR03FT040.mail.protection.outlook.com (10.152.20.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 14:03:08 +0000 Received: ("Tessian outbound 13cdc29c30b8:v91"); Thu, 29 Apr 2021 14:03:08 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d95c701a34047b4b X-CR-MTA-TID: 64aa7808 Received: from 1cec42f77de3.4 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F1732604-2871-4255-A2D0-908A20C55B83.1; Thu, 29 Apr 2021 14:02:58 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1cec42f77de3.4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 29 Apr 2021 14:02:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VaCT6MTinMLHdnGO6mH34CPXCi6VpHa7pkxQoI/HLWtJr08+NhDm82cbuhLgPczLsV2GHcpKQPOWztFkhcMVzZncVwGPkTd8BB+46MVoXEAvF0j4Y51V0OoE+bzEPPnLgFaWM0mtTmEHZpZPlAQdPgiAMP8+fTZlunXgktCfysDTACCSLPimTAwQ4iw9736VP0MrJL4R4Y1tHjr2XfAk5TFV6WBMKWyq0Zz5IP3pDJ1nHO7/bxBmRBpRq03aGbE70nLdjNHK/qaolc/xeepb2HgtjJwGAsOT8o0DYQAyg4kFiBssgCIKuVTcLEtihlVhnGMTrWfhg/DE3xbJ3j6U/A== 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=vQMMk4RY9LYqs1//ftxhkoM4lJcvWjlozQ1LBR2iWP0=; b=S0zfB1ct1pNBf0OBET4iJyoMP4z9+FAwnHETNwXp4+8sJUhGdLC8pXUmi4hKxunq7B8udjWY3aQ/nvOk0H/FDWvQdgz+rmmn/Eq+MClcwCCv6YvpXk8YjPmE3A7qWEHDiKrMqHSejOT/AftgtLFHZpJQQUCNqJ8q7NmSUk4CHJj/jYUnOMN7/S92aW8tS0y+Zr1WG7iCFODrJ5MkpeFNgdmqs4xBaW8qQinlXbuHGmOLeDcwMx4jReTuX9158fhnyT2Xu93yFH/CNO49PAn2hriWIFp2mFDldZ6T1C2KtGViAHBpEnB3a2rUWuW82/RppuEKC9WWENse6ANnO0LFKQ== 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=vQMMk4RY9LYqs1//ftxhkoM4lJcvWjlozQ1LBR2iWP0=; b=rEoEnQm8EptSmpXff9oCFgUxEyO7U6SrlWV5SVPgb2gPPO+Ilqm+KC+jn+1TKaU2v+Jlwb5SxRPSOUROILhd9vQjc8VX61lcBLxqUtU1lfMtz/orNSoNRwHdMobJVDAIRHh0Dg5m5MrvdhEpVCTRMKELXbZ+ZcReLiEtbKJdWho= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DB8PR08MB5370.eurprd08.prod.outlook.com (2603:10a6:10:112::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Thu, 29 Apr 2021 14:02:55 +0000 Received: from DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::7492:d3fd:d6f4:e187]) by DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::7492:d3fd:d6f4:e187%6]) with mapi id 15.20.4065.027; Thu, 29 Apr 2021 14:02:54 +0000 From: "Samer El-Haj-Mahmoud" To: "devel@edk2.groups.io" , Samer El-Haj-Mahmoud , "Andrei Warkentin (awarkentin@vmware.com)" , Jeremy 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: Correct _DMA consumer Thread-Topic: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Thread-Index: AQHXLDxK9rrtmosIqEClGyylGxm9MaqqrQyAgAf3JdCAGQOlEA== Date: Thu, 29 Apr 2021 14:02:54 +0000 Message-ID: References: <20210408055843.2883563-1-jeremy.linton@arm.com>,<20210408055843.2883563-4-jeremy.linton@arm.com> <167578A6C978A75F.9301@groups.io> In-Reply-To: <167578A6C978A75F.9301@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: 0ec8e2ef-8790-4618-9981-08d90b17847b x-ms-traffictypediagnostic: DB8PR08MB5370:|VI1PR08MB2832: 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: Gvcew9OcVCLNMx2wX5wKkONpHHlo1BY3OnW1Gq6DR9UlS2HY1MTv2Dnp5UgSGS8wBDtBKgfmqJYTNSG8lnpK4/ieAljwlcBd9sVure4nHEJVahvm50Zv7aZnIdU4W9oV5ZnCr17RaFigFsOi5p09kNr4K/dgz0eK2WnBfZJTC9TVEndWPDmBVdyHxDzFJ/lweG8z5jSpo1XmPaennIEOX99iV4ssKJm/twjfv2TQyeErrX31luStCVZTBn/SWap6sLU4vDHX8P20F4dv8tFIG5x4FqXyaOmUF7ljZkiPT5cLz3gXxzIoKF/4Yz/aa5cdhRee5mGsVX9bO5QzEXMipajoPIg+IZ1g+pjI5dhJozZvxUWLg1UgVVkg25gGduELyyOFnOsbs/NKg3GP41asyqvvBVXvgo7z9nOD7NCGsVrYL+mjO+T/iT1MFslPJN9c+cMmw5ZqVkQePpUw5HwEI2qOHcHsQNiBQ7wSK3MiZOEgffgrIj6WcQgAjNuqVz+pLbdjfg6SswAzajRKm48dMY59j3NUl16G8Bg5NJ3s9fTsYW1HNuxXdQDiNKXD+hmBNmr0eQjzaY2bTWLfW8JGuFALhczdCR0kZ19O9L5me0UFgR9Z8KsRJoX2vJAcDzyk80i+z/TlVJpNmJ0hkItJimPuCk8S82XguFtWm/ylK92HQkPEP0kA65NAkuJeByME X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR08MB3260.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(376002)(366004)(136003)(396003)(39850400004)(110136005)(186003)(478600001)(66556008)(9686003)(66446008)(7696005)(71200400001)(53546011)(122000001)(38100700002)(33656002)(6506007)(64756008)(66476007)(5660300002)(86362001)(966005)(26005)(2906002)(83380400001)(54906003)(8936002)(316002)(76236003)(76116006)(66946007)(4326008)(55016002)(166002)(8676002)(52536014);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?GBiBpRdwktsKPjsKXdnYhhepYKxUvJCadf3Qiq4irdjf3R86stbOUHrPVcjc?= =?us-ascii?Q?bKrdxt7R5nGhGc+KJCcK8ezXP30JzTbeMtFItoutA9ubE8gib0QKxJU6zxqV?= =?us-ascii?Q?Qqt7O0E5uiWLNyApsLQ5nkivsZQSXUUG5kI83stpwTZlYrNPJIXaLn9SwBXM?= =?us-ascii?Q?bJJJQ3HhSg+zWuXEksu5/mSYXB/twUwz/4a7DWJlVYRmXjtMwMFQoJrACBWP?= =?us-ascii?Q?VqJOctMOwsyOvr7MqDtUjlz2/VMrDZfXCFm0bAOik2vh1B/mVtK+Q0rc4IhP?= =?us-ascii?Q?QpJc1xj80AovQ4a5y78Z4kxW9Drk+eFDAqfFV27r1QLPOGJgmykFoRGnMYvi?= =?us-ascii?Q?f4tLSccnNuzueQhY3PxsxYz/2nE5RgpC6DcaTYyzK3GDRnxokZBfXP1cWLGi?= =?us-ascii?Q?DA5OCtwcQX1A9xeSgftRWwllH4WMrd8Os6AsmVSce95YyGuOTY2jvcqEZBqx?= =?us-ascii?Q?CRSea6RtT9yRQ61FYXdKvWo3h+bocCq2amlCzTHj1U9wtzbHKNzHFloeg0hY?= =?us-ascii?Q?F7gYWjOBWX9Ygf5+76dFnTDtLTJyp280pOm4dxRlxfoCRf8NvRhdT0Zs6xoo?= =?us-ascii?Q?coHk6iPJHkGicnhmRXBowM9HBcWf6BzYmliOmAE+GNesRAK+DofrV8obV/ix?= =?us-ascii?Q?gya0ResxObtG32LZLZtP7nsrzmjafw4+OT3ob07l3/Nxt784OAvM4HD+cEL1?= =?us-ascii?Q?ANufD0YAgO4fL5BLuCtYm5WrfW2/Q8a3Lgw+pIgAcHzR+XGc4vltBot0Svvr?= =?us-ascii?Q?30DJI5MvhMndQDbqfzijVASUfOyuDzVF06XjJr4YknplctDptQXEoyNe13EC?= =?us-ascii?Q?pTRmYuwhEsy6PiG7fOX/h9744ehWtl25NRqj4RqZDV09dCeHt/57X7UsbrDR?= =?us-ascii?Q?CjKHqyxdk9O4w5EvZo2jN2xZOfZExLObX4YdEjwqS6x7HYxT9H1jvci0G054?= =?us-ascii?Q?9H0zlO+X8b8QFwvVM4dj6pE/C8qie+gN/mIyQYP703zxJFuJuqQohntIhrxv?= =?us-ascii?Q?c+UuS/CDqcYKkRwM8/ydsxEqyL1SweW2UyqM7vbC3deBso4skHrzQpLz+Pob?= =?us-ascii?Q?92q7uZ5CWKv8Bp5rxx6uhd3yyG9BlTqrLEPOFwI+BQjtoNV6FBAfz089j7RU?= =?us-ascii?Q?vM84wE6v5tUVdqlYtE//f5TS0ioSU2Wi9wMEumJIeSg2QLDd6IKkZ15ONSl0?= =?us-ascii?Q?BGAF5ZIJB1MUJuH6lckvw4AMz+Y5y26Mtvcr4wP6b7YI7E+qjQwUuGgmDHLj?= =?us-ascii?Q?e7BkvAQOUo23ndtypIPtmjDS6fqmZFA3FHKjbPGJm1uzbtj9/CB0aV7hncHK?= =?us-ascii?Q?6FUn8LT5Wr1wQsAqwPOQAkbD?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5370 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: DB5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9e736834-94a5-45af-78c5-08d90b177c76 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ktrmgP/qbX5lbB8wFagt7GLUJHYHNo3nxPCTMvnYWR1PnXUIL53BaOD3QiPZlUU874zza6Np/EfdCz7xpludty6aOBAkRH9JirarOl/HBSsXd3UB96Ufz10RGD8dcDNjuy5/hCfAmL9SM42PoefBsNq4a0MJ16ouf0P6ua0ACQzILBho5Nwc7YRcToHkC0zfHVqEKBolhI+ejXOSh1kI+LGALZ5sPZ9nrHDYTCAMcE+zpDaWACge0RorkD7opBrlrqivQJ3aGpr4BsaqGoswSd3607AsNzY/5M/UdxMZRwM783zkQELFbPJDPVz7p+bluId6p+qEPARKTHUPRFFci5ubzi+6BwX0q++JDVQADU5wW2zmxH/KT2xcXrHuBeAEfbtA5sFSd37Gz0JDq7CMl9uiKIkHVHrX2TboT4kJeMl/zbR6aW/dct2OXd8C4hCdGu9ascKAq0Zb0Lg27RR/AO15ON+oGg2N4r9gA4qhZBOIBTYIF1reicweUumed3sXLWeezvo3AnZw9A/3i67BnLOOx9WhVZESBA7IVOSQ6TzTcUqaHU3fv1qOVKXS6dWirmyOt+s0nXbb3L+ghF3hMq8T5P++az4tHCiv6LXPCZBCcOB54ZRiM+dDn9rTfikmncG+mXesf1ec+wwrhSQhuLZNXcGyndQKwBTZ/wlM6vcvtyLlbpd9HUkNyGUpcWb8W1iO5pbvP1vEFmTnV2xD4LHlFApcIIO6KRWlci0zsSJ9tpXR/+w1oKvXQMLayAoiolzJeS05MKc/I0bQoGAbzw== 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)(136003)(346002)(376002)(396003)(46966006)(36840700001)(5660300002)(8676002)(70206006)(7696005)(33656002)(36860700001)(81166007)(54906003)(52536014)(6506007)(966005)(336012)(8936002)(55016002)(4326008)(478600001)(70586007)(47076005)(110136005)(450100002)(9686003)(83380400001)(82310400003)(186003)(356005)(166002)(30864003)(53546011)(2906002)(82740400003)(86362001)(26005)(76236003)(316002)(34020700004);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 14:03:08.4381 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ec8e2ef-8790-4618-9981-08d90b17847b 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: DB5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2832 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DB7PR08MB3260AF4E79CC429B1CA947D8905F9DB7PR08MB3260eurp_" --_000_DB7PR08MB3260AF4E79CC429B1CA947D8905F9DB7PR08MB3260eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Any further comments on the ACPI ECR documented in: https://bugzilla.tianoc= ore.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-Ha= j-Mahmoud via groups.io Sent: Tuesday, April 13, 2021 12:45 PM To: Andrei Warkentin (awarkentin@vmware.com) ; Jere= my 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. --_000_DB7PR08MB3260AF4E79CC429B1CA947D8905F9DB7PR08MB3260eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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 <devel@edk2.gr= oups.io> On Behalf Of Samer El-Haj-Mahmoud via groups.io
Sent: Tuesday, April 13, 2021 12:45 PM
To: Andrei Warkentin (awarkentin@vmware.com) <awarkentin@vmware.= com>; Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io<= br> 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

 

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 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_DB7PR08MB3260AF4E79CC429B1CA947D8905F9DB7PR08MB3260eurp_--