MdeModulePkg/SdBlockIoPei: Support IoMmu

Update the SdBlockIoPei driver to consume IOMMU_PPI to allocate DMA
buffer.

If no IOMMU_PPI exists, this driver still calls PEI service
to allocate DMA buffer, with assumption that DRAM==DMA.

This is a compatible change.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Hao Wu
2017-10-30 13:49:31 +08:00
parent 85ad9a6e0a
commit 77af86688c
7 changed files with 483 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
## @file
# Description file for the SD memory card Peim driver.
#
# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -36,6 +36,7 @@
SdHci.h
SdHcMem.c
SdHcMem.h
DmaMem.c
[Packages]
MdePkg/MdePkg.dec
@@ -53,6 +54,8 @@
gEfiPeiVirtualBlockIoPpiGuid ## PRODUCES
gEfiPeiVirtualBlockIo2PpiGuid ## PRODUCES
gEdkiiPeiSdMmcHostControllerPpiGuid ## CONSUMES
gEdkiiIoMmuPpiGuid ## CONSUMES
gEfiEndOfPeiSignalPpiGuid ## CONSUMES
[Depex]
gEfiPeiMemoryDiscoveredPpiGuid AND gEdkiiPeiSdMmcHostControllerPpiGuid