/* Initialize the memory management pool for the host controller. */
EFI_STATUS SdPeimInitMemPool(IN SD_PEIM_HC_PRIVATE_DATA *Private)
/* Initialize the memory management pool for the host controller. */
EFI_STATUS SdPeimInitMemPool(IN SD_PEIM_HC_PRIVATE_DATA *Private)
{
  SD_PEIM_MEM_POOL  *Pool;
  EFI_STATUS        Status;
  VOID              *TempPtr;
  TempPtr = NULL;
  Pool    = NULL;
  Status = PeiServicesAllocatePool (sizeof (SD_PEIM_MEM_POOL), &TempPtr);
  if (EFI_ERROR (Status)) {
    return EFI_OUT_OF_RESOURCES;
  }
  ZeroMem ((VOID *)(UINTN)TempPtr, sizeof (SD_PEIM_MEM_POOL));
  Pool = (SD_PEIM_MEM_POOL *)((UINTN)TempPtr);
  Pool->Head = SdPeimAllocMemBlock (SD_PEIM_MEM_DEFAULT_PAGES);
  if (Pool->Head == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }
  Private->Pool = Pool;
  return EFI_SUCCESS;
}