Jump to content

S-ATA & IOKitWait timeout...


Ztardust
 Share

58 posts in this topic

Recommended Posts

  • 2 weeks later...

thank you for this kext it really speeds up boot process but i have a problem with it.

i can't see my pata dvd-drives..

is there any solution?

my specs:

 

Asus M3A with SB600/AMD770 chipset

AMD Athlon 6000+ dual core

Asus nVidia 8800 GT 512

2gb 800mhz RAM

Samsung 400gb SATA

Philips 1640 DVD writer

Pioneer DVDROM

leo4all v4.1 AMD install

Voodoo Kernel 9.5

Link to comment
Share on other sites

Thanks for this, unfortunately it doesn't work for me.

I still get the IOKitWait timeout, and all my displays go black for after the verbose mode text/apple logo. It takes over 2 minutes before the desktop shows.

My setup is a

P5W DH Deluxe

Pentium DC 2140@2.4

Intel ICH7R (AHCI Mode)

JMicron JMB363 onboard (AHCI Mode)

JMicron JMB363 PCIe card (RAID Mode, can't be changed)

ASUS GeForce 7300LE (1 Display)

XFX GeForce 7950GT (2 Displays)

 

I installed using the Generic Boot-132 CD and now i'm using the "boot from EFI partition" method.

Link to comment
Share on other sites

  • 2 weeks later...

I have tested the 10.5.6 version of the ar4er modified IOATAFamily.kext (following the idea of coolyou of modifying the timeout setting) on my eSATA HDD OS X volume......it boots OK and removes the delay "IOKitWaitQuiet() timed out waiting to write kernel symbols".......HOWEVER in my case at least, when I put OS X to sleep and then wake OS X from sleep all the HDD volumes (i.e. both eSATA external and SATA internal HDD volume icons) appear on the Desktop......but I then get the "Device Removal" warning message appearing

 

QUOTEDevice Removal

The device you removed was not properly put away. Data might have been lost or destroyed. Before you unplug your device, you must first select its icon in the Finder and choose Eject from the File view.

 

and just afterwards the SATA internal HDD volume icons begin disappearing from the Desktop until all have disappeared........

 

The reason for this becomes apparent when the function of IOKitWaitQuiet is seen in IOATAController.cpp :

for( int i = 0; i < 3100; i++)
{

// read the status register - helps deal with devices which errantly
// set interrupt pending states during resets. Reset operations are not
// supposed to generate interrupts, but some devices do anyway.
// interrupt handlers should be prepared to deal with errant interrupts on ATA busses.
OSSynchronizeIO();
UInt8 status = *_tfStatusCmdReg;

// when drive is ready, break the loop
if( ( status & readyMask )== readyOn)
{
// device reset completed in time
resetFailed = false;
break;
}

IOSleep( 10 ); // sleep thread for another 10 ms

}


if( resetFailed )
{
// it is likely that this hardware is broken.
// There's no recovery action if the drive fails
// to reset.
DLOG("IOATA device failed to reset.\n");
result = kATATimeoutErr;
}

DLOG("IOATA reset complete.\n");

return result;

}


/*---------------------------------------------------------------------------
*
* Subclasses should take necessary action to create DMA channel programs,
* for the current memory descriptor in _currentCommand and activate the
* the DMA hardware
---------------------------------------------------------------------------*/
IOReturn
IOATAController::startDMA( void )
{


DLOG("IOATA Bus controllers that offer DMA must provide implementation/n");

return kATAModeNotSupported;
}




/*---------------------------------------------------------------------------
* Subclasses should take all actions necesary to safely shutdown DMA engines
* in any state of activity, whether finished, pending or stopped. Calling
* this function must be harmless reguardless of the state of the engine.
*
---------------------------------------------------------------------------*/
IOReturn
IOATAController::stopDMA( void )
{

DLOG("IOATA Bus controllers that offer DMA must provide implementation/n");

return kATAModeNotSupported;
}


/*---------------------------------------------------------------------------
// WaitForU8Status
// Will wait up to one millisecond for the value in the altStatus register & mask to equal the value
// passed in. Note that I always use the altStatus register so as not to have the side affect of clearing
// the interrupt if there is one.
---------------------------------------------------------------------------*/
bool
IOATAController::waitForU8Status (UInt8 mask, UInt8 value)
{
int i;

// we will read the status from the alt status register so as not
// to clear the interrupt accidentally

for (i=0; i < kStatusDelayLoopMS; i++)
{
OSSynchronizeIO();

if ((*_tfAltSDevCReg & mask) == value)
{
return true;
}

IODelay( kStatusDelayTime );
}
return false; // time's up
}

/*----------------------------------------------------------------------------------------------------
** Routine ATAPISlaveExists
**
** Purpose: Determines whether an ATAPI device seen as a "slave" of a master ATAPI device
** is actually present, or the product of the master shadowing a not-present slave's registers
** Call this function when the master device shows EBh 14h, and the slave also shows the ATAPI
** protocol signature.
** Returns: False if a device is ruled out. True if a device is verified. Leaves device in a ready state,
** But no longer showing signatures.

NOTE: Device 1 (slave) is assumed already selected.
*/


bool
IOATAController::ATAPISlaveExists( void )
{
UInt8 scratchByte;
UInt16 scratchWord;
UInt32 dataCounter;
UInt32 loopCounter;

// The only option is to issue a command and see what happens.
OSSynchronizeIO();
*_tfAltSDevCReg = 0x02; // disable interrupts

//issue INDENTIFY PACKET DEVICE
OSSynchronizeIO();
*_tfStatusCmdReg = 0xA1;

// reading and disreguarding a register provides the required 400ns delay time.
OSSynchronizeIO();
scratchByte = *_tfAltSDevCReg;

OSSynchronizeIO();
scratchByte = *_tfAltSDevCReg;

// if the device returns status 00h, we declare it not present. A real device would probably be
// status BSY (80h) now. An incredibly fast device might be ready to move data and show DRQ.
// However, by ATA standards, a not present device is required to return 00h.
// Lucky break, no device and we figured it out in a hurry.

if( (scratchByte == 0x00) )
{
// enable device interrupt
*_tfAltSDevCReg = 0x00;
OSSynchronizeIO();
return false;
}

// OK we probably have a device now. We have to wait for drive to send data, and read it and clear it.
// It is possible that the a misbehaving master has decided to respond to the command. So, we'll
// break on error bit and say it's not a real slave should that happen.

// take a leisurely approach, this will take a while.

// give the device up to 10 seconds to respond with data.
for( loopCounter = 0; loopCounter < 10000; loopCounter++)
{
OSSynchronizeIO();
scratchByte = *_tfAltSDevCReg;

// If drive sets error, clear status and return false. It's probably a misbehaving master
if( scratchByte & 0x01 )
break;

// this means the drive is really there. Clear the data and return true.
if( (scratchByte & 0x58) == 0x58) // RDY=1 DRQ=1
{
OSSynchronizeIO();
scratchByte = *_tfStatusCmdReg; // clear pending interrupt state

for( dataCounter = 0; dataCounter < 256; dataCounter++ )
{
OSSynchronizeIO();
scratchWord = *_tfDataReg;
}
// enable device interrupt
*_tfAltSDevCReg = 0x00;
OSSynchronizeIO();
return true;
}

// OK, sleep for 10 ms and try again.
IOSleep(10);
}

// In the ugly case, a drive set BSY, and didn't respond within 10 seconds with data.
// Otherwise, this is the for loop terminating on seeing the error bit.
// We'll read status and return false.

OSSynchronizeIO();
scratchByte = *_tfStatusCmdReg; // clear pending interrupt state

// enable device interrupt
*_tfAltSDevCReg = 0x00;
OSSynchronizeIO();

return false;

}



/*---------------------------------------------------------------------------
* scan the bus to see if devices are attached. The assumption is that the
* devices are in a cleanly-reset state, showing their protocol signatures,
* and the bus is properly wired with a pull down resistor on DD:7.
* If your bus controller does not meet these conditions, you should override
* and supply your own function which meets your specific hardware needs.
* Your controller may or may not require a reset, or it may require more
* thorough scanning, or additional configuration prior to looking for drives,
* or it may aquire information from firmware indicating the devices attached.
* This function should be self contained and not rely upon work loop or
* or anything other than the register pointers being setup and enabled for access
---------------------------------------------------------------------------*/

UInt32
IOATAController::scanForDrives( void )
{
UInt32 unitsFound = 0;
UInt8 status = 0x00;
// count total time spent searching max time allowed = 31 secs
// it RARELY takes this long.
UInt32 milsSpent = 0;

// wait for a not busy bus
// should be ready, but some devices may be slow to wake or spin up.
for( int loopMils = 0; milsSpent < 3100; loopMils++ )
{
OSSynchronizeIO();
status = *_tfStatusCmdReg;
if( (status & mATABusy) == 0x00 )
break;

IOSleep( 10 );
milsSpent++;
}

// spun on BSY for too long, declare bus empty
if( ! (milsSpent < 3100) )
goto AllDone;


// select each possible device on the bus, wait for BSY-
// then check for protocol signatures.

for( int unit = 0; unit < 2; unit++ )
{

// wait for a not busy bus
for( int loopMils = 0; milsSpent < 3100; loopMils++ )
{
// write the selection bit
OSSynchronizeIO();
*_tfSDHReg = ( unit << 4 );
IODelay( 10 );
// typically, devices respond quickly to selection
// but we'll give it a chance in case it is slow for some reason.
status = *_tfStatusCmdReg;
if( (status & mATABusy) == 0x00 )
{
break;
}

IOSleep( 10 );
milsSpent++;
}

// spun on BSY too long, probably bad device
if( ! (milsSpent < 3100) )
goto AllDone;

// check for ATAPI device signature first
if ( ( *_tfCylLoReg == 0x14) && ( *_tfCylHiReg == 0xEB) )
{
if( (unit == 1 )
&& ( _devInfo[0].type == kATAPIDeviceType ) )
{

// OK we've met the condition for an indeterminate bus, master is atapi and we see a slave atapi
// signature. This is legal ATA, though we are fortunate enough that most devices don't do this.

if( ATAPISlaveExists( ) != true )
{
_devInfo[unit].type = kUnknownATADeviceType;
goto AllDone;

}

}

_devInfo[unit].type = kATAPIDeviceType;
_devInfo[unit].packetSend = kATAPIDRQFast; // this is the safest default setting
unitsFound++;

} // check for ATA signature, including status RDY=1 and ERR=0
else if ( (*_tfCylLoReg == 0x00) && (*_tfCylHiReg == 0x00) &&
(*_tfSCountReg == 0x01) && (*_tfSectorNReg == 0x01) &&
( (*_tfAltSDevCReg & 0x51) == 0x50) )
{

_devInfo[unit].type = kATADeviceType;
_devInfo[unit].packetSend = kATAPIUnknown;
unitsFound++;

}else{

_devInfo[unit].type = kUnknownATADeviceType;
_devInfo[unit].packetSend = kATAPIUnknown;
}

}

 

where i < 3100 has been changed to i < 100, and all occurrences of milsSpent < 3100 have been changed to milsSpent < 100......perhaps less of a change, e.g. to <1000 may solve this issue......

Link to comment
Share on other sites

  • 2 weeks later...
thank you for this kext it really speeds up boot process but i have a problem with it.

i can't see my pata dvd-drives..

is there any solution?

my specs:

 

Asus M3A with SB600/AMD770 chipset

AMD Athlon 6000+ dual core

Asus nVidia 8800 GT 512

2gb 800mhz RAM

Samsung 400gb SATA

Philips 1640 DVD writer

Pioneer DVDROM

leo4all v4.1 AMD install

Voodoo Kernel 9.5

 

wierd problem. after i install it works great, my boot time is considerably lower, but i don't see my DVD drive anymore. my sys: Asus m2r32-mvp, chipset SB600, Asus DVD drive on IDE, hdd on SATA, running on Native Ide mode.

 

Excellent news! with the help of "ar4er" I fix the IOATAFamily. kext now compatible with the player / recorders

ATA, which first disappeared ... (eg "NForce 630i and "MCP73"); the kext was taken from the Kalyway 10.5.2. Is

been fixed error "IOKit timeout Wait" . My boot from 1 min down to 23 sec .

Let me know ... THE ATTACHED FILE IS NOT AVABLE AT THE MOMENT BUT YOU CAN DOWNLOAD IT AT THIS http://board.insanelymac.net/index.php?act...post&id=641

IOATAFamily.kext.zip

Link to comment
Share on other sites

Excellent news! with the help of "ar4er" I fix the IOATAFamily. kext now compatible with the player / recorders

ATA, which first disappeared ... (eg "NForce 630i and "MCP73"); the kext was taken from the Kalyway 10.5.2. Is

been fixed error "IOKit timeout Wait" . My boot from 1 min down to 23 sec .

Let me know ... THE ATTACHED FILE IS NOT AVABLE AT THE MOMENT BUT YOU CAN DOWNLOAD IT AT THIS http://board.insanelymac.net/index.php?act...post&id=641

 

now it's even worse:(

i have backed up my original kext to try out yours.. your kext didn't work and i restored my backed up kext now i can't see my ata drives again :)

thank you anyway

Link to comment
Share on other sites

now it's even worse:(

i have backed up my original kext to try out yours.. your kext didn't work and i restored my backed up kext now i can't see my ata drives again :rolleyes:

thank you anyway

Is there a fix for this yet? I get quick bootup times but still no DVD drive.

 

 

Joseph

Link to comment
Share on other sites

  • 2 months later...

I might have some good news for some of you (i hope so)

None of the above kexts worked for me either so that's what i did.

I got RiZzUs IOATA and i did some editing myshelf.So i came up wit a new

kext that worked just fine.,I hope it works for you too.

 

PATA and sleep working

Leo 10.5.4 booted in 20 sec

 

IOATAFamily.kext.zip

 

Some advise:

1)Always Backup :unsure:

2)If this won't work for you try this.remove the plugins folder

and use the one from your original IOATA so you can give it another chance

 

Good luck and let me know how it went

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 2 weeks later...
  • 1 month later...

Hey Guys,

yesterday I installed iPC 10.5.6. All works fine, the boot time is very fast. But i have still one problem, after the boot iPC don´t show my optical drives. I installed some kext allreday like this kext in the post before. Please help me.

My PC-Componets are:

Intel Quad 9300 2,5 GHZ

Intel DQ35JO

4 GB Ram

nvida 9600GT

 

Thanks,

Christian

Link to comment
Share on other sites

  • 3 months later...
  • 4 weeks later...
 Share

×
×
  • Create New...