| Author |
Message |
|
|
Post subject: How to know address of an ISA card by programming?
Posted: Mar 25, 2008 - 05:04 AM
|
|
Active Member
Joined: Feb 20, 2008
Posts: 12
|
|
Hi All!
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!  |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: How to know address of an ISA card by programming?
Posted: Mar 25, 2008 - 11:09 PM
|
|
QNX Master
Joined: Jul 11, 2002
Posts: 557
|
|
|
thuongshoo wrote:
Hi All!
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!
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... |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: How to know address of an ISA card by programming?
Posted: Mar 26, 2008 - 03:43 AM
|
|
Active Member
Joined: Feb 20, 2008
Posts: 12
|
|
Thank your information!
But how can I probe? |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: How to know address of an ISA card by programming?
Posted: Mar 26, 2008 - 02:16 PM
|
|
QNX Master
Joined: Sep 01, 2002
Posts: 2667
|
|
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. |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: RE: Re: How to know address of an ISA card by programmin
Posted: Mar 26, 2008 - 04:55 PM
|
|
QNX Master
Joined: Jul 11, 2002
Posts: 557
|
|
|
mario wrote:
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. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: RE: Re: How to know address of an ISA card by progra
Posted: Mar 26, 2008 - 05:21 PM
|
|
QNX Master
Joined: Jun 25, 2003
Posts: 974
|
|
| 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. |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: RE: Re: RE: Re: How to know address of an ISA card by pr
Posted: Mar 26, 2008 - 05:54 PM
|
|
QNX Master
Joined: Jul 11, 2002
Posts: 557
|
|
|
maschoen wrote:
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) |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: RE: Re: RE: Re: How to know address of an ISA card b
Posted: Mar 26, 2008 - 06:05 PM
|
|
QNX Master
Joined: Jun 25, 2003
Posts: 974
|
|
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. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: RE: Re: RE: Re: How to know address of an ISA card b
Posted: Mar 28, 2008 - 05:01 AM
|
|
Active Member
Joined: Feb 20, 2008
Posts: 12
|
|
|
|
|
 |
|
|
Post subject: Re: RE: Re: RE: Re: RE: Re: How to know address of an ISA ca
Posted: Mar 28, 2008 - 05:48 AM
|
|
QNX Master
Joined: Jun 25, 2003
Posts: 974
|
|
|
thuongshoo wrote:
Thank you!
Quote:
There is source for a utility that helps with this.
Do you mean isapnp ?
Yes
Quote:
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? |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: RE: Re: RE: Re: RE: Re: How to know address of an IS
Posted: Mar 28, 2008 - 08:57 AM
|
|
Active Member
Joined: Feb 20, 2008
Posts: 12
|
|
|
Quote:
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! . 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  |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: RE: Re: RE: Re: RE: Re: RE: Re: How to know address of a
Posted: Mar 28, 2008 - 04:33 PM
|
|
QNX Master
Joined: Jun 25, 2003
Posts: 974
|
|
|
Quote:
Oh! Yes!  . So isapnp for QNX still is in Porting process ?
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. |
|
|
| |
|
|
|
 |
|
|