summaryrefslogtreecommitdiff
path: root/EmbeddedPkg
diff options
context:
space:
mode:
authorVladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>2018-09-06 11:55:02 -0700
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-09-07 12:21:28 +0200
commitc783da659915c27437047cad9b5d21b9804388c0 (patch)
tree2f536be64500cef79e096a7b4398505e2db8a5ab /EmbeddedPkg
parent4d621893471c6299de06aeac56f4c6cddc5c9ebe (diff)
EmbeddedPkg/CoherentDmaLib: Fix typo in DmaAlignedBuffer
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> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r--EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c b/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c
index 564db83c90..8ca9e6aa5b 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;