/* Initialize the memory management pool for the host controller. */
USBHC_MEM_POOL* UsbHcInitMemPool(IN PEI_USB2_HC_DEV *Ehc, IN BOOLEAN Check4G, IN UINT32 Which4G)
/* Initialize the memory management pool for the host controller. */
USBHC_MEM_POOL* UsbHcInitMemPool(IN PEI_USB2_HC_DEV *Ehc, IN BOOLEAN Check4G, IN UINT32 Which4G)
{
  USBHC_MEM_POOL        *Pool;
  UINTN                 PageNumber;
  EFI_STATUS            Status;
  EFI_PHYSICAL_ADDRESS  TempPtr;
  PageNumber =  sizeof (USBHC_MEM_POOL)/PAGESIZE +1;
  Status     = PeiServicesAllocatePages (
                 EfiBootServicesCode,
                 PageNumber,
                 &TempPtr
                 );
  if (EFI_ERROR (Status)) {
    return NULL;
  }
  ZeroMem ((VOID   *)(UINTN)TempPtr, PageNumber*EFI_PAGE_SIZE);
  Pool = (USBHC_MEM_POOL *)((UINTN)TempPtr);
  Pool->Check4G = Check4G;
  Pool->Which4G = Which4G;
  Pool->Head    = UsbHcAllocMemBlock (Ehc, Pool, USBHC_MEM_DEFAULT_PAGES);
  if (Pool->Head == NULL) {
    Pool = NULL;
  }
  return Pool;
}