<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Update: UEFI Forum ASWG (ACPI spec working group) approved the submitted ECR as an errata for future ACPI 6.4 spec publication.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We can go ahead and proceed with this patch as submitted, based on that ECR clarification.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With that,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Reviewed-By: Samer El-Haj-Mahmoud <a href="mailto:Samer.El-Haj-Mahmoud@arm.com">
Samer.El-Haj-Mahmoud@arm.com</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">--Samer<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> devel@edk2.groups.io <devel@edk2.groups.io> <b>
On Behalf Of </b>Samer El-Haj-Mahmoud via groups.io<br>
<b>Sent:</b> Thursday, April 29, 2021 10:03 AM<br>
<b>To:</b> devel@edk2.groups.io; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Andrei Warkentin (awarkentin@vmware.com) <awarkentin@vmware.com>; Jeremy Linton <Jeremy.Linton@arm.com>; rfc@edk2.groups.io<br>
<b>Cc:</b> Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any further comments on the ACPI ECR documented in: <a href="https://bugzilla.tianocore.org/show_bug.cgi?id=3335">
https://bugzilla.tianocore.org/show_bug.cgi?id=3335</a> ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I already have comments from Jeremey and Andrew saying it looks good. If there are no objections, I will let ASWG know to approve the ECR for future ACPI spec publication.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">--Samer<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>>
<b>On Behalf Of </b>Samer El-Haj-Mahmoud via groups.io<br>
<b>Sent:</b> Tuesday, April 13, 2021 12:45 PM<br>
<b>To:</b> Andrei Warkentin (<a href="mailto:awarkentin@vmware.com">awarkentin@vmware.com</a>) <<a href="mailto:awarkentin@vmware.com">awarkentin@vmware.com</a>>; Jeremy Linton <<a href="mailto:Jeremy.Linton@arm.com">Jeremy.Linton@arm.com</a>>;
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
<b>Cc:</b> Ard Biesheuvel <<a href="mailto:Ard.Biesheuvel@arm.com">Ard.Biesheuvel@arm.com</a>>;
<a href="mailto:leif@nuviainc.com">leif@nuviainc.com</a>; <a href="mailto:pete@akeo.ie">
pete@akeo.ie</a>; Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I just got to this thread. Apologies for the delay.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I went through the ACPI spec. Here is what I see:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a href="https://uefi.org/specs/ACPI/6.4/19_ASL_Reference/ACPI_Source_Language_Reference.html#qwordmemory-qword-memory-resource-descriptor-macro" target="_blank"><span style="font-size:11.5pt;font-family:"Arial",sans-serif;background:#F8F8F8">https://uefi.org/specs/ACPI/6.4/19_ASL_Reference/ACPI_Source_Language_Reference.html#qwordmemory-qword-memory-resource-descriptor-macro</span></a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in">“<span style="font-size:9.0pt;color:#1D1C1D">ResourceUsage specifies whether the Memory range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.”<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:9.0pt;color:#1D1C1D"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><a href="https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access" target="_blank"><span style="font-size:11.5pt;font-family:"Arial",sans-serif;background:white">https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access</span></a><o:p></o:p></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><o:p> </o:p></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:9.0pt;color:#1D1C1D">“ It specifies the ranges the bus controller (bridge) decodes on the child-side of its interface. (This is analogous to the _CRS object, which describes 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..”<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:9.0pt;color:#1D1C1D"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">The way I read the spec, this wording in the _DMA definition “Any ranges described in the resources of a _DMA object can be used by child devices..” suggests that this should be a ResourceProducer, per the QWordMemory resource descriptor definition above<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></pre>
<p class="MsoNormal">The _DMA example in section 6.2.4 uses a “ResourceConsumer”, when it should 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.<o:p></o:p></p>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I submitted a “code first” ECR to correct the ACPI spec example (here : <a href="https://bugzilla.tianocore.org/show_bug.cgi?id=3335">https://bugzilla.tianocore.org/show_bug.cgi?id=3335</a>). Please provide feedback on the BZ (or this thread) whether you agree or not, so we can take this to ASWG/UEFI Forum for discussion and approval<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks,<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">--Samer<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:9.0pt;color:#1D1C1D"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:3.0pt;margin-right:0in;margin-bottom:3.0pt;margin-left:0in"><span style="font-size:9.0pt;color:#1D1C1D"><o:p> </o:p></span></pre>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Andrei Warkentin <<a href="mailto:awarkentin@vmware.com">awarkentin@vmware.com</a>>
<br>
<b>Sent:</b> Thursday, April 8, 2021 10:24 AM<br>
<b>To:</b> Jeremy Linton <<a href="mailto:Jeremy.Linton@arm.com">Jeremy.Linton@arm.com</a>>;
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
<b>Cc:</b> Ard Biesheuvel <<a href="mailto:Ard.Biesheuvel@arm.com">Ard.Biesheuvel@arm.com</a>>;
<a href="mailto:leif@nuviainc.com">leif@nuviainc.com</a>; <a href="mailto:pete@akeo.ie">
pete@akeo.ie</a>; Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>><br>
<b>Subject:</b> Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas;color:black">I don't know... the ACPI spec is weird.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas;color:black"><a href="https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access">https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas;color:black">...lists ResourceConsumer for _DMA.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas;color:black">A<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Jeremy Linton <<a href="mailto:jeremy.linton@arm.com">jeremy.linton@arm.com</a>><br>
<b>Sent:</b> Thursday, April 8, 2021 12:58 AM<br>
<b>To:</b> <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>><br>
<b>Cc:</b> <a href="mailto:ard.biesheuvel@arm.com">ard.biesheuvel@arm.com</a> <<a href="mailto:ard.biesheuvel@arm.com">ard.biesheuvel@arm.com</a>>;
<a href="mailto:leif@nuviainc.com">leif@nuviainc.com</a> <<a href="mailto:leif@nuviainc.com">leif@nuviainc.com</a>>;
<a href="mailto:pete@akeo.ie">pete@akeo.ie</a> <<a href="mailto:pete@akeo.ie">pete@akeo.ie</a>>;
<a href="mailto:samer.el-haj-mahmoud@arm.com">samer.el-haj-mahmoud@arm.com</a> <<a href="mailto:samer.el-haj-mahmoud@arm.com">samer.el-haj-mahmoud@arm.com</a>>; Andrei Warkentin <<a href="mailto:awarkentin@vmware.com">awarkentin@vmware.com</a>>; Jeremy Linton
 <<a href="mailto:jeremy.linton@arm.com">jeremy.linton@arm.com</a>><br>
<b>Subject:</b> [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Bridge devices should be marked as producers so that their<br>
children can consume the resources. In linux if this isn't<br>
true then the translation gets ignored and the DMA values<br>
are incorrect. This fixes DMA on all the devices that<br>
need a translation.<br>
<br>
Signed-off-by: Jeremy Linton <<a href="mailto:jeremy.linton@arm.com">jeremy.linton@arm.com</a>><br>
---<br>
 Platform/RaspberryPi/AcpiTables/Dsdt.asl | 2 +-<br>
 Platform/RaspberryPi/AcpiTables/Emmc.asl | 2 +-<br>
 2 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/AcpiTables/Dsdt.asl<br>
index d116f965e1..32cd5fc9f9 100644<br>
--- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl<br>
+++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl<br>
@@ -205,7 +205,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "RPIFDN", "RPI", 2)<br>
         // Only the first GB is available.<br>
<br>
         // Bus 0xC0000000 -> CPU 0x00000000.<br>
<br>
         //<br>
<br>
-        QWordMemory (ResourceConsumer,<br>
<br>
+        QWordMemory (ResourceProducer,<br>
<br>
           ,<br>
<br>
           MinFixed,<br>
<br>
           MaxFixed,<br>
<br>
diff --git a/Platform/RaspberryPi/AcpiTables/Emmc.asl b/Platform/RaspberryPi/AcpiTables/Emmc.asl<br>
index 179dd3ecdb..0fbc2a79ea 100644<br>
--- a/Platform/RaspberryPi/AcpiTables/Emmc.asl<br>
+++ b/Platform/RaspberryPi/AcpiTables/Emmc.asl<br>
@@ -32,7 +32,7 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN", "RPI4EMMC", 2)<br>
       }<br>
<br>
 <br>
<br>
       Name (_DMA, ResourceTemplate() {<br>
<br>
-        QWordMemory (ResourceConsumer,<br>
<br>
+        QWordMemory (ResourceProducer,<br>
<br>
           ,<br>
<br>
           MinFixed,<br>
<br>
           MaxFixed,<br>
<br>
-- <br>
2.13.7<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal">IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please 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.
<o:p></o:p></p>
<p class="MsoNormal">IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please 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.
<o:p></o:p></p>
<div>
<p class="MsoNormal"></o:p></span></p>
</div>
</div>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please 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.
</body>
</html>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/74669">View/Reply Online (#74669)</a> |    |  <a target="_blank" href="https://groups.io/mt/81935645/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>