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>
This commit is contained in:
Vladimir Olovyannikov 2018-09-06 11:55:02 -07:00 committed by Ard Biesheuvel
parent 4d62189347
commit c783da6599
1 changed files with 1 additions and 1 deletions

View File

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