Hey guys,
I have got recognition for Floppy and HardDisk using CMOS codes 10h and 12h, making life simple. This means on boot of my kernel I can detect the presence of the floppies and Harddisks.
Wondered if anyone knows if there is a little cheat like this for the CD rom drive(s) ?
At this stage I am starting work on implementing filesystems and as part of my boot I just want to detect which devices I have attached. My OS will only be interested (initially) in the presence of Floppy/HD and CD/DVD drives.
Any ideas or areas you could point me at.
Googling is a nightmare to find this information....
Regards
Craig
CD Rom recognition under CMOS
Re: CD Rom recognition under CMOS
I think you would use ide cdrom? Then you need ATA/ATAPI stuff -> google
dw 0xAA55
Re: CD Rom recognition under CMOS
Thanks for the info, I have already started googling with this information. I was hoping that some kind soul who has already encountered this or has already implemented device detection (particularly CD ROM) could offer some C demo code, saves having to re-invent what somebody had already done.
So far using ouport(0x71, 10h or 12h) followed by inport(0x71) has provided the simple CMOS support for Floppy (10h) and HDD (12h) making life sweet... was wondering if there was a port other than 0x71 which can be used for the IDE CDRom without having to implement ATA/ATAPI right now.
Cheers
Craig
So far using ouport(0x71, 10h or 12h) followed by inport(0x71) has provided the simple CMOS support for Floppy (10h) and HDD (12h) making life sweet... was wondering if there was a port other than 0x71 which can be used for the IDE CDRom without having to implement ATA/ATAPI right now.
Cheers
Craig
Re: CD Rom recognition under CMOS
CDROM's appear to be to new for CMOS..
http://www.bioscentral.com/misc/cmosmap.htm
For some example ATAPI code:
http://kos.enix.org/cgi/cvsweb/kos/modu ... web-markup
and:
http://kos.enix.org/cgi/cvsweb/kos/modu ... web-markup
http://www.bioscentral.com/misc/cmosmap.htm
For some example ATAPI code:
http://kos.enix.org/cgi/cvsweb/kos/modu ... web-markup
and:
http://kos.enix.org/cgi/cvsweb/kos/modu ... web-markup