From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web12.7881.1574954388125084863 for ; Thu, 28 Nov 2019 07:19:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=dWAQgukI; spf=pass (domain: linaro.org, ip: 209.85.128.68, mailfrom: leif.lindholm@linaro.org) Received: by mail-wm1-f68.google.com with SMTP id y5so12050091wmi.5 for ; Thu, 28 Nov 2019 07:19:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aOEminR3IDg+cUQe5KVmVLSNxWiAYajOZb6bw+fgL8g=; b=dWAQgukIyvwvMegbtRGreBFZNTVKBmlMD1qM6z/oa0uteL9yD0EbCZQTyHQzKxy3/d LhmQPt/Bafn38hZ7a6w7M/TvPbz90COYw0qNmbhsXOQl64OiOH7rSm2BSVHHEU/J+xfk M5erm7sGdi26kqTBzB1adkIFdk0H2hupn5sxQG9aun32/9/pu5o7Ew0aqMiOPGuK0iE3 1zm8hxaSior4vlNN9FslMl6UHNJsLxtZA19h8w4dzNmF2ylzdWSqb0jWFxbc0ydoY2fS tWfkDwluDjF33TcpzHf10Q5PdP1wNkjA934ZrhzZKKNoeELPF3cqDTn/K1PO1GhJKRlL Hcow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aOEminR3IDg+cUQe5KVmVLSNxWiAYajOZb6bw+fgL8g=; b=q33mSG4jb4m4cvaZ0ybnJUjSjp5vKan2u9HG9Rc0jv71YhP0X48jt/As8qIfuIx1mu plcDiOxdX+Fr6tDESta6HIk4mv2eFT2NCGJoVIn92zOBbS5+8rSERm7jbLp9ws/Qhuh9 WkL53MM6bpG2VuvlmvUSIsAV5Ds6u2ZebNZLuQf9Qdc4tRM4hfwC+BbY7XSFjtLl+k2n ePAvC2Cuo4RO+a8BPwKtgRUXztWcukMrg4OjTKKpKYAEiQqXs4VyTc3XSYPGhsucQoTt XYJxYwUtJyHoBgQ2XQ8hHEYkdqpN1AWnLm63wnFEdZa7KiwPWVnTDdQWAMPCKl9gCGQ+ CwTg== X-Gm-Message-State: APjAAAV5QbDUPA1EjlCIkGzURk+3Isq/iCo6683AzOeMJNIzV/7+rF0l kopINzWpGpWoj0GFcNsjqWCZIV7Kkis= X-Google-Smtp-Source: APXvYqyrVbby6n2M56P/dTSR0lfPWBNJZCNYPKnuqCDjRuWRNbEbBv+6rVWUewgQ9e/psA3QQaaglw== X-Received: by 2002:a7b:ce11:: with SMTP id m17mr10646230wmc.113.1574954386525; Thu, 28 Nov 2019 07:19:46 -0800 (PST) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id k4sm11324100wmk.26.2019.11.28.07.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 07:19:43 -0800 (PST) Date: Thu, 28 Nov 2019 15:19:41 +0000 From: "Leif Lindholm" To: Ard Biesheuvel Cc: edk2-devel-groups-io Subject: Re: [PATCH edk2-platforms 1/2] Silicon/SynQuacer/PlatformDxe: set NETSEC DMA as coherent Message-ID: <20191128151940.GV7359@bivouac.eciton.net> References: <20191128144840.25654-1-ard.biesheuvel@linaro.org> <20191128145614.GT7359@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 28, 2019 at 15:59:14 +0100, Ard Biesheuvel wrote: > 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. Ah, fair enough. Thanks for the explanation. / Leif > > > 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 > > >