From: "Leif Lindholm" <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>
Subject: Re: [PATCH edk2-platforms 1/2] Silicon/SynQuacer/PlatformDxe: set NETSEC DMA as coherent
Date: Thu, 28 Nov 2019 15:19:41 +0000 [thread overview]
Message-ID: <20191128151940.GV7359@bivouac.eciton.net> (raw)
In-Reply-To: <CAKv+Gu-PeOP+y_WxnyFM0a91kHYK=1iFMQABK+jO-PVRn7E-DQ@mail.gmail.com>
On Thu, Nov 28, 2019 at 15:59:14 +0100, Ard Biesheuvel wrote:
> On Thu, 28 Nov 2019 at 15:56, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> >
> > On Thu, Nov 28, 2019 at 15:48:39 +0100, Ard Biesheuvel wrote:
> > > We switched to cache coherent DMA for the NETSEC network controller ages
> > > ago, but the platform driver that registers the non-discoverable device
> > > currently does not reflect this change, which we haven't noticed since
> > > the driver doesn't look at this flag.
> >
> > Should the drive look at this flag?
> >
>
> The driver links against DmaLib, so it is either built for coherent
> DMA only, or for non-coherent DMA only. This is different from the
> eMMC on this platform, since it uses NonDiscoverablePciDeviceDxe,
> which implements support for both coherent and non-coherent DMA in the
> same driver, so there it has to be accurate or things break. For
> NETSEC, we could add a check I suppose, but it is certainly not a high
> prio thing imo.
Ah, fair enough.
Thanks for the explanation.
/
Leif
> > > Let's fix this nonetheless, in case it ever matters.
> > >
> > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> >
> > This patch clearly makes sense anyway, so:
> > Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> >
>
> Thanks
>
> >
> > > ---
> > > Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
> > > index 73cc560fa8d8..57f8fa90343a 100644
> > > --- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
> > > +++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
> > > @@ -130,7 +130,7 @@ RegisterDevice (
> > > }
> > >
> > > Device->Type = TypeGuid;
> > > - Device->DmaType = NonDiscoverableDeviceDmaTypeNonCoherent;
> > > + Device->DmaType = NonDiscoverableDeviceDmaTypeCoherent;
> > > Device->Resources = Desc;
> > >
> > > Status = gBS->InstallMultipleProtocolInterfaces (Handle,
> > > --
> > > 2.20.1
> > >
next prev parent reply other threads:[~2019-11-28 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 14:48 [PATCH edk2-platforms 1/2] Silicon/SynQuacer/PlatformDxe: set NETSEC DMA as coherent Ard Biesheuvel
2019-11-28 14:48 ` [PATCH edk2-platforms 2/2] Platform/DeveloperBox: disable variable runtime cache Ard Biesheuvel
2019-11-28 15:01 ` Leif Lindholm
2019-11-28 15:04 ` Ard Biesheuvel
2019-11-28 15:20 ` [edk2-devel] " Leif Lindholm
2019-11-28 14:56 ` [PATCH edk2-platforms 1/2] Silicon/SynQuacer/PlatformDxe: set NETSEC DMA as coherent Leif Lindholm
2019-11-28 14:59 ` Ard Biesheuvel
2019-11-28 15:19 ` Leif Lindholm [this message]
2019-11-28 15:58 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191128151940.GV7359@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox