Has anyone finished this phase you know, completely determining the harware present in the system and loading appropriate drivers?
Have anyone scanned all the buses (PCI, ISA, ACPI, USB...) and at least displayed the devices present? Please i am thinking of starting out on this and would like any advice. TIA
Hardware Detection
Re:Hardware Detection
Hi,
For ISA/legacy devices, each device driver can probe for it's hardware and terminate if it can't find it. Probing may involve checking various IO port contents, comparing ROM data, setting and checking loopback modes, getting the device to generate an IRQ and determining which IRQ it was, etc.
Scanning the PCI buses doesn't look too hard (enough information available), but there's problems with 3D video card manufacturers, where it's very difficult to get any direct hardware programming information. I've tried getting information from Matrox and NVidia, both of whom ignored me. I hope that they will provide information if they can see a fully functional OS capable of using competing manufacturers 3D accelerated graphics card, although I think NVidia supply binary drivers for linux so they can avoid providing programming information. Completely boycotting these companies products is a very good alternative IMHO.
Cheers,
Brendan
I don't think it's possible to actually finish this - there's too many manufacturers creating devices all the time. My advice would be to create default/legacy drivers for as much as you can (VGA & VESA 3 video, IDE/ATA, PS/2 mouse & keyboard, floppy), and then start working on device drivers for things you have - not much point trying to write a device driver for something if you can't test it.Neo wrote: Has anyone finished this phase you know, completely determining the harware present in the system and loading appropriate drivers?
I haven't tried scanning the PCI buses yet. There is no way to scan for ISA devices (except for possibly "Plug & Play", which IMHO was a big flop and not supported by sensible ISA cards). I do scan the ACPI tables during boot, but to go further down this road requires an AML (ACPI Machine Language - an OOP language) interpretter to be written, which IMHO is a buggy mess that requires knowing how each version of Windows interprets AML (and even Microsoft have trouble getting it stable). I haven't tried USB either...Neo wrote: Have anyone scanned all the buses (PCI, ISA, ACPI, USB...) and at least displayed the devices present? Please i am thinking of starting out on this and would like any advice. TIA
For ISA/legacy devices, each device driver can probe for it's hardware and terminate if it can't find it. Probing may involve checking various IO port contents, comparing ROM data, setting and checking loopback modes, getting the device to generate an IRQ and determining which IRQ it was, etc.
Scanning the PCI buses doesn't look too hard (enough information available), but there's problems with 3D video card manufacturers, where it's very difficult to get any direct hardware programming information. I've tried getting information from Matrox and NVidia, both of whom ignored me. I hope that they will provide information if they can see a fully functional OS capable of using competing manufacturers 3D accelerated graphics card, although I think NVidia supply binary drivers for linux so they can avoid providing programming information. Completely boycotting these companies products is a very good alternative IMHO.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:Hardware Detection
Plug and play is actually built into PCI, pci's hardware detection is plug and play (people accociate PNP with microsoft, when it's actually an Intel PCI technology). The ISA PNP extension was used quite a lot on late ISA sound cards. For example the SB16 PNP.
Anyway, as far as drivers, I think the base archetecture (ISA etc) in Windows NT is handled by the HAL, device driver actually have to go through the HAL to access their hardware.
In my os, for each machine archetechture I have a base driver, for example the base driver for AT based machines handles the PIC, PIT, keyboard etc, stuff that all AT based machines have. It also detects the existance of Busses like PCI, AGP etc. It also has floppy, IDE etc read only drive and filesystem drives and a text only VGA driver. For more functionality, seperate deveice drivers will be needed. The advantage of this approach is that for a "safe mode" there is most of what's needed straight off. Also, same for a small floppy based version of my os.
srg
Anyway, as far as drivers, I think the base archetecture (ISA etc) in Windows NT is handled by the HAL, device driver actually have to go through the HAL to access their hardware.
In my os, for each machine archetechture I have a base driver, for example the base driver for AT based machines handles the PIC, PIT, keyboard etc, stuff that all AT based machines have. It also detects the existance of Busses like PCI, AGP etc. It also has floppy, IDE etc read only drive and filesystem drives and a text only VGA driver. For more functionality, seperate deveice drivers will be needed. The advantage of this approach is that for a "safe mode" there is most of what's needed straight off. Also, same for a small floppy based version of my os.
srg