public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/3] SD+USB perf/DMA fixes
@ 2021-04-08  5:58 Jeremy Linton
  2021-04-08  5:58 ` [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode Jeremy Linton
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Jeremy Linton @ 2021-04-08  5:58 UTC (permalink / raw)
  To: devel
  Cc: ard.biesheuvel, leif, pete, samer.el-haj-mahmoud, awarkentin,
	Jeremy Linton

A large part of why the emmc & dwc2 usb
controllers haven't been working properly is
because the "bus" _DMA was incorrectly tagged
as a consumer, when it needs to be a producer.

That is why linux has been dropping the
translation value portions of _DMA().

Since the emmc2 dma (with the old B0 SoC), and the
dwc2 is expected to work, lets add matching 30 bit
IORT entries for them.

Finally, in the shuffle the high speed cap bit override
was dropped from the linux patches, and I failed
to add it back to the firmware values, this caused
the wifi perf to be lower than it should have been.

Jeremy Linton (3):
  Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  Platform/RaspberryPi/AcpiTables: Add further named components
  Platform/RaspberryPi/AcpiTables: Correct _DMA consumer

 Platform/RaspberryPi/AcpiTables/Dsdt.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Emmc.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 Platform/RaspberryPi/AcpiTables/Sdhc.asl  |  2 +-
 4 files changed, 46 insertions(+), 4 deletions(-)

-- 
2.13.7


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  2021-04-08  5:58 [PATCH 0/3] SD+USB perf/DMA fixes Jeremy Linton
@ 2021-04-08  5:58 ` Jeremy Linton
  2021-04-08  9:48   ` Pete Batard
  2021-05-10 16:41   ` Samer El-Haj-Mahmoud
  2021-04-08  5:58 ` [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components Jeremy Linton
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 27+ messages in thread
From: Jeremy Linton @ 2021-04-08  5:58 UTC (permalink / raw)
  To: devel
  Cc: ard.biesheuvel, leif, pete, samer.el-haj-mahmoud, awarkentin,
	Jeremy Linton

The arasan caps registers are no longer being overridden by
the brcm iproc driver, so we should be assuring that the
"High Speed Support" bit 21 is set in the capability
register. This significantly improves the wifi perf
using linux.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 Platform/RaspberryPi/AcpiTables/Sdhc.asl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
index 0430ab7d2d..42776e33bb 100644
--- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
+++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
@@ -52,7 +52,7 @@ Device (SDC1)
   Name (_DSD, Package () {
     ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
     Package () {
-      Package () { "sdhci-caps", 0x0100fa81 },
+      Package () { "sdhci-caps", 0x0120fa81 },
     }
   })
 
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components
  2021-04-08  5:58 [PATCH 0/3] SD+USB perf/DMA fixes Jeremy Linton
  2021-04-08  5:58 ` [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode Jeremy Linton
@ 2021-04-08  5:58 ` Jeremy Linton
  2021-04-08  9:48   ` Pete Batard
                     ` (2 more replies)
  2021-04-08  5:58 ` [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Jeremy Linton
                   ` (2 subsequent siblings)
  4 siblings, 3 replies; 27+ messages in thread
From: Jeremy Linton @ 2021-04-08  5:58 UTC (permalink / raw)
  To: devel
  Cc: ard.biesheuvel, leif, pete, samer.el-haj-mahmoud, awarkentin,
	Jeremy Linton

Add some additional IORT nodes for the USB & EMMC devices, realistically
we probably only need to have a single node with the lowest AddressSizeLimit
but this is conceptually "cleaner" should anyone actually try and use these
values rather than the _DMA provided ones.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/AcpiTables/Iort.aslc b/Platform/RaspberryPi/AcpiTables/Iort.aslc
index 00720194bb..810307ae37 100644
--- a/Platform/RaspberryPi/AcpiTables/Iort.aslc
+++ b/Platform/RaspberryPi/AcpiTables/Iort.aslc
@@ -20,6 +20,8 @@ typedef struct {
 typedef struct {
   EFI_ACPI_6_0_IO_REMAPPING_TABLE      Iort;
   RPI4_NC_NODE                         NamedCompNode;
+  RPI4_NC_NODE                         NamedCompNode2;
+  RPI4_NC_NODE                         NamedCompNode3;
 } RPI4_IO_REMAPPING_STRUCTURE;
 
 STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
@@ -27,7 +29,7 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
     ACPI_HEADER (EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE,
                  RPI4_IO_REMAPPING_STRUCTURE,
                  EFI_ACPI_IO_REMAPPING_TABLE_REVISION),
-    1,                                              // NumNodes
+    3,                                              // NumNodes
     sizeof (EFI_ACPI_6_0_IO_REMAPPING_TABLE),       // NodeOffset
     0                                               // Reserved
   }, {
@@ -50,6 +52,46 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
     }, {
       "\\_SB_.SCB0.XHC0"                            // ObjectName
     }
+  }, {
+    // gpu/dwc usb named component node
+    {
+      {
+        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type
+        sizeof (RPI4_NC_NODE),                      // Length
+        0x0,                                        // Revision
+        0x0,                                        // Reserved
+        0x0,                                        // NumIdMappings
+        0x0,                                        // IdReference
+      },
+      0x0,                                          // Flags
+      0x0,                                          // CacheCoherent
+      0x0,                                          // AllocationHints
+      0x0,                                          // Reserved
+      0x0,                                          // MemoryAccessFlags
+      30,                                           // AddressSizeLimit
+    }, {
+      "\\_SB_.GDV0.USB0"                            // ObjectName
+    }
+  }, {
+    // emmc2 named component node
+    {
+      {
+        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type
+        sizeof (RPI4_NC_NODE),                      // Length
+        0x0,                                        // Revision
+        0x0,                                        // Reserved
+        0x0,                                        // NumIdMappings
+        0x0,                                        // IdReference
+      },
+      0x0,                                          // Flags
+      0x0,                                          // CacheCoherent
+      0x0,                                          // AllocationHints
+      0x0,                                          // Reserved
+      0x0,                                          // MemoryAccessFlags
+      30,                                           // AddressSizeLimit
+    }, {
+      "\\_SB_.GDV1.SDC3"                            // ObjectName
+    }
   }
 };
 
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
  2021-04-08  5:58 [PATCH 0/3] SD+USB perf/DMA fixes Jeremy Linton
  2021-04-08  5:58 ` [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode Jeremy Linton
  2021-04-08  5:58 ` [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components Jeremy Linton
@ 2021-04-08  5:58 ` Jeremy Linton
  2021-04-08  9:48   ` Pete Batard
                     ` (2 more replies)
  2021-04-08 14:24 ` [PATCH 0/3] SD+USB perf/DMA fixes Andrei Warkentin
  2021-04-30 20:30 ` Andrei Warkentin
  4 siblings, 3 replies; 27+ messages in thread
From: Jeremy Linton @ 2021-04-08  5:58 UTC (permalink / raw)
  To: devel
  Cc: ard.biesheuvel, leif, pete, samer.el-haj-mahmoud, awarkentin,
	Jeremy Linton

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 <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/RaspberryPi/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/RaspberryPi/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", "RPI4EMMC", 2)
       }
 
       Name (_DMA, ResourceTemplate() {
-        QWordMemory (ResourceConsumer,
+        QWordMemory (ResourceProducer,
           ,
           MinFixed,
           MaxFixed,
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  2021-04-08  5:58 ` [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode Jeremy Linton
@ 2021-04-08  9:48   ` Pete Batard
  2021-04-08 14:17     ` Andrei Warkentin
  2021-05-10 16:41     ` Samer El-Haj-Mahmoud
  2021-05-10 16:41   ` Samer El-Haj-Mahmoud
  1 sibling, 2 replies; 27+ messages in thread
From: Pete Batard @ 2021-04-08  9:48 UTC (permalink / raw)
  To: Jeremy Linton, devel
  Cc: ard.biesheuvel, leif, samer.el-haj-mahmoud, awarkentin

On 2021.04.08 06:58, Jeremy Linton wrote:
> The arasan caps registers are no longer being overridden by
> the brcm iproc driver, so we should be assuring that the
> "High Speed Support" bit 21 is set in the capability
> register. This significantly improves the wifi perf
> using linux.
> 
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>   Platform/RaspberryPi/AcpiTables/Sdhc.asl | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> index 0430ab7d2d..42776e33bb 100644
> --- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> +++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> @@ -52,7 +52,7 @@ Device (SDC1)
>     Name (_DSD, Package () {
> 
>       ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> 
>       Package () {
> 
> -      Package () { "sdhci-caps", 0x0100fa81 },
> 
> +      Package () { "sdhci-caps", 0x0120fa81 },
> 
>       }
> 
>     })
> 
>   
> 

Reviewed-by: Pete Batard <pete@akeo.ie>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components
  2021-04-08  5:58 ` [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components Jeremy Linton
@ 2021-04-08  9:48   ` Pete Batard
  2021-05-10 16:41     ` Samer El-Haj-Mahmoud
  2021-04-08 14:17   ` Andrei Warkentin
  2021-05-10 16:41   ` Samer El-Haj-Mahmoud
  2 siblings, 1 reply; 27+ messages in thread
From: Pete Batard @ 2021-04-08  9:48 UTC (permalink / raw)
  To: Jeremy Linton, devel
  Cc: ard.biesheuvel, leif, samer.el-haj-mahmoud, awarkentin

On 2021.04.08 06:58, Jeremy Linton wrote:
> Add some additional IORT nodes for the USB & EMMC devices, realistically
> we probably only need to have a single node with the lowest AddressSizeLimit
> but this is conceptually "cleaner" should anyone actually try and use these
> values rather than the _DMA provided ones.
> 
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>   Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
>   1 file changed, 43 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/RaspberryPi/AcpiTables/Iort.aslc b/Platform/RaspberryPi/AcpiTables/Iort.aslc
> index 00720194bb..810307ae37 100644
> --- a/Platform/RaspberryPi/AcpiTables/Iort.aslc
> +++ b/Platform/RaspberryPi/AcpiTables/Iort.aslc
> @@ -20,6 +20,8 @@ typedef struct {
>   typedef struct {
> 
>     EFI_ACPI_6_0_IO_REMAPPING_TABLE      Iort;
> 
>     RPI4_NC_NODE                         NamedCompNode;
> 
> +  RPI4_NC_NODE                         NamedCompNode2;
> 
> +  RPI4_NC_NODE                         NamedCompNode3;
> 
>   } RPI4_IO_REMAPPING_STRUCTURE;
> 
>   
> 
>   STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
> 
> @@ -27,7 +29,7 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
>       ACPI_HEADER (EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE,
> 
>                    RPI4_IO_REMAPPING_STRUCTURE,
> 
>                    EFI_ACPI_IO_REMAPPING_TABLE_REVISION),
> 
> -    1,                                              // NumNodes
> 
> +    3,                                              // NumNodes
> 
>       sizeof (EFI_ACPI_6_0_IO_REMAPPING_TABLE),       // NodeOffset
> 
>       0                                               // Reserved
> 
>     }, {
> 
> @@ -50,6 +52,46 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
>       }, {
> 
>         "\\_SB_.SCB0.XHC0"                            // ObjectName
> 
>       }
> 
> +  }, {
> 
> +    // gpu/dwc usb named component node
> 
> +    {
> 
> +      {
> 
> +        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type
> 
> +        sizeof (RPI4_NC_NODE),                      // Length
> 
> +        0x0,                                        // Revision
> 
> +        0x0,                                        // Reserved
> 
> +        0x0,                                        // NumIdMappings
> 
> +        0x0,                                        // IdReference
> 
> +      },
> 
> +      0x0,                                          // Flags
> 
> +      0x0,                                          // CacheCoherent
> 
> +      0x0,                                          // AllocationHints
> 
> +      0x0,                                          // Reserved
> 
> +      0x0,                                          // MemoryAccessFlags
> 
> +      30,                                           // AddressSizeLimit
> 
> +    }, {
> 
> +      "\\_SB_.GDV0.USB0"                            // ObjectName
> 
> +    }
> 
> +  }, {
> 
> +    // emmc2 named component node
> 
> +    {
> 
> +      {
> 
> +        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type
> 
> +        sizeof (RPI4_NC_NODE),                      // Length
> 
> +        0x0,                                        // Revision
> 
> +        0x0,                                        // Reserved
> 
> +        0x0,                                        // NumIdMappings
> 
> +        0x0,                                        // IdReference
> 
> +      },
> 
> +      0x0,                                          // Flags
> 
> +      0x0,                                          // CacheCoherent
> 
> +      0x0,                                          // AllocationHints
> 
> +      0x0,                                          // Reserved
> 
> +      0x0,                                          // MemoryAccessFlags
> 
> +      30,                                           // AddressSizeLimit
> 
> +    }, {
> 
> +      "\\_SB_.GDV1.SDC3"                            // ObjectName
> 
> +    }
> 
>     }
> 
>   };
> 
>   
> 

Reviewed-by: Pete Batard <pete@akeo.ie>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
  2021-04-08  5:58 ` [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Jeremy Linton
@ 2021-04-08  9:48   ` Pete Batard
  2021-05-10 16:43     ` Samer El-Haj-Mahmoud
  2021-04-08 14:23   ` Andrei Warkentin
  2021-05-10 16:43   ` Samer El-Haj-Mahmoud
  2 siblings, 1 reply; 27+ messages in thread
From: Pete Batard @ 2021-04-08  9:48 UTC (permalink / raw)
  To: Jeremy Linton, devel
  Cc: ard.biesheuvel, leif, samer.el-haj-mahmoud, awarkentin

On 2021.04.08 06:58, Jeremy Linton wrote:
> 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 <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/RaspberryPi/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/RaspberryPi/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", "RPI4EMMC", 2)
>         }
> 
>   
> 
>         Name (_DMA, ResourceTemplate() {
> 
> -        QWordMemory (ResourceConsumer,
> 
> +        QWordMemory (ResourceProducer,
> 
>             ,
> 
>             MinFixed,
> 
>             MaxFixed,
> 

Reviewed-by: Pete Batard <pete@akeo.ie>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components
  2021-04-08  5:58 ` [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components Jeremy Linton
  2021-04-08  9:48   ` Pete Batard
@ 2021-04-08 14:17   ` Andrei Warkentin
  2021-05-10 16:42     ` Samer El-Haj-Mahmoud
  2021-05-10 16:41   ` Samer El-Haj-Mahmoud
  2 siblings, 1 reply; 27+ messages in thread
From: Andrei Warkentin @ 2021-04-08 14:17 UTC (permalink / raw)
  To: Jeremy Linton, devel@edk2.groups.io
  Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie,
	samer.el-haj-mahmoud@arm.com

[-- Attachment #1: Type: text/plain, Size: 4403 bytes --]

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
________________________________
From: Jeremy Linton <jeremy.linton@arm.com>
Sent: Thursday, April 8, 2021 12:58 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: ard.biesheuvel@arm.com <ard.biesheuvel@arm.com>; leif@nuviainc.com <leif@nuviainc.com>; pete@akeo.ie <pete@akeo.ie>; samer.el-haj-mahmoud@arm.com <samer.el-haj-mahmoud@arm.com>; Andrei Warkentin <awarkentin@vmware.com>; Jeremy Linton <jeremy.linton@arm.com>
Subject: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components

Add some additional IORT nodes for the USB & EMMC devices, realistically
we probably only need to have a single node with the lowest AddressSizeLimit
but this is conceptually "cleaner" should anyone actually try and use these
values rather than the _DMA provided ones.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/AcpiTables/Iort.aslc b/Platform/RaspberryPi/AcpiTables/Iort.aslc
index 00720194bb..810307ae37 100644
--- a/Platform/RaspberryPi/AcpiTables/Iort.aslc
+++ b/Platform/RaspberryPi/AcpiTables/Iort.aslc
@@ -20,6 +20,8 @@ typedef struct {
 typedef struct {

   EFI_ACPI_6_0_IO_REMAPPING_TABLE      Iort;

   RPI4_NC_NODE                         NamedCompNode;

+  RPI4_NC_NODE                         NamedCompNode2;

+  RPI4_NC_NODE                         NamedCompNode3;

 } RPI4_IO_REMAPPING_STRUCTURE;



 STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {

@@ -27,7 +29,7 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
     ACPI_HEADER (EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE,

                  RPI4_IO_REMAPPING_STRUCTURE,

                  EFI_ACPI_IO_REMAPPING_TABLE_REVISION),

-    1,                                              // NumNodes

+    3,                                              // NumNodes

     sizeof (EFI_ACPI_6_0_IO_REMAPPING_TABLE),       // NodeOffset

     0                                               // Reserved

   }, {

@@ -50,6 +52,46 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
     }, {

       "\\_SB_.SCB0.XHC0"                            // ObjectName

     }

+  }, {

+    // gpu/dwc usb named component node

+    {

+      {

+        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type

+        sizeof (RPI4_NC_NODE),                      // Length

+        0x0,                                        // Revision

+        0x0,                                        // Reserved

+        0x0,                                        // NumIdMappings

+        0x0,                                        // IdReference

+      },

+      0x0,                                          // Flags

+      0x0,                                          // CacheCoherent

+      0x0,                                          // AllocationHints

+      0x0,                                          // Reserved

+      0x0,                                          // MemoryAccessFlags

+      30,                                           // AddressSizeLimit

+    }, {

+      "\\_SB_.GDV0.USB0"                            // ObjectName

+    }

+  }, {

+    // emmc2 named component node

+    {

+      {

+        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type

+        sizeof (RPI4_NC_NODE),                      // Length

+        0x0,                                        // Revision

+        0x0,                                        // Reserved

+        0x0,                                        // NumIdMappings

+        0x0,                                        // IdReference

+      },

+      0x0,                                          // Flags

+      0x0,                                          // CacheCoherent

+      0x0,                                          // AllocationHints

+      0x0,                                          // Reserved

+      0x0,                                          // MemoryAccessFlags

+      30,                                           // AddressSizeLimit

+    }, {

+      "\\_SB_.GDV1.SDC3"                            // ObjectName

+    }

   }

 };



--
2.13.7


[-- Attachment #2: Type: text/html, Size: 13072 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  2021-04-08  9:48   ` Pete Batard
@ 2021-04-08 14:17     ` Andrei Warkentin
  2021-05-10 16:41       ` Samer El-Haj-Mahmoud
  2021-05-10 16:41     ` Samer El-Haj-Mahmoud
  1 sibling, 1 reply; 27+ messages in thread
From: Andrei Warkentin @ 2021-04-08 14:17 UTC (permalink / raw)
  To: Pete Batard, Jeremy Linton, devel@edk2.groups.io
  Cc: ard.biesheuvel@arm.com, leif@nuviainc.com,
	samer.el-haj-mahmoud@arm.com

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
________________________________
From: Pete Batard <pete@akeo.ie>
Sent: Thursday, April 8, 2021 4:48 AM
To: Jeremy Linton <jeremy.linton@arm.com>; devel@edk2.groups.io <devel@edk2.groups.io>
Cc: ard.biesheuvel@arm.com <ard.biesheuvel@arm.com>; leif@nuviainc.com <leif@nuviainc.com>; samer.el-haj-mahmoud@arm.com <samer.el-haj-mahmoud@arm.com>; Andrei Warkentin <awarkentin@vmware.com>
Subject: Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode

On 2021.04.08 06:58, Jeremy Linton wrote:
> The arasan caps registers are no longer being overridden by
> the brcm iproc driver, so we should be assuring that the
> "High Speed Support" bit 21 is set in the capability
> register. This significantly improves the wifi perf
> using linux.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>   Platform/RaspberryPi/AcpiTables/Sdhc.asl | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> index 0430ab7d2d..42776e33bb 100644
> --- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> +++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> @@ -52,7 +52,7 @@ Device (SDC1)
>     Name (_DSD, Package () {
>
>       ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
>
>       Package () {
>
> -      Package () { "sdhci-caps", 0x0100fa81 },
>
> +      Package () { "sdhci-caps", 0x0120fa81 },
>
>       }
>
>     })
>
>
>

Reviewed-by: Pete Batard <pete@akeo.ie>

[-- Attachment #2: Type: text/html, Size: 2921 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
  2021-04-08  5:58 ` [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Jeremy Linton
  2021-04-08  9:48   ` Pete Batard
@ 2021-04-08 14:23   ` Andrei Warkentin
  2021-04-13 16:44     ` Samer El-Haj-Mahmoud
       [not found]     ` <167578A6C978A75F.9301@groups.io>
  2021-05-10 16:43   ` Samer El-Haj-Mahmoud
  2 siblings, 2 replies; 27+ messages in thread
From: Andrei Warkentin @ 2021-04-08 14:23 UTC (permalink / raw)
  To: Jeremy Linton, devel@edk2.groups.io
  Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie,
	samer.el-haj-mahmoud@arm.com

[-- Attachment #1: Type: text/plain, Size: 2285 bytes --]

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

https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access

...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>
Cc: ard.biesheuvel@arm.com <ard.biesheuvel@arm.com>; leif@nuviainc.com <leif@nuviainc.com>; pete@akeo.ie <pete@akeo.ie>; samer.el-haj-mahmoud@arm.com <samer.el-haj-mahmoud@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 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 <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/RaspberryPi/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/RaspberryPi/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", "RPI4EMMC", 2)
       }



       Name (_DMA, ResourceTemplate() {

-        QWordMemory (ResourceConsumer,

+        QWordMemory (ResourceProducer,

           ,

           MinFixed,

           MaxFixed,

--
2.13.7


[-- Attachment #2: Type: text/html, Size: 4834 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH 0/3] SD+USB perf/DMA fixes
  2021-04-08  5:58 [PATCH 0/3] SD+USB perf/DMA fixes Jeremy Linton
                   ` (2 preceding siblings ...)
  2021-04-08  5:58 ` [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Jeremy Linton
@ 2021-04-08 14:24 ` Andrei Warkentin
  2021-04-30 18:28   ` Samer El-Haj-Mahmoud
       [not found]   ` <167AB62D787B8F90.7155@groups.io>
  2021-04-30 20:30 ` Andrei Warkentin
  4 siblings, 2 replies; 27+ messages in thread
From: Andrei Warkentin @ 2021-04-08 14:24 UTC (permalink / raw)
  To: Jeremy Linton, devel@edk2.groups.io
  Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie,
	samer.el-haj-mahmoud@arm.com

[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]

I think Linux's behavior needs to be reconciled with the ACPI spec, which uses _DMA with ResourceConsumer, not ResourceProducer.

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>
Cc: ard.biesheuvel@arm.com <ard.biesheuvel@arm.com>; leif@nuviainc.com <leif@nuviainc.com>; pete@akeo.ie <pete@akeo.ie>; samer.el-haj-mahmoud@arm.com <samer.el-haj-mahmoud@arm.com>; Andrei Warkentin <awarkentin@vmware.com>; Jeremy Linton <jeremy.linton@arm.com>
Subject: [PATCH 0/3] SD+USB perf/DMA fixes

A large part of why the emmc & dwc2 usb
controllers haven't been working properly is
because the "bus" _DMA was incorrectly tagged
as a consumer, when it needs to be a producer.

That is why linux has been dropping the
translation value portions of _DMA().

Since the emmc2 dma (with the old B0 SoC), and the
dwc2 is expected to work, lets add matching 30 bit
IORT entries for them.

Finally, in the shuffle the high speed cap bit override
was dropped from the linux patches, and I failed
to add it back to the firmware values, this caused
the wifi perf to be lower than it should have been.

Jeremy Linton (3):
  Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  Platform/RaspberryPi/AcpiTables: Add further named components
  Platform/RaspberryPi/AcpiTables: Correct _DMA consumer

 Platform/RaspberryPi/AcpiTables/Dsdt.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Emmc.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 Platform/RaspberryPi/AcpiTables/Sdhc.asl  |  2 +-
 4 files changed, 46 insertions(+), 4 deletions(-)

--
2.13.7


[-- Attachment #2: Type: text/html, Size: 2898 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
  2021-04-08 14:23   ` Andrei Warkentin
@ 2021-04-13 16:44     ` Samer El-Haj-Mahmoud
       [not found]     ` <167578A6C978A75F.9301@groups.io>
  1 sibling, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-04-13 16:44 UTC (permalink / raw)
  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

[-- Attachment #1: Type: text/plain, Size: 5159 bytes --]

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#qwordmemory-qword-memory-resource-descriptor-macro


"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."



https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.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 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.."



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


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.



I submitted a "code first" ECR to correct the ACPI spec example (here : https://bugzilla.tianocore.org/show_bug.cgi?id=3335). 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



Thanks,

--Samer





From: Andrei Warkentin <awarkentin@vmware.com>
Sent: Thursday, April 8, 2021 10:24 AM
To: Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <Ard.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.

https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access

...lists ResourceConsumer for _DMA.

A

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

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 <jeremy.linton@arm.com<mailto: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/RaspberryPi/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/RaspberryPi/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", "RPI4EMMC", 2)
       }



       Name (_DMA, ResourceTemplate() {

-        QWordMemory (ResourceConsumer,

+        QWordMemory (ResourceProducer,

           ,

           MinFixed,

           MaxFixed,

--
2.13.7
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.

[-- Attachment #2: Type: text/html, Size: 13834 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
       [not found]     ` <167578A6C978A75F.9301@groups.io>
@ 2021-04-29 14:02       ` Samer El-Haj-Mahmoud
       [not found]       ` <167A591C4A42BD1B.6294@groups.io>
  1 sibling, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-04-29 14:02 UTC (permalink / raw)
  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

[-- Attachment #1: Type: text/plain, Size: 6496 bytes --]

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

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.

Thanks,
--Samer




From: devel@edk2.groups.io <devel@edk2.groups.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
Cc: Ard Biesheuvel <Ard.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/AcpiTables: 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#qwordmemory-qword-memory-resource-descriptor-macro


"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."



https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.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 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.."



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


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.



I submitted a "code first" ECR to correct the ACPI spec example (here : https://bugzilla.tianocore.org/show_bug.cgi?id=3335). 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



Thanks,

--Samer





From: Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>
Sent: Thursday, April 8, 2021 10:24 AM
To: Jeremy Linton <Jeremy.Linton@arm.com<mailto:Jeremy.Linton@arm.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com<mailto:Ard.Biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com>; pete@akeo.ie<mailto:pete@akeo.ie>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com<mailto: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.

https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access

...lists ResourceConsumer for _DMA.

A

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

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 <jeremy.linton@arm.com<mailto: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/RaspberryPi/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/RaspberryPi/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", "RPI4EMMC", 2)
       }



       Name (_DMA, ResourceTemplate() {

-        QWordMemory (ResourceConsumer,

+        QWordMemory (ResourceProducer,

           ,

           MinFixed,

           MaxFixed,

--
2.13.7
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.

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.

[-- Attachment #2: Type: text/html, Size: 15930 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
       [not found]       ` <167A591C4A42BD1B.6294@groups.io>
@ 2021-04-30 18:05         ` Samer El-Haj-Mahmoud
  2021-05-10 16:42           ` Samer El-Haj-Mahmoud
  0 siblings, 1 reply; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-04-30 18:05 UTC (permalink / raw)
  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

[-- Attachment #1: Type: text/plain, Size: 8047 bytes --]

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

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

With that,

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

Thanks,
--Samer


From: devel@edk2.groups.io <devel@edk2.groups.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-Mahmoud@arm.com>; Andrei Warkentin (awarkentin@vmware.com) <awarkentin@vmware.com>; Jeremy Linton <Jeremy.Linton@arm.com>; rfc@edk2.groups.io
Cc: Ard Biesheuvel <Ard.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/AcpiTables: Correct _DMA consumer

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

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.

Thanks,
--Samer




From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.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<mailto:awarkentin@vmware.com>) <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>; Jeremy Linton <Jeremy.Linton@arm.com<mailto:Jeremy.Linton@arm.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com<mailto:Ard.Biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com>; pete@akeo.ie<mailto:pete@akeo.ie>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com<mailto:Samer.El-Haj-Mahmoud@arm.com>>
Subject: Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: 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#qwordmemory-qword-memory-resource-descriptor-macro


"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."



https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.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 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.."



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


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.



I submitted a "code first" ECR to correct the ACPI spec example (here : https://bugzilla.tianocore.org/show_bug.cgi?id=3335). 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



Thanks,

--Samer





From: Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>
Sent: Thursday, April 8, 2021 10:24 AM
To: Jeremy Linton <Jeremy.Linton@arm.com<mailto:Jeremy.Linton@arm.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com<mailto:Ard.Biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com>; pete@akeo.ie<mailto:pete@akeo.ie>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com<mailto: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.

https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access

...lists ResourceConsumer for _DMA.

A

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

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 <jeremy.linton@arm.com<mailto: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/RaspberryPi/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/RaspberryPi/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", "RPI4EMMC", 2)
       }



       Name (_DMA, ResourceTemplate() {

-        QWordMemory (ResourceConsumer,

+        QWordMemory (ResourceProducer,

           ,

           MinFixed,

           MaxFixed,

--
2.13.7
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.
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.

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.

[-- Attachment #2: Type: text/html, Size: 18416 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH 0/3] SD+USB perf/DMA fixes
  2021-04-08 14:24 ` [PATCH 0/3] SD+USB perf/DMA fixes Andrei Warkentin
@ 2021-04-30 18:28   ` Samer El-Haj-Mahmoud
       [not found]   ` <167AB62D787B8F90.7155@groups.io>
  1 sibling, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-04-30 18:28 UTC (permalink / raw)
  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

[-- Attachment #1: Type: text/plain, Size: 3023 bytes --]

This is now clarified in an ACPI spec ECR (https://bugzilla.tianocore.org/show_bug.cgi?id=3335). The example will be updated in a future spec errata to use ResourceProducer.

I think this patch can resume as it is not gated by the spec anymore.



From: Andrei Warkentin <awarkentin@vmware.com>
Sent: Thursday, April 8, 2021 10:25 AM
To: Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [PATCH 0/3] SD+USB perf/DMA fixes

I think Linux's behavior needs to be reconciled with the ACPI spec, which uses _DMA with ResourceConsumer, not ResourceProducer.

A
________________________________
From: Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
Sent: Thursday, April 8, 2021 12:58 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com> <ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com> <leif@nuviainc.com<mailto:leif@nuviainc.com>>; pete@akeo.ie<mailto:pete@akeo.ie> <pete@akeo.ie<mailto:pete@akeo.ie>>; samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com> <samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com>>; Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>; Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
Subject: [PATCH 0/3] SD+USB perf/DMA fixes

A large part of why the emmc & dwc2 usb
controllers haven't been working properly is
because the "bus" _DMA was incorrectly tagged
as a consumer, when it needs to be a producer.

That is why linux has been dropping the
translation value portions of _DMA().

Since the emmc2 dma (with the old B0 SoC), and the
dwc2 is expected to work, lets add matching 30 bit
IORT entries for them.

Finally, in the shuffle the high speed cap bit override
was dropped from the linux patches, and I failed
to add it back to the firmware values, this caused
the wifi perf to be lower than it should have been.

Jeremy Linton (3):
  Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  Platform/RaspberryPi/AcpiTables: Add further named components
  Platform/RaspberryPi/AcpiTables: Correct _DMA consumer

 Platform/RaspberryPi/AcpiTables/Dsdt.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Emmc.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 Platform/RaspberryPi/AcpiTables/Sdhc.asl  |  2 +-
 4 files changed, 46 insertions(+), 4 deletions(-)

--
2.13.7
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.

[-- Attachment #2: Type: text/html, Size: 7077 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 0/3] SD+USB perf/DMA fixes
  2021-04-08  5:58 [PATCH 0/3] SD+USB perf/DMA fixes Jeremy Linton
                   ` (3 preceding siblings ...)
  2021-04-08 14:24 ` [PATCH 0/3] SD+USB perf/DMA fixes Andrei Warkentin
@ 2021-04-30 20:30 ` Andrei Warkentin
  2021-05-10 16:39   ` [edk2-devel] " Samer El-Haj-Mahmoud
  4 siblings, 1 reply; 27+ messages in thread
From: Andrei Warkentin @ 2021-04-30 20:30 UTC (permalink / raw)
  To: Jeremy Linton, devel@edk2.groups.io
  Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie,
	samer.el-haj-mahmoud@arm.com

[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]

LGTM

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
________________________________
From: Jeremy Linton <jeremy.linton@arm.com>
Sent: Thursday, April 8, 2021 12:58 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: ard.biesheuvel@arm.com <ard.biesheuvel@arm.com>; leif@nuviainc.com <leif@nuviainc.com>; pete@akeo.ie <pete@akeo.ie>; samer.el-haj-mahmoud@arm.com <samer.el-haj-mahmoud@arm.com>; Andrei Warkentin <awarkentin@vmware.com>; Jeremy Linton <jeremy.linton@arm.com>
Subject: [PATCH 0/3] SD+USB perf/DMA fixes

A large part of why the emmc & dwc2 usb
controllers haven't been working properly is
because the "bus" _DMA was incorrectly tagged
as a consumer, when it needs to be a producer.

That is why linux has been dropping the
translation value portions of _DMA().

Since the emmc2 dma (with the old B0 SoC), and the
dwc2 is expected to work, lets add matching 30 bit
IORT entries for them.

Finally, in the shuffle the high speed cap bit override
was dropped from the linux patches, and I failed
to add it back to the firmware values, this caused
the wifi perf to be lower than it should have been.

Jeremy Linton (3):
  Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  Platform/RaspberryPi/AcpiTables: Add further named components
  Platform/RaspberryPi/AcpiTables: Correct _DMA consumer

 Platform/RaspberryPi/AcpiTables/Dsdt.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Emmc.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 Platform/RaspberryPi/AcpiTables/Sdhc.asl  |  2 +-
 4 files changed, 46 insertions(+), 4 deletions(-)

--
2.13.7


[-- Attachment #2: Type: text/html, Size: 2838 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH 0/3] SD+USB perf/DMA fixes
  2021-04-30 20:30 ` Andrei Warkentin
@ 2021-05-10 16:39   ` Samer El-Haj-Mahmoud
  0 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:39 UTC (permalink / raw)
  To: devel@edk2.groups.io, Andrei Warkentin (awarkentin@vmware.com),
	Jeremy Linton
  Cc: leif@nuviainc.com, pete@akeo.ie, Ard Biesheuvel

[-- Attachment #1: Type: text/plain, Size: 2814 bytes --]

Adding Ard's new e-mail

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Andrei Warkentin via groups.io
Sent: Friday, April 30, 2021 4:30 PM
To: Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [edk2-devel] [PATCH 0/3] SD+USB perf/DMA fixes

LGTM

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>
________________________________
From: Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
Sent: Thursday, April 8, 2021 12:58 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com> <ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com> <leif@nuviainc.com<mailto:leif@nuviainc.com>>; pete@akeo.ie<mailto:pete@akeo.ie> <pete@akeo.ie<mailto:pete@akeo.ie>>; samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com> <samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com>>; Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>; Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
Subject: [PATCH 0/3] SD+USB perf/DMA fixes

A large part of why the emmc & dwc2 usb
controllers haven't been working properly is
because the "bus" _DMA was incorrectly tagged
as a consumer, when it needs to be a producer.

That is why linux has been dropping the
translation value portions of _DMA().

Since the emmc2 dma (with the old B0 SoC), and the
dwc2 is expected to work, lets add matching 30 bit
IORT entries for them.

Finally, in the shuffle the high speed cap bit override
was dropped from the linux patches, and I failed
to add it back to the firmware values, this caused
the wifi perf to be lower than it should have been.

Jeremy Linton (3):
  Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  Platform/RaspberryPi/AcpiTables: Add further named components
  Platform/RaspberryPi/AcpiTables: Correct _DMA consumer

 Platform/RaspberryPi/AcpiTables/Dsdt.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Emmc.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 Platform/RaspberryPi/AcpiTables/Sdhc.asl  |  2 +-
 4 files changed, 46 insertions(+), 4 deletions(-)

--
2.13.7

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.

[-- Attachment #2: Type: text/html, Size: 6204 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH 0/3] SD+USB perf/DMA fixes
       [not found]   ` <167AB62D787B8F90.7155@groups.io>
@ 2021-05-10 16:40     ` Samer El-Haj-Mahmoud
  0 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:40 UTC (permalink / raw)
  To: devel@edk2.groups.io, Samer El-Haj-Mahmoud,
	Andrei Warkentin (awarkentin@vmware.com), Jeremy Linton
  Cc: leif@nuviainc.com, pete@akeo.ie, Ard Biesheuvel

[-- Attachment #1: Type: text/plain, Size: 4050 bytes --]

Adding Ard's new e-mail address

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Samer El-Haj-Mahmoud via groups.io
Sent: Friday, April 30, 2021 2:28 PM
To: Andrei Warkentin (awarkentin@vmware.com) <awarkentin@vmware.com>; Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [edk2-devel] [PATCH 0/3] SD+USB perf/DMA fixes

This is now clarified in an ACPI spec ECR (https://bugzilla.tianocore.org/show_bug.cgi?id=3335). The example will be updated in a future spec errata to use ResourceProducer.

I think this patch can resume as it is not gated by the spec anymore.



From: Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>
Sent: Thursday, April 8, 2021 10:25 AM
To: Jeremy Linton <Jeremy.Linton@arm.com<mailto:Jeremy.Linton@arm.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com<mailto:Ard.Biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com>; pete@akeo.ie<mailto:pete@akeo.ie>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com<mailto:Samer.El-Haj-Mahmoud@arm.com>>
Subject: Re: [PATCH 0/3] SD+USB perf/DMA fixes

I think Linux's behavior needs to be reconciled with the ACPI spec, which uses _DMA with ResourceConsumer, not ResourceProducer.

A
________________________________
From: Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
Sent: Thursday, April 8, 2021 12:58 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com> <ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com> <leif@nuviainc.com<mailto:leif@nuviainc.com>>; pete@akeo.ie<mailto:pete@akeo.ie> <pete@akeo.ie<mailto:pete@akeo.ie>>; samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com> <samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com>>; Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>; Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
Subject: [PATCH 0/3] SD+USB perf/DMA fixes

A large part of why the emmc & dwc2 usb
controllers haven't been working properly is
because the "bus" _DMA was incorrectly tagged
as a consumer, when it needs to be a producer.

That is why linux has been dropping the
translation value portions of _DMA().

Since the emmc2 dma (with the old B0 SoC), and the
dwc2 is expected to work, lets add matching 30 bit
IORT entries for them.

Finally, in the shuffle the high speed cap bit override
was dropped from the linux patches, and I failed
to add it back to the firmware values, this caused
the wifi perf to be lower than it should have been.

Jeremy Linton (3):
  Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  Platform/RaspberryPi/AcpiTables: Add further named components
  Platform/RaspberryPi/AcpiTables: Correct _DMA consumer

 Platform/RaspberryPi/AcpiTables/Dsdt.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Emmc.asl  |  2 +-
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 Platform/RaspberryPi/AcpiTables/Sdhc.asl  |  2 +-
 4 files changed, 46 insertions(+), 4 deletions(-)

--
2.13.7
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.

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.

[-- Attachment #2: Type: text/html, Size: 8650 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  2021-04-08  5:58 ` [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode Jeremy Linton
  2021-04-08  9:48   ` Pete Batard
@ 2021-05-10 16:41   ` Samer El-Haj-Mahmoud
  1 sibling, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:41 UTC (permalink / raw)
  To: Jeremy Linton, devel@edk2.groups.io
  Cc: leif@nuviainc.com, pete@akeo.ie,
	Andrei Warkentin (awarkentin@vmware.com), Jeremy Linton,
	Ard Biesheuvel

+ Ard's new e-mail address

> -----Original Message-----
> From: Jeremy Linton <jeremy.linton@arm.com>
> Sent: Thursday, April 8, 2021 1:59 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com;
> pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; Andrei Warkentin (awarkentin@vmware.com)
> <awarkentin@vmware.com>; Jeremy Linton <Jeremy.Linton@arm.com>
> Subject: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan
> hispeed mode
>
> The arasan caps registers are no longer being overridden by the brcm iproc
> driver, so we should be assuring that the "High Speed Support" bit 21 is set in
> the capability register. This significantly improves the wifi perf using linux.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>  Platform/RaspberryPi/AcpiTables/Sdhc.asl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> index 0430ab7d2d..42776e33bb 100644
> --- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> +++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> @@ -52,7 +52,7 @@ Device (SDC1)
>    Name (_DSD, Package () {     ToUUID("daffd814-6eba-4d8c-8a91-
> bc9bbf4aa301"),     Package () {-      Package () { "sdhci-caps", 0x0100fa81 },+
> Package () { "sdhci-caps", 0x0120fa81 },     }   }) --
> 2.13.7

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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  2021-04-08  9:48   ` Pete Batard
  2021-04-08 14:17     ` Andrei Warkentin
@ 2021-05-10 16:41     ` Samer El-Haj-Mahmoud
  1 sibling, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:41 UTC (permalink / raw)
  To: Pete Batard, Jeremy Linton, devel@edk2.groups.io
  Cc: leif@nuviainc.com, Andrei Warkentin (awarkentin@vmware.com),
	Ard Biesheuvel

+ Ard’s new e-mail address

> -----Original Message-----
> From: Pete Batard <pete@akeo.ie>
> Sent: Thursday, April 8, 2021 5:48 AM
> To: Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
> Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; Samer
> El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Andrei Warkentin
> (awarkentin@vmware.com) <awarkentin@vmware.com>
> Subject: Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan
> hispeed mode
>
> On 2021.04.08 06:58, Jeremy Linton wrote:
> > The arasan caps registers are no longer being overridden by the brcm
> > iproc driver, so we should be assuring that the "High Speed Support"
> > bit 21 is set in the capability register. This significantly improves
> > the wifi perf using linux.
> >
> > Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> > ---
> >   Platform/RaspberryPi/AcpiTables/Sdhc.asl | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> > b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> > index 0430ab7d2d..42776e33bb 100644
> > --- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> > +++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> > @@ -52,7 +52,7 @@ Device (SDC1)
> >     Name (_DSD, Package () {
> >
> >       ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> >
> >       Package () {
> >
> > -      Package () { "sdhci-caps", 0x0100fa81 },
> >
> > +      Package () { "sdhci-caps", 0x0120fa81 },
> >
> >       }
> >
> >     })
> >
> >
> >
>
> Reviewed-by: Pete Batard <pete@akeo.ie>
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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode
  2021-04-08 14:17     ` Andrei Warkentin
@ 2021-05-10 16:41       ` Samer El-Haj-Mahmoud
  0 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:41 UTC (permalink / raw)
  To: Andrei Warkentin (awarkentin@vmware.com), Pete Batard,
	Jeremy Linton, devel@edk2.groups.io
  Cc: Ard Biesheuvel, leif@nuviainc.com

[-- Attachment #1: Type: text/plain, Size: 2727 bytes --]

+ Ard's new e-mail address


From: Andrei Warkentin <awarkentin@vmware.com>
Sent: Thursday, April 8, 2021 10:18 AM
To: Pete Batard <pete@akeo.ie>; Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>
________________________________
From: Pete Batard <pete@akeo.ie<mailto:pete@akeo.ie>>
Sent: Thursday, April 8, 2021 4:48 AM
To: Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com> <ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com> <leif@nuviainc.com<mailto:leif@nuviainc.com>>; samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com> <samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com>>; Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>
Subject: Re: [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode

On 2021.04.08 06:58, Jeremy Linton wrote:
> The arasan caps registers are no longer being overridden by
> the brcm iproc driver, so we should be assuring that the
> "High Speed Support" bit 21 is set in the capability
> register. This significantly improves the wifi perf
> using linux.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
> ---
>   Platform/RaspberryPi/AcpiTables/Sdhc.asl | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> index 0430ab7d2d..42776e33bb 100644
> --- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> +++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> @@ -52,7 +52,7 @@ Device (SDC1)
>     Name (_DSD, Package () {
>
>       ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
>
>       Package () {
>
> -      Package () { "sdhci-caps", 0x0100fa81 },
>
> +      Package () { "sdhci-caps", 0x0120fa81 },
>
>       }
>
>     })
>
>
>

Reviewed-by: Pete Batard <pete@akeo.ie<mailto:pete@akeo.ie>>
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.

[-- Attachment #2: Type: text/html, Size: 6640 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components
  2021-04-08  5:58 ` [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components Jeremy Linton
  2021-04-08  9:48   ` Pete Batard
  2021-04-08 14:17   ` Andrei Warkentin
@ 2021-05-10 16:41   ` Samer El-Haj-Mahmoud
  2 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:41 UTC (permalink / raw)
  To: Jeremy Linton, devel@edk2.groups.io
  Cc: Ard Biesheuvel, leif@nuviainc.com, pete@akeo.ie,
	Andrei Warkentin (awarkentin@vmware.com), Jeremy Linton

+ Ard's new e-mail address

> -----Original Message-----
> From: Jeremy Linton <jeremy.linton@arm.com>
> Sent: Thursday, April 8, 2021 1:59 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com;
> pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; Andrei Warkentin (awarkentin@vmware.com)
> <awarkentin@vmware.com>; Jeremy Linton <Jeremy.Linton@arm.com>
> Subject: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named
> components
>
> Add some additional IORT nodes for the USB & EMMC devices, realistically
> we probably only need to have a single node with the lowest
> AddressSizeLimit
> but this is conceptually "cleaner" should anyone actually try and use these
> values rather than the _DMA provided ones.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>  Platform/RaspberryPi/AcpiTables/Iort.aslc | 44
> ++++++++++++++++++++++++++++++-
>  1 file changed, 43 insertions(+), 1 deletion(-)
>
> diff --git a/Platform/RaspberryPi/AcpiTables/Iort.aslc
> b/Platform/RaspberryPi/AcpiTables/Iort.aslc
> index 00720194bb..810307ae37 100644
> --- a/Platform/RaspberryPi/AcpiTables/Iort.aslc
> +++ b/Platform/RaspberryPi/AcpiTables/Iort.aslc
> @@ -20,6 +20,8 @@ typedef struct {
>  typedef struct {
>
>    EFI_ACPI_6_0_IO_REMAPPING_TABLE      Iort;
>
>    RPI4_NC_NODE                         NamedCompNode;
>
> +  RPI4_NC_NODE                         NamedCompNode2;
>
> +  RPI4_NC_NODE                         NamedCompNode3;
>
>  } RPI4_IO_REMAPPING_STRUCTURE;
>
>
>
>  STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
>
> @@ -27,7 +29,7 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
>      ACPI_HEADER (EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE,
>
>                   RPI4_IO_REMAPPING_STRUCTURE,
>
>                   EFI_ACPI_IO_REMAPPING_TABLE_REVISION),
>
> -    1,                                              // NumNodes
>
> +    3,                                              // NumNodes
>
>      sizeof (EFI_ACPI_6_0_IO_REMAPPING_TABLE),       // NodeOffset
>
>      0                                               // Reserved
>
>    }, {
>
> @@ -50,6 +52,46 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
>      }, {
>
>        "\\_SB_.SCB0.XHC0"                            // ObjectName
>
>      }
>
> +  }, {
>
> +    // gpu/dwc usb named component node
>
> +    {
>
> +      {
>
> +        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type
>
> +        sizeof (RPI4_NC_NODE),                      // Length
>
> +        0x0,                                        // Revision
>
> +        0x0,                                        // Reserved
>
> +        0x0,                                        // NumIdMappings
>
> +        0x0,                                        // IdReference
>
> +      },
>
> +      0x0,                                          // Flags
>
> +      0x0,                                          // CacheCoherent
>
> +      0x0,                                          // AllocationHints
>
> +      0x0,                                          // Reserved
>
> +      0x0,                                          // MemoryAccessFlags
>
> +      30,                                           // AddressSizeLimit
>
> +    }, {
>
> +      "\\_SB_.GDV0.USB0"                            // ObjectName
>
> +    }
>
> +  }, {
>
> +    // emmc2 named component node
>
> +    {
>
> +      {
>
> +        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type
>
> +        sizeof (RPI4_NC_NODE),                      // Length
>
> +        0x0,                                        // Revision
>
> +        0x0,                                        // Reserved
>
> +        0x0,                                        // NumIdMappings
>
> +        0x0,                                        // IdReference
>
> +      },
>
> +      0x0,                                          // Flags
>
> +      0x0,                                          // CacheCoherent
>
> +      0x0,                                          // AllocationHints
>
> +      0x0,                                          // Reserved
>
> +      0x0,                                          // MemoryAccessFlags
>
> +      30,                                           // AddressSizeLimit
>
> +    }, {
>
> +      "\\_SB_.GDV1.SDC3"                            // ObjectName
>
> +    }
>
>    }
>
>  };
>
>
>
> --
> 2.13.7

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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components
  2021-04-08  9:48   ` Pete Batard
@ 2021-05-10 16:41     ` Samer El-Haj-Mahmoud
  0 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:41 UTC (permalink / raw)
  To: Pete Batard, Jeremy Linton, devel@edk2.groups.io
  Cc: Ard Biesheuvel, leif@nuviainc.com,
	Andrei Warkentin (awarkentin@vmware.com)

+ Ard’s new e-mail address

> -----Original Message-----
> From: Pete Batard <pete@akeo.ie>
> Sent: Thursday, April 8, 2021 5:48 AM
> To: Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
> Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; Samer
> El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Andrei Warkentin
> (awarkentin@vmware.com) <awarkentin@vmware.com>
> Subject: Re: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further
> named components
>
> On 2021.04.08 06:58, Jeremy Linton wrote:
> > Add some additional IORT nodes for the USB & EMMC devices,
> > realistically we probably only need to have a single node with the
> > lowest AddressSizeLimit but this is conceptually "cleaner" should
> > anyone actually try and use these values rather than the _DMA provided
> ones.
> >
> > Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> > ---
> >   Platform/RaspberryPi/AcpiTables/Iort.aslc | 44
> ++++++++++++++++++++++++++++++-
> >   1 file changed, 43 insertions(+), 1 deletion(-)
> >
> > diff --git a/Platform/RaspberryPi/AcpiTables/Iort.aslc
> > b/Platform/RaspberryPi/AcpiTables/Iort.aslc
> > index 00720194bb..810307ae37 100644
> > --- a/Platform/RaspberryPi/AcpiTables/Iort.aslc
> > +++ b/Platform/RaspberryPi/AcpiTables/Iort.aslc
> > @@ -20,6 +20,8 @@ typedef struct {
> >   typedef struct {
> >
> >     EFI_ACPI_6_0_IO_REMAPPING_TABLE      Iort;
> >
> >     RPI4_NC_NODE                         NamedCompNode;
> >
> > +  RPI4_NC_NODE                         NamedCompNode2;
> >
> > +  RPI4_NC_NODE                         NamedCompNode3;
> >
> >   } RPI4_IO_REMAPPING_STRUCTURE;
> >
> >
> >
> >   STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
> >
> > @@ -27,7 +29,7 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
> >       ACPI_HEADER (EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE,
> >
> >                    RPI4_IO_REMAPPING_STRUCTURE,
> >
> >                    EFI_ACPI_IO_REMAPPING_TABLE_REVISION),
> >
> > -    1,                                              // NumNodes
> >
> > +    3,                                              // NumNodes
> >
> >       sizeof (EFI_ACPI_6_0_IO_REMAPPING_TABLE),       // NodeOffset
> >
> >       0                                               // Reserved
> >
> >     }, {
> >
> > @@ -50,6 +52,46 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
> >       }, {
> >
> >         "\\_SB_.SCB0.XHC0"                            // ObjectName
> >
> >       }
> >
> > +  }, {
> >
> > +    // gpu/dwc usb named component node
> >
> > +    {
> >
> > +      {
> >
> > +        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type
> >
> > +        sizeof (RPI4_NC_NODE),                      // Length
> >
> > +        0x0,                                        // Revision
> >
> > +        0x0,                                        // Reserved
> >
> > +        0x0,                                        // NumIdMappings
> >
> > +        0x0,                                        // IdReference
> >
> > +      },
> >
> > +      0x0,                                          // Flags
> >
> > +      0x0,                                          // CacheCoherent
> >
> > +      0x0,                                          // AllocationHints
> >
> > +      0x0,                                          // Reserved
> >
> > +      0x0,                                          // MemoryAccessFlags
> >
> > +      30,                                           // AddressSizeLimit
> >
> > +    }, {
> >
> > +      "\\_SB_.GDV0.USB0"                            // ObjectName
> >
> > +    }
> >
> > +  }, {
> >
> > +    // emmc2 named component node
> >
> > +    {
> >
> > +      {
> >
> > +        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type
> >
> > +        sizeof (RPI4_NC_NODE),                      // Length
> >
> > +        0x0,                                        // Revision
> >
> > +        0x0,                                        // Reserved
> >
> > +        0x0,                                        // NumIdMappings
> >
> > +        0x0,                                        // IdReference
> >
> > +      },
> >
> > +      0x0,                                          // Flags
> >
> > +      0x0,                                          // CacheCoherent
> >
> > +      0x0,                                          // AllocationHints
> >
> > +      0x0,                                          // Reserved
> >
> > +      0x0,                                          // MemoryAccessFlags
> >
> > +      30,                                           // AddressSizeLimit
> >
> > +    }, {
> >
> > +      "\\_SB_.GDV1.SDC3"                            // ObjectName
> >
> > +    }
> >
> >     }
> >
> >   };
> >
> >
> >
>
> Reviewed-by: Pete Batard <pete@akeo.ie>
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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components
  2021-04-08 14:17   ` Andrei Warkentin
@ 2021-05-10 16:42     ` Samer El-Haj-Mahmoud
  0 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:42 UTC (permalink / raw)
  To: Andrei Warkentin (awarkentin@vmware.com), Jeremy Linton,
	devel@edk2.groups.io
  Cc: Ard Biesheuvel, leif@nuviainc.com, pete@akeo.ie

[-- Attachment #1: Type: text/plain, Size: 5638 bytes --]

+ Ard's new e-mail address


From: Andrei Warkentin <awarkentin@vmware.com>
Sent: Thursday, April 8, 2021 10:17 AM
To: Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>
________________________________
From: Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
Sent: Thursday, April 8, 2021 12:58 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com> <ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com> <leif@nuviainc.com<mailto:leif@nuviainc.com>>; pete@akeo.ie<mailto:pete@akeo.ie> <pete@akeo.ie<mailto:pete@akeo.ie>>; samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com> <samer.el-haj-mahmoud@arm.com<mailto:samer.el-haj-mahmoud@arm.com>>; Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>; Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
Subject: [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components

Add some additional IORT nodes for the USB & EMMC devices, realistically
we probably only need to have a single node with the lowest AddressSizeLimit
but this is conceptually "cleaner" should anyone actually try and use these
values rather than the _DMA provided ones.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com<mailto:jeremy.linton@arm.com>>
---
 Platform/RaspberryPi/AcpiTables/Iort.aslc | 44 ++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/AcpiTables/Iort.aslc b/Platform/RaspberryPi/AcpiTables/Iort.aslc
index 00720194bb..810307ae37 100644
--- a/Platform/RaspberryPi/AcpiTables/Iort.aslc
+++ b/Platform/RaspberryPi/AcpiTables/Iort.aslc
@@ -20,6 +20,8 @@ typedef struct {
 typedef struct {

   EFI_ACPI_6_0_IO_REMAPPING_TABLE      Iort;

   RPI4_NC_NODE                         NamedCompNode;

+  RPI4_NC_NODE                         NamedCompNode2;

+  RPI4_NC_NODE                         NamedCompNode3;

 } RPI4_IO_REMAPPING_STRUCTURE;



 STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {

@@ -27,7 +29,7 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
     ACPI_HEADER (EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE,

                  RPI4_IO_REMAPPING_STRUCTURE,

                  EFI_ACPI_IO_REMAPPING_TABLE_REVISION),

-    1,                                              // NumNodes

+    3,                                              // NumNodes

     sizeof (EFI_ACPI_6_0_IO_REMAPPING_TABLE),       // NodeOffset

     0                                               // Reserved

   }, {

@@ -50,6 +52,46 @@ STATIC RPI4_IO_REMAPPING_STRUCTURE Iort = {
     }, {

       "\\_SB_.SCB0.XHC0<file://_SB_.SCB0.XHC0>"                            // ObjectName

     }

+  }, {

+    // gpu/dwc usb named component node

+    {

+      {

+        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type

+        sizeof (RPI4_NC_NODE),                      // Length

+        0x0,                                        // Revision

+        0x0,                                        // Reserved

+        0x0,                                        // NumIdMappings

+        0x0,                                        // IdReference

+      },

+      0x0,                                          // Flags

+      0x0,                                          // CacheCoherent

+      0x0,                                          // AllocationHints

+      0x0,                                          // Reserved

+      0x0,                                          // MemoryAccessFlags

+      30,                                           // AddressSizeLimit

+    }, {

+      "\\_SB_.GDV0.USB0<file://_SB_.GDV0.USB0>"                            // ObjectName

+    }

+  }, {

+    // emmc2 named component node

+    {

+      {

+        EFI_ACPI_IORT_TYPE_NAMED_COMP,              // Type

+        sizeof (RPI4_NC_NODE),                      // Length

+        0x0,                                        // Revision

+        0x0,                                        // Reserved

+        0x0,                                        // NumIdMappings

+        0x0,                                        // IdReference

+      },

+      0x0,                                          // Flags

+      0x0,                                          // CacheCoherent

+      0x0,                                          // AllocationHints

+      0x0,                                          // Reserved

+      0x0,                                          // MemoryAccessFlags

+      30,                                           // AddressSizeLimit

+    }, {

+      "\\_SB_.GDV1.SDC3<file://_SB_.GDV1.SDC3>"                            // ObjectName

+    }

   }

 };



--
2.13.7
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.

[-- Attachment #2: Type: text/html, Size: 16950 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
  2021-04-30 18:05         ` Samer El-Haj-Mahmoud
@ 2021-05-10 16:42           ` Samer El-Haj-Mahmoud
  0 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:42 UTC (permalink / raw)
  To: devel@edk2.groups.io, Andrei Warkentin (awarkentin@vmware.com),
	Jeremy Linton
  Cc: Ard Biesheuvel, leif@nuviainc.com, pete@akeo.ie

[-- Attachment #1: Type: text/plain, Size: 8943 bytes --]

+ Ard's new e-mail address


From: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Sent: Friday, April 30, 2021 2:05 PM
To: 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>
Cc: Ard Biesheuvel <Ard.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/AcpiTables: Correct _DMA consumer

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

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

With that,

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

Thanks,
--Samer


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

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

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.

Thanks,
--Samer




From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.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<mailto:awarkentin@vmware.com>) <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>; Jeremy Linton <Jeremy.Linton@arm.com<mailto:Jeremy.Linton@arm.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com<mailto:Ard.Biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com>; pete@akeo.ie<mailto:pete@akeo.ie>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com<mailto:Samer.El-Haj-Mahmoud@arm.com>>
Subject: Re: [edk2-devel] [PATCH 3/3] Platform/RaspberryPi/AcpiTables: 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#qwordmemory-qword-memory-resource-descriptor-macro


"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."



https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.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 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.."



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


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.



I submitted a "code first" ECR to correct the ACPI spec example (here : https://bugzilla.tianocore.org/show_bug.cgi?id=3335). 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



Thanks,

--Samer





From: Andrei Warkentin <awarkentin@vmware.com<mailto:awarkentin@vmware.com>>
Sent: Thursday, April 8, 2021 10:24 AM
To: Jeremy Linton <Jeremy.Linton@arm.com<mailto:Jeremy.Linton@arm.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com<mailto:Ard.Biesheuvel@arm.com>>; leif@nuviainc.com<mailto:leif@nuviainc.com>; pete@akeo.ie<mailto:pete@akeo.ie>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com<mailto: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.

https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#dma-direct-memory-access

...lists ResourceConsumer for _DMA.

A

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

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 <jeremy.linton@arm.com<mailto: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/RaspberryPi/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/RaspberryPi/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", "RPI4EMMC", 2)
       }



       Name (_DMA, ResourceTemplate() {

-        QWordMemory (ResourceConsumer,

+        QWordMemory (ResourceProducer,

           ,

           MinFixed,

           MaxFixed,

--
2.13.7
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.
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.

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.

[-- Attachment #2: Type: text/html, Size: 20300 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
  2021-04-08  5:58 ` [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Jeremy Linton
  2021-04-08  9:48   ` Pete Batard
  2021-04-08 14:23   ` Andrei Warkentin
@ 2021-05-10 16:43   ` Samer El-Haj-Mahmoud
  2 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:43 UTC (permalink / raw)
  To: Jeremy Linton, devel@edk2.groups.io
  Cc: Ard Biesheuvel, leif@nuviainc.com, pete@akeo.ie,
	Andrei Warkentin (awarkentin@vmware.com), Jeremy Linton

+Ard's new e-mail address

> -----Original Message-----
> From: Jeremy Linton <jeremy.linton@arm.com>
> Sent: Thursday, April 8, 2021 1:59 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com;
> pete@akeo.ie; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; Andrei Warkentin (awarkentin@vmware.com)
> <awarkentin@vmware.com>; Jeremy Linton <Jeremy.Linton@arm.com>
> Subject: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA
> consumer
>
> 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 <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/RaspberryPi/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/RaspberryPi/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",
> "RPI4EMMC", 2)
>        }        Name (_DMA, ResourceTemplate() {-        QWordMemory
> (ResourceConsumer,+        QWordMemory (ResourceProducer,           ,
> MinFixed,           MaxFixed,--
> 2.13.7

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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer
  2021-04-08  9:48   ` Pete Batard
@ 2021-05-10 16:43     ` Samer El-Haj-Mahmoud
  0 siblings, 0 replies; 27+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-05-10 16:43 UTC (permalink / raw)
  To: Pete Batard, Jeremy Linton, devel@edk2.groups.io
  Cc: Ard Biesheuvel, leif@nuviainc.com,
	Andrei Warkentin (awarkentin@vmware.com)

+Ard's new e-mail address

> -----Original Message-----
> From: Pete Batard <pete@akeo.ie>
> Sent: Thursday, April 8, 2021 5:48 AM
> To: Jeremy Linton <Jeremy.Linton@arm.com>; devel@edk2.groups.io
> Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; leif@nuviainc.com; Samer
> El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Andrei Warkentin
> (awarkentin@vmware.com) <awarkentin@vmware.com>
> Subject: Re: [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA
> consumer
>
> On 2021.04.08 06:58, Jeremy Linton wrote:
> > 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 <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/RaspberryPi/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/RaspberryPi/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",
> "RPI4EMMC", 2)
> >         }
> >
> >
> >
> >         Name (_DMA, ResourceTemplate() {
> >
> > -        QWordMemory (ResourceConsumer,
> >
> > +        QWordMemory (ResourceProducer,
> >
> >             ,
> >
> >             MinFixed,
> >
> >             MaxFixed,
> >
>
> Reviewed-by: Pete Batard <pete@akeo.ie>
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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2021-05-10 16:44 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-08  5:58 [PATCH 0/3] SD+USB perf/DMA fixes Jeremy Linton
2021-04-08  5:58 ` [PATCH 1/3] Platform/RaspberryPi/Acpitables: Enable Arasan hispeed mode Jeremy Linton
2021-04-08  9:48   ` Pete Batard
2021-04-08 14:17     ` Andrei Warkentin
2021-05-10 16:41       ` Samer El-Haj-Mahmoud
2021-05-10 16:41     ` Samer El-Haj-Mahmoud
2021-05-10 16:41   ` Samer El-Haj-Mahmoud
2021-04-08  5:58 ` [PATCH 2/3] Platform/RaspberryPi/AcpiTables: Add further named components Jeremy Linton
2021-04-08  9:48   ` Pete Batard
2021-05-10 16:41     ` Samer El-Haj-Mahmoud
2021-04-08 14:17   ` Andrei Warkentin
2021-05-10 16:42     ` Samer El-Haj-Mahmoud
2021-05-10 16:41   ` Samer El-Haj-Mahmoud
2021-04-08  5:58 ` [PATCH 3/3] Platform/RaspberryPi/AcpiTables: Correct _DMA consumer Jeremy Linton
2021-04-08  9:48   ` Pete Batard
2021-05-10 16:43     ` Samer El-Haj-Mahmoud
2021-04-08 14:23   ` Andrei Warkentin
2021-04-13 16:44     ` Samer El-Haj-Mahmoud
     [not found]     ` <167578A6C978A75F.9301@groups.io>
2021-04-29 14:02       ` [edk2-devel] " Samer El-Haj-Mahmoud
     [not found]       ` <167A591C4A42BD1B.6294@groups.io>
2021-04-30 18:05         ` Samer El-Haj-Mahmoud
2021-05-10 16:42           ` Samer El-Haj-Mahmoud
2021-05-10 16:43   ` Samer El-Haj-Mahmoud
2021-04-08 14:24 ` [PATCH 0/3] SD+USB perf/DMA fixes Andrei Warkentin
2021-04-30 18:28   ` Samer El-Haj-Mahmoud
     [not found]   ` <167AB62D787B8F90.7155@groups.io>
2021-05-10 16:40     ` [edk2-devel] " Samer El-Haj-Mahmoud
2021-04-30 20:30 ` Andrei Warkentin
2021-05-10 16:39   ` [edk2-devel] " Samer El-Haj-Mahmoud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox