/* One notified function to cleanup the allocated DMA buffers at the end of PEI. */
EFI_STATUS EFIAPI SdBlockIoPeimEndOfPei(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
/* One notified function to cleanup the allocated DMA buffers at the end of PEI. */
EFI_STATUS EFIAPI SdBlockIoPeimEndOfPei(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
{
  SD_PEIM_HC_PRIVATE_DATA  *Private;
  Private = GET_SD_PEIM_HC_PRIVATE_DATA_FROM_THIS_NOTIFY (NotifyDescriptor);
  if ((Private->Pool != NULL) && (Private->Pool->Head != NULL)) {
    SdPeimFreeMemPool (Private->Pool);
  }
  return EFI_SUCCESS;
}