Hard Drive Driver
Hard Drive Driver
Hi. I just finished my LBA/PIO driven Hard Drive Driver part II (was DMA) and lo and behold the dang thing still errors on real hardware. It works brilliantly in VPC, even returns the bootsig (0x55 0xAA), but on real hardware it blows with error 51. So, I have been thinking and I think that the reason is due to my setup; I set my hdd up in the SATA fashion, not IDE. So my question is, do I need to do something special with my driver considering what I have just told you? thanks
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
Come on man, give us the right information! is your HDD SATA or IDE?!I set my hdd up in the SATA fashion, not IDE
Re: Hard Drive Driver
What are you talking about? I just told you it is SATA. lol
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
I see SATA mentioned once and once only.Hi. I just finished my LBA/PIO driven Hard Drive Driver part II (was DMA) and lo and behold the dang thing still errors on real hardware. It works brilliantly in VPC, even returns the bootsig (0x55 0xAA), but on real hardware it blows with error 51. So, I have been thinking and I think that the reason is due to my setup; I set my hdd up in the SATA fashion, not IDE. So my question is, do I need to do something special with my driver considering what I have just told you? thanks
That means your set your hard disk up in the SATA fashion - i.e. you sent commands to it assuming it's SATA, not IDE.I set my hdd up in the SATA fashion, not IDE.
Assuming that you meant what you didn't say, and that your HDD is indeed SATA, then you of course cannot communicate with it via the IDE controller. Your SATA controller will not only have a different command set but is not resident on the ISA bus, so you'll have to probe the PCI bus to obtain access to it.
Re: Hard Drive Driver
Got it. Much obliged sir.
EDIT: Oh, I see your confusion, you thought I meant HDD as in HARD DRIVE DRIVER when I meant HARD DISK DRIVE. My fault.
EDIT: Oh, I see your confusion, you thought I meant HDD as in HARD DRIVE DRIVER when I meant HARD DISK DRIVE. My fault.
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
One last question about this: Is there a standard way to ask the machine if the hard disk is SATA or IDE? I guess I could try to read the MBR and if it returns zero then it wouldn't be IDE I suppose, but I assume there is possibly a more standard way than that. Thanks.
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
Yes - you won't be able to get a SATA drive to IDENTIFY. If you're using standard PIO you have access to four possible (IDE) disks - primary master, primary slave, secondary master, secondary slave. Those four are accessed by two ranges of ports corresponding to the two IDE controllers - primary and secondary.Omega wrote:One last question about this: Is there a standard way to ask the machine if the hard disk is SATA or IDE? I guess I could try to read the MBR and if it returns zero then it wouldn't be IDE I suppose, but I assume there is possibly a more standard way than that. Thanks.
You should be sending the ATA IDENTIFY command to each of these disks and seeing if they respond. Only IDE disks will be able to be enumerated like this. Your SATA disk is on a different bus under a different controller and won't respond.
Re: Hard Drive Driver
OK, I'll start doing some research, thank you.
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
Hi JamesM. I have searched around and found the pci example geezer has on his site (which is back up temporarily right now) and I started playing with it and I successfully incorporated it into my kernel. I started testing it in my kernel and it works, but I am not sure what to do next. You said that I needed to probe the PCI controller to gain access to the SATA controller and in his example he does enumerate the available controllers. How from this can one gain access to the SATA controller? Thanks.
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
You should read PCI. Once you have found the PCI config space entry for the SATA controller you will need to set up its BARs (if the BIOS hasn't done it for you), then read the SATA specification as to what to do next!
Re: Hard Drive Driver
JamesM: This may be considered pirating or whatever but do you happen to have a copy of the SATA specs as they aren't free and I couldn't find them posted anywhere. Thanks
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
I'm afraid I don't. I haven't implemented SATA as yet (my main test PC has both an IDE and a SATA drive, so I just use the IDE one).
I personally would never call distributing pay-per-view specifications piracy. (Obviously software is different).
I personally would never call distributing pay-per-view specifications piracy. (Obviously software is different).
Re: Hard Drive Driver
Just a suggestion. Maybe we could all (those interested) could pitch in to buy it and post it in the WIKI. I'd toss in a few bucks to help out. Otherwise, I'll keep looking, I bet it is lurking on the internet somewhere. If I find it I'll post a link. Thanks.
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
Found it: http://stuff.mit.edu/afs/sipb/user/fustflum/etcetera/
Look for:
serialata10a.ZIP
and
serialata10a.pdf
It is the old one spec 1.0. I haven't even looked at it yet but it was published in 2001 and II was published in 2002, so I hope it still has relevance.
Look for:
serialata10a.ZIP
and
serialata10a.pdf
It is the old one spec 1.0. I haven't even looked at it yet but it was published in 2001 and II was published in 2002, so I hope it still has relevance.
Free energy is indeed evil for it absorbs the light.
Re: Hard Drive Driver
If you had read SATA, then you would know that even now there is not a relevant standard for SATA. There are three conflicting standards -- and you would have learned that info in less than one minute.
(And you can't post copyrighted material to the wiki.)