public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/3] EmbeddedPkg/CoherentDmaLib: Fix typo in DmaAlignedBuffer
@ 2018-09-06 18:55 Vladimir Olovyannikov
  2018-09-06 18:55 ` [PATCH 2/3] EmbeddedPkg/CoherentDmaLib: Add missing checks to DmaMap Vladimir Olovyannikov
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vladimir Olovyannikov @ 2018-09-06 18:55 UTC (permalink / raw)
  To: edk2-devel, Ard Biesheuvel, Leif Lindholm, Ruiyu Ni; +Cc: Vladimir Olovyannikov

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>
---
 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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-12-17  1:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/3] EmbeddedPkg/CoherentDmaLib: Fix typo in DmaAlignedBuffer Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox