Lines Matching refs:IdeBlkIoDevicePtr
305 IDE_BLK_IO_DEV *IdeBlkIoDevicePtr;
600 IdeBlkIoDevicePtr = IdeBlkIoDevice[IdeChannel][IdeDevice];
602 ZeroMem (IdeBlkIoDevicePtr, sizeof (IDE_BLK_IO_DEV));
604 IdeBlkIoDevicePtr->Signature = IDE_BLK_IO_DEV_SIGNATURE;
605 IdeBlkIoDevicePtr->Channel = (EFI_IDE_CHANNEL) IdeChannel;
606 IdeBlkIoDevicePtr->Device = (EFI_IDE_DEVICE) IdeDevice;
611 IdeBlkIoDevicePtr->BlkIo.Media = &IdeBlkIoDevicePtr->BlkMedia;
617 IdeBlkIoDevicePtr->IoPort = AllocatePool (sizeof (IDE_BASE_REGISTERS));
618 if (IdeBlkIoDevicePtr->IoPort == NULL) {
622 ZeroMem (IdeBlkIoDevicePtr->IoPort, sizeof (IDE_BASE_REGISTERS));
626 IdeBlkIoDevicePtr->IoPort->Data = CommandBlockBaseAddr;
627 (*(UINT16 *) &IdeBlkIoDevicePtr->IoPort->Reg1) = (UINT16) (CommandBlockBaseAddr + 0x01);
628 IdeBlkIoDevicePtr->IoPort->SectorCount = (UINT16) (CommandBlockBaseAddr + 0x02);
629 IdeBlkIoDevicePtr->IoPort->SectorNumber = (UINT16) (CommandBlockBaseAddr + 0x03);
630 IdeBlkIoDevicePtr->IoPort->CylinderLsb = (UINT16) (CommandBlockBaseAddr + 0x04);
631 IdeBlkIoDevicePtr->IoPort->CylinderMsb = (UINT16) (CommandBlockBaseAddr + 0x05);
632 IdeBlkIoDevicePtr->IoPort->Head = (UINT16) (CommandBlockBaseAddr + 0x06);
633 (*(UINT16 *) &IdeBlkIoDevicePtr->IoPort->Reg) = (UINT16) (CommandBlockBaseAddr + 0x07);
635 (*(UINT16 *) &IdeBlkIoDevicePtr->IoPort->Alt) = ControlBlockBaseAddr;
636 IdeBlkIoDevicePtr->IoPort->DriveAddress = (UINT16) (ControlBlockBaseAddr + 0x01);
638 IdeBlkIoDevicePtr->IoPort->MasterSlave = (UINT16) ((IdeDevice == IdeMaster) ? 1 : 0);
640 IdeBlkIoDevicePtr->PciIo = PciIo;
641 IdeBlkIoDevicePtr->IdeBusDriverPrivateData = IdeBusDriverPrivateData;
642 IdeBlkIoDevicePtr->IoPort->BusMasterBaseAddr = IdeRegsBaseAddr[IdeChannel].BusMasterBaseAddr;
661 Status = DiscoverIdeDevice (IdeBlkIoDevicePtr);
676 NewNode.Atapi.PrimarySecondary = (UINT8) IdeBlkIoDevicePtr->Channel;
677 NewNode.Atapi.SlaveMaster = (UINT8) IdeBlkIoDevicePtr->Device;
678 NewNode.Atapi.Lun = IdeBlkIoDevicePtr->Lun;
679 IdeBlkIoDevicePtr->DevicePath = AppendDevicePathNode (
683 if (IdeBlkIoDevicePtr->DevicePath == NULL) {
684 ReleaseIdeResources (IdeBlkIoDevicePtr);
691 CopyMem (&IdentifyData, IdeBlkIoDevicePtr->IdData, sizeof (IdentifyData));
700 ReleaseIdeResources (IdeBlkIoDevicePtr);
701 IdeBlkIoDevicePtr = NULL;
743 IdeBlkIoDevicePtr = IdeBlkIoDevice[IdeChannel][IdeDevice];
757 Status = SetDeviceTransferMode (IdeBlkIoDevicePtr, &TransferMode);
761 ReleaseIdeResources (IdeBlkIoDevicePtr);
762 IdeBlkIoDevicePtr = NULL;
777 Status = SetDeviceTransferMode (IdeBlkIoDevicePtr, &TransferMode);
781 ReleaseIdeResources (IdeBlkIoDevicePtr);
782 IdeBlkIoDevicePtr = NULL;
788 IdeBlkIoDevicePtr->UdmaMode.Valid = TRUE;
789 IdeBlkIoDevicePtr->UdmaMode.Mode = SupportedModes->UdmaMode.Mode;
790 EnableInterrupt (IdeBlkIoDevicePtr);
795 Status = SetDeviceTransferMode (IdeBlkIoDevicePtr, &TransferMode);
799 ReleaseIdeResources (IdeBlkIoDevicePtr);
800 IdeBlkIoDevicePtr = NULL;
804 EnableInterrupt (IdeBlkIoDevicePtr);
809 DriveParameters.Sector = (UINT8) ((ATA5_IDENTIFY_DATA *) IdeBlkIoDevicePtr->IdData)->sectors_per_track;
810 DriveParameters.Heads = (UINT8) (((ATA5_IDENTIFY_DATA *) IdeBlkIoDevicePtr->IdData)->heads - 1);
811 DriveParameters.MultipleSector = (UINT8) IdeBlkIoDevicePtr->IdData->AtaData.multi_sector_cmd_max_sct_cnt;
817 if ((IdeBlkIoDevicePtr->Type == IdeHardDisk) || (IdeBlkIoDevicePtr->Type == Ide48bitAddressingHardDisk)) {
818 Status = SetDriveParameters (IdeBlkIoDevicePtr, &DriveParameters);
824 IdeBlkIoDevicePtr->PioMode = (ATA_PIO_MODE) SupportedModes->PioMode.Mode;
834 IdeBlkIoDevicePtr->ControllerNameTable = NULL;
835 ADD_IDE_ATAPI_NAME (IdeBlkIoDevicePtr);
838 &IdeBlkIoDevicePtr->Handle,
840 IdeBlkIoDevicePtr->DevicePath,
842 &IdeBlkIoDevicePtr->BlkIo,
844 &IdeBlkIoDevicePtr->DiskInfo,
849 ReleaseIdeResources (IdeBlkIoDevicePtr);
857 IdeBlkIoDevicePtr->Handle,
869 IdeBlkIoDevicePtr->DevicePath
879 IdeBlkIoDevicePtr,
881 &IdeBlkIoDevicePtr->ExitBootServiceEvent