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>
(cherry picked from commit 77af86688c)
			
			
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| /** @file | ||||
|  | ||||
| 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 | ||||
| @@ -27,7 +27,9 @@ struct _SD_PEIM_MEM_BLOCK { | ||||
|   UINT8                   *Bits;    // Bit array to record which unit is allocated | ||||
|   UINTN                   BitsLen; | ||||
|   UINT8                   *Buf; | ||||
|   UINT8                   *BufHost; | ||||
|   UINTN                   BufLen;   // Memory size in bytes | ||||
|   VOID                    *Mapping; | ||||
|   SD_PEIM_MEM_BLOCK       *Next; | ||||
| }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user