MdeModulePkg/Xhci: Skip size round up for TRB during address translation
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4560 TRB Template is 16 bytes. When boundary checking is 64 bytes for xHCI device/host memory address, it may exceed xHCI host memory pool and cause unwanted DXE_ASSERT. Introduce a new input parameter to indicate whether to enforce 64byte size alignment and round up. For TRB case, should set it to FALSE to skip the size round up. Signed-off-by: Gao Cheng <gao.cheng@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
@@ -129,6 +129,7 @@ UsbHcFreeMem (
|
||||
@param Pool The memory pool of the host controller.
|
||||
@param Mem The pointer to host memory.
|
||||
@param Size The size of the memory region.
|
||||
@param Alignment Alignment the size to USBHC_MEM_UNIT bytes.
|
||||
|
||||
@return The pci memory address
|
||||
|
||||
@@ -137,7 +138,8 @@ EFI_PHYSICAL_ADDRESS
|
||||
UsbHcGetPciAddrForHostAddr (
|
||||
IN USBHC_MEM_POOL *Pool,
|
||||
IN VOID *Mem,
|
||||
IN UINTN Size
|
||||
IN UINTN Size,
|
||||
IN BOOLEAN Alignment
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -146,6 +148,7 @@ UsbHcGetPciAddrForHostAddr (
|
||||
@param Pool The memory pool of the host controller.
|
||||
@param Mem The pointer to pci memory.
|
||||
@param Size The size of the memory region.
|
||||
@param Alignment Alignment the size to USBHC_MEM_UNIT bytes.
|
||||
|
||||
@return The host memory address
|
||||
|
||||
@@ -154,7 +157,8 @@ EFI_PHYSICAL_ADDRESS
|
||||
UsbHcGetHostAddrForPciAddr (
|
||||
IN USBHC_MEM_POOL *Pool,
|
||||
IN VOID *Mem,
|
||||
IN UINTN Size
|
||||
IN UINTN Size,
|
||||
IN BOOLEAN Alignment
|
||||
);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user