From db731882fa90d1311a0828b2fbf13f766d8c21b6 Mon Sep 17 00:00:00 2001 From: eric_tian Date: Wed, 30 Sep 2009 03:00:36 +0000 Subject: For the data region which will be touched by Pci Bus Master, we should allocate memory by PciIo.AllocateBuffer() but not AllocatePool() base library API. So the memory region can be used to map into Pci controller-specific address thru PciIo.Map(). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9323 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c | 2 +- MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'MdeModulePkg/Bus') diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c index c57b0c8..1ed7902 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c +++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c @@ -1001,7 +1001,7 @@ Uhci2AsyncInterruptTransfer ( // // Allocate and map source data buffer for bus master access. // - DataPtr = AllocatePool (DataLength); + DataPtr = UsbHcAllocateMem (Uhc->MemPool, DataLength); if (DataPtr == NULL) { return EFI_OUT_OF_RESOURCES; diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c index f56fa2b..759f7a0 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c +++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c @@ -798,7 +798,7 @@ UhciFreeAsyncReq ( } if (AsyncReq->Data != NULL) { - gBS->FreePool (AsyncReq->Data); + UsbHcFreeMem (Uhc->MemPool, AsyncReq->Data, AsyncReq->DataLen); } gBS->FreePool (AsyncReq); -- cgit v1.1