MdeModulePkg/UfsBlockIoPei: Support IoMmu

V2 changes:
Resource cleanup logic update in UfsEndOfPei().

V1 history:
Update the UfsBlockIoPei 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-18 13:37:56 +08:00
parent 0aa1794118
commit 44a0857ec6
7 changed files with 535 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
## @file
# Description file for the Universal Flash Storage (UFS) Peim driver.
#
# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2014 - 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 @@
UfsHci.h
UfsHcMem.c
UfsHcMem.h
DmaMem.c
[Packages]
MdePkg/MdePkg.dec
@@ -53,6 +54,8 @@
gEfiPeiVirtualBlockIoPpiGuid ## PRODUCES
gEfiPeiVirtualBlockIo2PpiGuid ## PRODUCES
gEdkiiPeiUfsHostControllerPpiGuid ## CONSUMES
gEdkiiIoMmuPpiGuid ## CONSUMES
gEfiEndOfPeiSignalPpiGuid ## CONSUMES
[Depex]
gEfiPeiMemoryDiscoveredPpiGuid AND gEdkiiPeiUfsHostControllerPpiGuid