/* This function allocates an aligned buffer for the ATA device to perform ATA pass through operations. The alignment requirement is from ATA pass through interface. */
VOID* AllocateAlignedBuffer(IN ATA_DEVICE *AtaDevice, IN UINTN BufferSize)
/* This function allocates an aligned buffer for the ATA device to perform ATA pass through operations. The alignment requirement is from ATA pass through interface. */
VOID* AllocateAlignedBuffer(IN ATA_DEVICE *AtaDevice, IN UINTN BufferSize)
{
  return AllocateAlignedPages (EFI_SIZE_TO_PAGES (BufferSize), AtaDevice->AtaBusDriverData->AtaPassThru->Mode->IoAlign);
}