From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::d43; helo=mail-io1-xd43.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (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 E334621123B97 for ; Fri, 7 Sep 2018 03:37:33 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id l14-v6so1160204iob.7 for ; Fri, 07 Sep 2018 03:37:33 -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=TPG4wD01VDcqTELPKwWyeU/qS8OfxKJcoL1UGrcmHzI=; b=G1n571gH7QLR2H7EEGcxXXfAhmc3dxFH7ulKLcfT0/V7EBvn9v1aqWN/b8po/RfzU2 /45YYE4vKXWyXCiKd7fSCrIz5iOW8wzgeJ2zFlyY949b7vTiNH14BJ3vuX3HyZHh5Fps bM6SdIavcS+zlPjMF4sxKfHAsY6kdfEueKni4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TPG4wD01VDcqTELPKwWyeU/qS8OfxKJcoL1UGrcmHzI=; b=PFULvY0q/+qRYvW3vQBFVhYmtkBUX+ZfcjZitzzy1zm00w5OPiU0ZG62RdkPsRbUEC KcgKypFYvTv5THkkXXik3ID2sMPexrd/7gIPILtUmcASITj/RrrklDcrCKeOYaYI0vop zAm+S8g+zq904oZpIwx+HsEsJvy9NzwLqK2QadpPv3pgiIJSDdktwkD3JpEvnErFoL5M 3DCKlIkfyVwqmpbg5239FR+nLxBIvSi66MX3Qm/7x9pNJUbcDgC/aymnQd7QAVYhROU9 xoruX7263+5G+7wfRMSDBuxlKXoMF7pwmUbQ5CbITo9WXubEOWS81ajz+M6I/FukCeDD /JBA== X-Gm-Message-State: APzg51AeMV4ZDUK/Qr2lIA1z/XK35smYnHf/4NqJauP9iv6WdKQD41K/ 3dkVD33IgJZ67Pug2lqtnaQAw0c9oyecC8MsI8+e2A== X-Google-Smtp-Source: ANB0VdZiD6LWzn1cqOVvZtsaookAO9FFXh7oBFexqnjP7e6NVFEeoXJysHWJ7pGEWC9ymkXr9BnqwFvcwdTLcEzNahQ= X-Received: by 2002:a6b:be83:: with SMTP id o125-v6mr5390459iof.173.1536316653289; Fri, 07 Sep 2018 03:37:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:1c06:0:0:0:0:0 with HTTP; Fri, 7 Sep 2018 03:37:32 -0700 (PDT) In-Reply-To: References: From: Ard Biesheuvel Date: Fri, 7 Sep 2018 12:37:32 +0200 Message-ID: To: Vladimir Olovyannikov Cc: "edk2-devel@lists.01.org" , Leif Lindholm , Ruiyu Ni Subject: Re: [PATCH 1/3] EmbeddedPkg/CoherentDmaLib: Fix typo in DmaAlignedBuffer X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2018 10:37:34 -0000 Content-Type: text/plain; charset="UTF-8" On 6 September 2018 at 20:55, Vladimir Olovyannikov wrote: > The only valid memory types for DmaAlignedBuffer should be > EfiBootServicesData and EfiRuntimeServicesData. However due to the typo, > there is no way to allocate runtime pages, and INVALID_PARAMETER is > always returned. Fix the typo. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vladimir Olovyannikov Patches #1 and #2 Reviewed-by: Ard Biesheuvel Pushed as 4d621893471c..c4709260f62f Thanks! > --- > EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c b/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c > index 564db83c901c..8ca9e6aa5b1b 100644 > --- a/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c > +++ b/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c > @@ -154,7 +154,7 @@ DmaAllocateAlignedBuffer ( > // > if (MemoryType == EfiBootServicesData) { > *HostAddress = AllocateAlignedPages (Pages, Alignment); > - } else if (MemoryType != EfiRuntimeServicesData) { > + } else if (MemoryType == EfiRuntimeServicesData) { > *HostAddress = AllocateAlignedRuntimePages (Pages, Alignment); > } else { > return EFI_INVALID_PARAMETER; > -- > 2.18.0 >