/* The FreeBuffer() function frees memory that was allocated with AllocateBuffer(). */
EFI_STATUS EFIAPI RootBridgeIoFreeBuffer(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN UINTN Pages, OUT VOID *HostAddress)
/* The FreeBuffer() function frees memory that was allocated with AllocateBuffer(). */
EFI_STATUS EFIAPI RootBridgeIoFreeBuffer(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN UINTN Pages, OUT VOID *HostAddress)
{
  EFI_STATUS  Status;
  if (mIoMmu != NULL) {
    Status = mIoMmu->FreeBuffer (
                       mIoMmu,
                       Pages,
                       HostAddress
                       );
    return Status;
  }
  return gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)HostAddress, Pages);
}