]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c
MdeModulePkg/SdMmcPciHcDxe: call SdMmcFreeTrb() to complete sync operation
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 4 Nov 2017 21:32:37 +0000 (21:32 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 6 Nov 2017 10:33:02 +0000 (10:33 +0000)
commit6743455e34d1b313d644d9f7ca726b9932effb1f
treefad6a7c4c0a944c5ed80717af224184f198d20d9
parent6fe575d052e36b243657a5885b5457decac41f03
MdeModulePkg/SdMmcPciHcDxe: call SdMmcFreeTrb() to complete sync operation

Currently, we complete a synchronous operation without unmapping the
DMA mappings, and free the pages using FreePages () rather than calling
EFI_PCI_IO_PROTOCOL::FreeBuffer. This is simply incorrect, but it also
breaks non-coherent DMA as well as DMA protection and/or memory encryption
so let's do it correctly and call SdMmcFreeTrb() instead.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c