From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.groups.io with SMTP id smtpd.web12.7548.1574953167403306032 for ; Thu, 28 Nov 2019 06:59:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=thkecc72; spf=pass (domain: linaro.org, ip: 209.85.221.65, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f65.google.com with SMTP id s5so31482939wrw.2 for ; Thu, 28 Nov 2019 06:59:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/AWB4Q4ycd0yKzIS+FljaLfYNZJz/WqWXNC+Irii+CM=; b=thkecc72SdBf8Ewt1C6hPTNCj7WSiZ/XZkKRW31qTefZen/DnRSDDjamZMnryIp9qe EKJ77CztAyNNXlfxNA3BSDr7Q+bqnuBwPo3B3JYbmUsITRBlq3SK9aIS2jqdzlqeJWMC dzcKKAo2fnW3hNilXuG57M4ERFXeA2Eq79YL10rV0LDaxz8Em72IukYIiGd9Jy8pBIA7 vH3JH1tG0np/EDhmNAfdvRbZPBvhaYhtTFGFp9mK5tkHIKE5L20KuS5MN8l3LaNFsiK/ ObWvWgk1hD7iTgqdiYZqDfX0P/6CyctNq1auulafB+MGMJvtoxMX3wRgHDp38CobqRj6 U8HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/AWB4Q4ycd0yKzIS+FljaLfYNZJz/WqWXNC+Irii+CM=; b=aSHeaHSqr+FZ4/RZBLbvoisblPgonjh8GrTJ1e0eewV4XhL7wAx3ZCFrM4Drl0q/pz 9UFknPEU+H6xkLfwYsg4Gvv6tXtkQud3M1qwTdT6vzcVs+N2bpzVOjiwwJdmPB94rYur vZbB8Nsw7CrAppOBdMBhkoQ8cor8SdAG1I7QfCH/FglMM5EwOhAfWJh2L8x7zWA7Rlk3 xAnxJdDZL4Swn2V3KkvEKnebiu8nvlfbZpo7AcbPSsURv5HD/nm9NmEyzwVPSWW9YAXV /LByf5g3OWkhtD5dhQ0i5uMMPK4of8ZN4xV61E03G0XcEos6sP3hZe1n+6VPYTQWC4HM 6GNg== X-Gm-Message-State: APjAAAWK0eRiuA78oatstpzrHZG6kqdTbxk9gdpnKDHMIt0Zf89iF/rI KC3eI4lTZdP8l8rL/ubzEoEkn86A1eCJ1TFtON23s4DZ X-Google-Smtp-Source: APXvYqzGI9XXIOQgad+bVdb4yt6L1YYw5L7yraF3WwlomHGxSufNHS1mw5qHLw1iG4WBMGMWjaFI0eFVAVrEJBpD/Ss= X-Received: by 2002:adf:e6d0:: with SMTP id y16mr24679492wrm.32.1574953165763; Thu, 28 Nov 2019 06:59:25 -0800 (PST) MIME-Version: 1.0 References: <20191128144840.25654-1-ard.biesheuvel@linaro.org> <20191128145614.GT7359@bivouac.eciton.net> In-Reply-To: <20191128145614.GT7359@bivouac.eciton.net> From: "Ard Biesheuvel" Date: Thu, 28 Nov 2019 15:59:14 +0100 Message-ID: Subject: Re: [PATCH edk2-platforms 1/2] Silicon/SynQuacer/PlatformDxe: set NETSEC DMA as coherent To: Leif Lindholm Cc: edk2-devel-groups-io Content-Type: text/plain; charset="UTF-8" On Thu, 28 Nov 2019 at 15:56, Leif Lindholm 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. > > Let's fix this nonetheless, in case it ever matters. > > > > Signed-off-by: Ard Biesheuvel > > This patch clearly makes sense anyway, so: > Reviewed-by: Leif Lindholm > 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 > >