/* Allocates pages that are suitable for an EfiUfsHcOperationBusMasterCommonBuffer mapping. */
EFI_STATUS EFIAPI UfsHcAllocateBuffer(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT VOID **HostAddress, IN UINT64 Attributes)
/* Allocates pages that are suitable for an EfiUfsHcOperationBusMasterCommonBuffer mapping. */
EFI_STATUS EFIAPI UfsHcAllocateBuffer(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT VOID **HostAddress, IN UINT64 Attributes)
{
  UFS_HOST_CONTROLLER_PRIVATE_DATA  *Private;
  EFI_PCI_IO_PROTOCOL               *PciIo;
  EFI_STATUS                        Status;
  if ((This == NULL) || (HostAddress == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  Private = UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This);
  PciIo   = Private->PciIo;
  Status = PciIo->AllocateBuffer (PciIo, Type, MemoryType, Pages, HostAddress, Attributes);
  return Status;
}