* [PATCH edk2-platforms] Platform/Hisilicon: switch to NonCoherentDmaLib
@ 2017-08-31 13:51 Ard Biesheuvel
2017-09-01 10:58 ` Leif Lindholm
0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2017-08-31 13:51 UTC (permalink / raw)
To: edk2-devel, leif.lindholm; +Cc: Ard Biesheuvel
Remove the shared ArmDmaLib resolution from the shared .dsc include
file: it will be removed soon from upstream EDK2. Instead, replace
it with an explicit NonCoherentDmaLib resolution for each driver that
depends on DmaLib. This makes it more insightful which peripherals are
non cache coherent, and forces derived platforms to choose a DmaLib
resolution explicitly for newly added drivers.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/Hisilicon/D02/Pv660D02.dsc | 6 +++++-
Platform/Hisilicon/D03/D03.dsc | 1 +
Platform/Hisilicon/D05/D05.dsc | 1 +
Silicon/Hisilicon/Hisilicon.dsc.inc | 1 -
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Platform/Hisilicon/D02/Pv660D02.dsc b/Platform/Hisilicon/D02/Pv660D02.dsc
index 423f7d77ff8d..1fd2b98f1552 100644
--- a/Platform/Hisilicon/D02/Pv660D02.dsc
+++ b/Platform/Hisilicon/D02/Pv660D02.dsc
@@ -354,6 +354,7 @@
Silicon/Hisilicon/Pv660/Drivers/PcieInitDxe/PcieInitDxe.inf
Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
<LibraryClasses>
+ DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
NULL|Platform/Hisilicon/D02/Library/PlatformPciLib/PlatformPciLib.inf
}
MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
@@ -379,7 +380,10 @@
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
- Silicon/Hisilicon/Drivers/SasV1Dxe/SasV1Dxe.inf
+ Silicon/Hisilicon/Drivers/SasV1Dxe/SasV1Dxe.inf {
+ <LibraryClasses>
+ DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
+ }
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
Silicon/Hisilicon/Pv660/Drivers/SasInitDxe/SasV1Init.inf
diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
index 6363b7eeec50..afea162cc48f 100644
--- a/Platform/Hisilicon/D03/D03.dsc
+++ b/Platform/Hisilicon/D03/D03.dsc
@@ -473,6 +473,7 @@
Platform/Hisilicon/D03/Drivers/PciPlatform/PciPlatform.inf
Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
<LibraryClasses>
+ DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
NULL|Platform/Hisilicon/D03/Library/PlatformPciLib/PlatformPciLib.inf
}
diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
index 35c319757ef8..3cdb1b161bd5 100644
--- a/Platform/Hisilicon/D05/D05.dsc
+++ b/Platform/Hisilicon/D05/D05.dsc
@@ -609,6 +609,7 @@
Platform/Hisilicon/D03/Drivers/PciPlatform/PciPlatform.inf
Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
<LibraryClasses>
+ DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
}
diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc b/Silicon/Hisilicon/Hisilicon.dsc.inc
index fadd352192ee..d77f0e35431e 100644
--- a/Silicon/Hisilicon/Hisilicon.dsc.inc
+++ b/Silicon/Hisilicon/Hisilicon.dsc.inc
@@ -56,7 +56,6 @@
DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf
CpuExceptionHandlerLib|ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.inf
ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf
- DmaLib|ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf
ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf
ArmGicArchLib|ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH edk2-platforms] Platform/Hisilicon: switch to NonCoherentDmaLib
2017-08-31 13:51 [PATCH edk2-platforms] Platform/Hisilicon: switch to NonCoherentDmaLib Ard Biesheuvel
@ 2017-09-01 10:58 ` Leif Lindholm
2017-09-01 11:59 ` Ard Biesheuvel
0 siblings, 1 reply; 3+ messages in thread
From: Leif Lindholm @ 2017-09-01 10:58 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: edk2-devel
On Thu, Aug 31, 2017 at 02:51:28PM +0100, Ard Biesheuvel wrote:
> Remove the shared ArmDmaLib resolution from the shared .dsc include
> file: it will be removed soon from upstream EDK2. Instead, replace
> it with an explicit NonCoherentDmaLib resolution for each driver that
> depends on DmaLib. This makes it more insightful which peripherals are
I would suggest "insightful" -> "clear" or "obvious".
Fold that in if you agree.
> non cache coherent, and forces derived platforms to choose a DmaLib
> resolution explicitly for newly added drivers.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
> Platform/Hisilicon/D02/Pv660D02.dsc | 6 +++++-
> Platform/Hisilicon/D03/D03.dsc | 1 +
> Platform/Hisilicon/D05/D05.dsc | 1 +
> Silicon/Hisilicon/Hisilicon.dsc.inc | 1 -
> 4 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/Platform/Hisilicon/D02/Pv660D02.dsc b/Platform/Hisilicon/D02/Pv660D02.dsc
> index 423f7d77ff8d..1fd2b98f1552 100644
> --- a/Platform/Hisilicon/D02/Pv660D02.dsc
> +++ b/Platform/Hisilicon/D02/Pv660D02.dsc
> @@ -354,6 +354,7 @@
> Silicon/Hisilicon/Pv660/Drivers/PcieInitDxe/PcieInitDxe.inf
> Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
> <LibraryClasses>
> + DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
> NULL|Platform/Hisilicon/D02/Library/PlatformPciLib/PlatformPciLib.inf
> }
> MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> @@ -379,7 +380,10 @@
> MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
> MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>
> - Silicon/Hisilicon/Drivers/SasV1Dxe/SasV1Dxe.inf
> + Silicon/Hisilicon/Drivers/SasV1Dxe/SasV1Dxe.inf {
> + <LibraryClasses>
> + DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
> + }
> MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
> MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
> Silicon/Hisilicon/Pv660/Drivers/SasInitDxe/SasV1Init.inf
> diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
> index 6363b7eeec50..afea162cc48f 100644
> --- a/Platform/Hisilicon/D03/D03.dsc
> +++ b/Platform/Hisilicon/D03/D03.dsc
> @@ -473,6 +473,7 @@
> Platform/Hisilicon/D03/Drivers/PciPlatform/PciPlatform.inf
> Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
> <LibraryClasses>
> + DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
> NULL|Platform/Hisilicon/D03/Library/PlatformPciLib/PlatformPciLib.inf
> }
>
> diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
> index 35c319757ef8..3cdb1b161bd5 100644
> --- a/Platform/Hisilicon/D05/D05.dsc
> +++ b/Platform/Hisilicon/D05/D05.dsc
> @@ -609,6 +609,7 @@
> Platform/Hisilicon/D03/Drivers/PciPlatform/PciPlatform.inf
> Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
> <LibraryClasses>
> + DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
> NULL|Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.inf
> }
>
> diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc b/Silicon/Hisilicon/Hisilicon.dsc.inc
> index fadd352192ee..d77f0e35431e 100644
> --- a/Silicon/Hisilicon/Hisilicon.dsc.inc
> +++ b/Silicon/Hisilicon/Hisilicon.dsc.inc
> @@ -56,7 +56,6 @@
> DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf
> CpuExceptionHandlerLib|ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.inf
> ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf
> - DmaLib|ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf
> ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf
> ArmGicArchLib|ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
> ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH edk2-platforms] Platform/Hisilicon: switch to NonCoherentDmaLib
2017-09-01 10:58 ` Leif Lindholm
@ 2017-09-01 11:59 ` Ard Biesheuvel
0 siblings, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2017-09-01 11:59 UTC (permalink / raw)
To: Leif Lindholm; +Cc: edk2-devel@lists.01.org
On 1 September 2017 at 11:58, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Thu, Aug 31, 2017 at 02:51:28PM +0100, Ard Biesheuvel wrote:
>> Remove the shared ArmDmaLib resolution from the shared .dsc include
>> file: it will be removed soon from upstream EDK2. Instead, replace
>> it with an explicit NonCoherentDmaLib resolution for each driver that
>> depends on DmaLib. This makes it more insightful which peripherals are
>
> I would suggest "insightful" -> "clear" or "obvious".
> Fold that in if you agree.
>
>> non cache coherent, and forces derived platforms to choose a DmaLib
>> resolution explicitly for newly added drivers.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
>
Pushed as 0b4ef4583f33 with s/insightful/obvious/
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-01 11:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-31 13:51 [PATCH edk2-platforms] Platform/Hisilicon: switch to NonCoherentDmaLib Ard Biesheuvel
2017-09-01 10:58 ` Leif Lindholm
2017-09-01 11:59 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox