How to know address of an ISA card by programming?

Hi All! :slight_smile:
To be more comfortable, I wish my driver can detect and know address of an ISA card automaticlly. So how can I do by programming?

Thank you! :slight_smile:

This will require that you probe for the card. This can hang the computer, and there isn’t much you can do about it (remember when Windows 95, used to say “checking for new hardware - this may hang your computer”? That’s what it was talking about, and is one of the reasons PCI was created…

Thank your information! :slight_smile:
But how can I probe?

mmap_device_io() and in8(). The rest depends on the hardware you are trying to detect.

But I think you will feel more comfortable NOT probing because if you happen to probe on existing hardware (not the one you are looking for ) all hell could break loose.

Yes, for instance, in order to auto-detect the IRQ you need to do whatever magic it is for the hardware you are searching for to generate the IRQ. If this same magic happens to also trigger some other piece of hardware, then the code that clears the interrupt for your intended device probably won’t clear the interrupt for the actual device, and then you have an unserviced interrupt…

That said, depending on how much control you have of the environment, it might not be too bad. It was much worse in the days when there were lots of ISA devices, now your board might be the only device.

Some more advanced ISA hardware had readable registers that would not only tell you if you found the hardware, but advise you as to what interrupt and/or dma it was using. An example would be the AHA1520 SCSI controller. Ironically, you set jumpers on the card that would be read, but you also had to set separate jumpers to actually set the IRQ and DMA, so if you did not set the card up correctly, your probe would give you wrong information.

That was PnP ISA. Didn’t last long (fortunately)

Actually no. PnP was standardized. This was pre-PnP. My example was just something that Adaptec did, and without their specs, you would not know this. I’m sure that this was done ad hoc by other cards.

Although your point about PnP is a good one. PnP cards can be located, and their equipment (IRQ’s, DMA, Memory-Map) can be located. There is source for a utility that helps with this.

Thank you! :slight_smile:

Do you mean isapnp ? … isapnp.tgz

I tried to build this project but not success. :frowning:


That’s too bad. As porting projects go, this should not be very challenging. Did you just see if it would compile out of the box?

Oh! Yes! :stuck_out_tongue: . So isapnp for QNX still is in Porting process ?

This project has some strange. This is the first time which I see a file with .y extension in a C project :confused:

No, you misunderstand me. I meant that it should not be a very difficult porting problem for you. The original isaPnP code came from Linux. It’s been ported to QNX 2, and QNX 4. It probably hasn’t been ported to QNX 6 because not many people using QNX 6 use legacy ISA cards. In any case, the port involves changing the names of I/O instructions to ones that work, figuring out how to give a program privileges to do I/O, adjusting the makefile so that the correct libraries are used, and possibly a few minor compiler problems. That should be easy. If you don’t find it easy, maybe you should hire someone to do it for you.