/* Completes the Map() operation and releases any corresponding resources. */
EFI_STATUS EFIAPI PciIoUnmap(IN EFI_PCI_IO_PROTOCOL *This, IN VOID *Mapping)
/* Completes the Map() operation and releases any corresponding resources. */
EFI_STATUS EFIAPI PciIoUnmap(IN EFI_PCI_IO_PROTOCOL *This, IN VOID *Mapping)
{
  EFI_STATUS     Status;
  PCI_IO_DEVICE  *PciIoDevice;
  PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
  if (mIoMmuProtocol != NULL) {
    mIoMmuProtocol->SetAttribute (
                      mIoMmuProtocol,
                      PciIoDevice->Handle,
                      Mapping,
                      0
                      );
  }
  Status = PciIoDevice->PciRootBridgeIo->Unmap (
                                           PciIoDevice->PciRootBridgeIo,
                                           Mapping
                                           );
  if (EFI_ERROR (Status)) {
    REPORT_STATUS_CODE_WITH_DEVICE_PATH (
      EFI_ERROR_CODE | EFI_ERROR_MINOR,
      EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
      PciIoDevice->DevicePath
      );
  }
  return Status;
}