diff options
author | Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> | 2018-09-06 11:55:02 -0700 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2018-09-07 12:21:28 +0200 |
commit | c783da659915c27437047cad9b5d21b9804388c0 (patch) | |
tree | 2f536be64500cef79e096a7b4398505e2db8a5ab /EmbeddedPkg/Library | |
parent | 4d621893471c6299de06aeac56f4c6cddc5c9ebe (diff) | |
download | edk2-c783da659915c27437047cad9b5d21b9804388c0.zip edk2-c783da659915c27437047cad9b5d21b9804388c0.tar.gz edk2-c783da659915c27437047cad9b5d21b9804388c0.tar.bz2 |
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/Library')
-rw-r--r-- | EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c b/EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.c index 564db83..8ca9e6a 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;
|