From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3C1141A1FFE for ; Fri, 23 Sep 2016 09:21:49 -0700 (PDT) Received: by mail-it0-x22e.google.com with SMTP id r192so19521352ita.0 for ; Fri, 23 Sep 2016 09:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zgkd814LN3FzXOjdQEFh3pNh5cqEF1jIL77eeKJFWf4=; b=Ve+2aGAz1owSlnaXjkczpyjpJEo7xG9RaNnDFS0on0YRtd0nGYWGAN6j75wEH6XMLr iVoXmlNqYy2gvG/eR6efYzR0jpdpYuUS/NBSy7gnnTs4a8aYLyM0laaX7GYuCSy2Ad4C XfK1TydkrEZdc4nTLVLeu36ixP8lIwfTl9MNM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zgkd814LN3FzXOjdQEFh3pNh5cqEF1jIL77eeKJFWf4=; b=YAr3b7rX+MsFqCHxHRb1Gfw/ZsXVUSbNjQdrSVDasY5T+AMjtjOWID7g6ejV4ysJ1G yssgwfyDgGeN3ApV7IRu7iVTRv4+ltYiG8GNFUhV1/Taeb2cggaWNB92Mm76qaLig7gu VyCHeE9BCpwNq7BqqBLJiqLR8SkwZhIPJTaUjvKKYLlX2jS1r0wEXZIj+bfMG7Uu0E1C QPEQWREfpGcwWo3AmirrwaHhwwne8ZhrDmJJ5YBVLPRpP0GzaC/HkEV5OkJsjAuSN7fU V5lvxpB/l/5t6WA+md7nzLJyFmL4w2zBl6GFL5KOMy3CFq16ZN1hZjclVXoCwI7qqNbG vLxA== X-Gm-Message-State: AA6/9Rk8McGN5/4y47/d3U6cF14zsiIWCsEvlNWNtOj3ojxMIraYwdA2yyC1wWDPFy/OWzbZVY86392BnKwaMgiK X-Received: by 10.36.103.131 with SMTP id u125mr4508978itc.68.1474647708512; Fri, 23 Sep 2016 09:21:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Fri, 23 Sep 2016 09:21:47 -0700 (PDT) In-Reply-To: References: <1474583581-41663-1-git-send-email-daniil.egranov@arm.com> <1474583581-41663-2-git-send-email-daniil.egranov@arm.com> From: Ard Biesheuvel Date: Fri, 23 Sep 2016 17:21:47 +0100 Message-ID: To: Daniil Egranov Cc: "edk2-devel@lists.01.org" , Leif Lindholm Subject: Re: [PATCH 1/2] ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe: Remove calls to ArmDmaLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 16:21:49 -0000 Content-Type: text/plain; charset=UTF-8 On 23 September 2016 at 17:20, Daniil Egranov wrote: > Hi Ard, > > > On 09/23/2016 02:57 AM, Ard Biesheuvel wrote: >> >> Hi Daniil, >> >> On 22 September 2016 at 23:33, Daniil Egranov >> wrote: >>> >>> The PCI on Juno is DMA coherent, which means it should not be >>> using ArmDmaLib for PCI DMA. >>> >>> Contributed-under: TianoCore Contribution Agreement 1.0 >>> Signed-off-by: Daniil Egranov >>> --- >>> ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf >>> | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git >>> a/ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf >>> b/ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf >>> index de28c80..597154c 100644 >>> --- >>> a/ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf >>> +++ >>> b/ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf >>> @@ -36,7 +36,7 @@ >>> MemoryAllocationLib >>> DxeServicesTableLib >>> CacheMaintenanceLib >>> - DmaLib >>> + NullDmaLib >>> >> This is wrong. The module .inf lists library *classes* and the >> platform .dsc decides how each class maps onto an implementation (aka >> library resolution) > > Agree. However, this is platform specific module and as i understand, the > behavior of it will not change so, I think, having NullDmaLib here will be > appropriate as well. We can move it to .dsc file, if it fits better to the > platform description/module dependencies structure. > What you could do is remove the DmaLib dependency altogether, and just implement PciIo->Map and PciIo->Unmap directly, and always return the host address.