PCI and Dev.ser - ideas sought!

I’m moving an ISA hardware design to PCI. Part of the design contains a
UART. Up until now I’ve always had the UART at one of the “well known” i/o
addresses. This has allowed me to use Dev.ser as the driver and has thus
made programming this serial port easy.

I wil still have the UART in the PCI design, but of course its i/o base
address will be set for me by the BIOS. I can then use the various PCI_
function calls to determine this. However, can I still use Dev.ser and if
so, what would be the best method of discovering the UART’s base address and
then invoking Dev.ser?

Perhaps this is easy, but the data sheet for the PLX PCI interface chip has
destroyed several thousand brain cells this morning alone!

best wishes

Julian Thornhill
jth@ion.le.ac.uk

“Julian Thornhill” <jth@ion.le.ac.uk> wrote in message
news:asft1b$o2c$1@inn.qnx.com

I’m moving an ISA hardware design to PCI. Part of the design contains a
UART. Up until now I’ve always had the UART at one of the “well known” i/o
addresses. This has allowed me to use Dev.ser as the driver and has thus
made programming this serial port easy.

I wil still have the UART in the PCI design, but of course its i/o base
address will be set for me by the BIOS. I can then use the various PCI_
function calls to determine this. However, can I still use Dev.ser and if
so, what would be the best method of discovering the UART’s base address
and
then invoking Dev.ser?

Perhaps this is easy, but the data sheet for the PLX PCI interface chip
has
destroyed several thousand brain cells this morning alone!

best wishes

Julian Thornhill
jth@ion.le.ac.uk

You can explicitly define base addresses and IRQs for Dev.ser32 as “Dev.ser
[port [,irq]]” for example:

Dev.ser32 0x123,5 0x456,6 &

…will use IO port 0x123 and IRQ5 for a character device /dev/ser1, port
0x456 and IRQ6 for device /dev/ser2 and so on.

So you can write your own serial port trapper utility that will invoke a
Dev.ser32 with proper parameters. The best method of discovering UART
address depends on your design. If your custom UART interface is compatible
with PC UARTs then Dev.ser will discover them by itself. Afaiu it’s not
compatible.

// wbr

There are alot of vendors who supply PCI Serial port adapters. Simply pass
the io-port to the driver via the options:

http://www.qnx.com/developer/docs/qnx_4.25_docs/qnx4/utils/d/devser.html

Best regards,

Erick



Julian Thornhill <jth@ion.le.ac.uk> wrote:

I’m moving an ISA hardware design to PCI. Part of the design contains a
UART. Up until now I’ve always had the UART at one of the “well known” i/o
addresses. This has allowed me to use Dev.ser as the driver and has thus
made programming this serial port easy.

I wil still have the UART in the PCI design, but of course its i/o base
address will be set for me by the BIOS. I can then use the various PCI_
function calls to determine this. However, can I still use Dev.ser and if
so, what would be the best method of discovering the UART’s base address and
then invoking Dev.ser?

Perhaps this is easy, but the data sheet for the PLX PCI interface chip has
destroyed several thousand brain cells this morning alone!

best wishes

Julian Thornhill
jth@ion.le.ac.uk

Ian Zagorskih <ianzag@megasignal.com> wrote:

“Julian Thornhill” <> jth@ion.le.ac.uk> > wrote in message
news:asft1b$o2c$> 1@inn.qnx.com> …
I’m moving an ISA hardware design to PCI. Part of the design contains a
UART. Up until now I’ve always had the UART at one of the “well known” i/o
addresses. This has allowed me to use Dev.ser as the driver and has thus
made programming this serial port easy.

I wil still have the UART in the PCI design, but of course its i/o base
address will be set for me by the BIOS. I can then use the various PCI_
function calls to determine this. However, can I still use Dev.ser and if
so, what would be the best method of discovering the UART’s base address
and
then invoking Dev.ser?

Perhaps this is easy, but the data sheet for the PLX PCI interface chip
has
destroyed several thousand brain cells this morning alone!

best wishes

Julian Thornhill
jth@ion.le.ac.uk


You can explicitly define base addresses and IRQs for Dev.ser32 as “Dev.ser
[port [,irq]]” for example:

Dev.ser32 0x123,5 0x456,6 &

…will use IO port 0x123 and IRQ5 for a character device /dev/ser1, port
0x456 and IRQ6 for device /dev/ser2 and so on.

So you can write your own serial port trapper utility that will invoke a
Dev.ser32 with proper parameters. The best method of discovering UART
address depends on your design. If your custom UART interface is compatible
with PC UARTs then Dev.ser will discover them by itself. Afaiu it’s not
compatible.

// wbr

You can also do something like show_pci and either do your own as a trapper or
grep through the results for the class specific line for your card.

E.