10#ifndef _EFI_XHCI_MEM_H_
11#define _EFI_XHCI_MEM_H_
13#define USB_HC_BIT(a) ((UINTN)(1 << (a)))
15#define USB_HC_BIT_IS_SET(Data, Bit) \
16 ((BOOLEAN)(((Data) & USB_HC_BIT(Bit)) == USB_HC_BIT(Bit)))
44#define USBHC_MEM_UNIT 64
46#define USBHC_MEM_UNIT_MASK (USBHC_MEM_UNIT - 1)
47#define USBHC_MEM_DEFAULT_PAGES 16
49#define USBHC_MEM_ROUND(Len) (((Len) + USBHC_MEM_UNIT_MASK) & (~USBHC_MEM_UNIT_MASK))
51#define USBHC_MEM_TRB_RINGS_BOUNDARY SIZE_64KB
56#define NEXT_BIT(Byte, Bit) \
108 IN BOOLEAN AllocationForRing
188 OUT VOID **HostAddress,
205 IN VOID *HostAddress,
EFI_STATUS UsbHcFreeMemPool(IN USBHC_MEM_POOL *Pool)
VOID UsbHcFreeMem(IN USBHC_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size)
VOID * UsbHcAllocateMem(IN USBHC_MEM_POOL *Pool, IN UINTN Size)
USBHC_MEM_POOL * UsbHcInitMemPool(IN EFI_PCI_IO_PROTOCOL *PciIo, IN BOOLEAN Check4G, IN UINT32 Which4G)
UINT64 EFI_PHYSICAL_ADDRESS
EFI_PHYSICAL_ADDRESS UsbHcGetPciAddrForHostAddr(IN USBHC_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size, IN BOOLEAN Alignment)
EFI_STATUS UsbHcAllocateAlignedPages(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINTN Pages, IN UINTN Alignment, OUT VOID **HostAddress, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
EFI_PHYSICAL_ADDRESS UsbHcGetHostAddrForPciAddr(IN USBHC_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size, IN BOOLEAN Alignment)
VOID UsbHcFreeAlignedPages(IN EFI_PCI_IO_PROTOCOL *PciIo, IN VOID *HostAddress, IN UINTN Pages, VOID *Mapping)