EmbeddedPkg/CoherentDmaLib: Add missing checks to DmaMap
UEFI Sct validates Dma mapping. For CoherentDmaLib it always failed because there were no required checks present in DmaMap. 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:
parent
c783da6599
commit
c4709260f6
|
@ -58,6 +58,12 @@ DmaMap (
|
||||||
OUT VOID **Mapping
|
OUT VOID **Mapping
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (HostAddress == NULL ||
|
||||||
|
NumberOfBytes == NULL ||
|
||||||
|
DeviceAddress == NULL ||
|
||||||
|
Mapping == NULL ) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
*DeviceAddress = HostToDeviceAddress (HostAddress);
|
*DeviceAddress = HostToDeviceAddress (HostAddress);
|
||||||
*Mapping = NULL;
|
*Mapping = NULL;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue