From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Leif Lindholm <leif.lindholm@linaro.org>,
Ruiyu Ni <ruiyu.ni@intel.com>
Subject: Re: [PATCH 1/3] EmbeddedPkg/CoherentDmaLib: Fix typo in DmaAlignedBuffer
Date: Fri, 7 Sep 2018 12:37:32 +0200 [thread overview]
Message-ID: <CAKv+Gu9J=65hYWw7gaaosn9+MuBTzATFthdd-xT09q-OAwp2yg@mail.gmail.com> (raw)
In-Reply-To: <ea512050c425791cd652fe395283b3dedd2f8bee.1536260010.git.vladimir.olovyannikov@broadcom.com>
On 6 September 2018 at 20:55, Vladimir Olovyannikov
<vladimir.olovyannikov@broadcom.com> 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 <vladimir.olovyannikov@broadcom.com>
Patches #1 and #2
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
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
>
prev parent reply other threads:[~2018-09-07 10:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 18:55 [PATCH 1/3] EmbeddedPkg/CoherentDmaLib: Fix typo in DmaAlignedBuffer Vladimir Olovyannikov
2018-09-06 18:55 ` [PATCH 2/3] EmbeddedPkg/CoherentDmaLib: Add missing checks to DmaMap Vladimir Olovyannikov
2018-09-06 18:55 ` [PATCH 3/3] MdeModulePkg/NonDiscoverablePciDeviceDxe: add missing validation Vladimir Olovyannikov
2018-09-07 10:36 ` Ard Biesheuvel
2018-12-15 13:36 ` Leif Lindholm
2018-12-17 0:16 ` Wang, Jian J
2018-12-17 0:59 ` Wang, Jian J
2018-09-07 10:37 ` Ard Biesheuvel [this message]
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='CAKv+Gu9J=65hYWw7gaaosn9+MuBTzATFthdd-xT09q-OAwp2yg@mail.gmail.com' \
--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