10#ifndef _EFI_PEI_XHCI_MEM_H_
11#define _EFI_PEI_XHCI_MEM_H_
15#define USBHC_MEM_DEFAULT_PAGES 16
32#define USBHC_MEM_UNIT 64
34#define USBHC_MEM_UNIT_MASK (USBHC_MEM_UNIT - 1)
35#define USBHC_MEM_ROUND(Len) (((Len) + USBHC_MEM_UNIT_MASK) & (~USBHC_MEM_UNIT_MASK))
37#define USB_HC_BIT(a) ((UINTN)(1 << (a)))
39#define USB_HC_BIT_IS_SET(Data, Bit) \
40 ((BOOLEAN)(((Data) & USB_HC_BIT(Bit)) == USB_HC_BIT(Bit)))
45#define NEXT_BIT(Byte, Bit) \
124 OUT VOID **HostAddress,
139 IN VOID *HostAddress,
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)