QNX4.25 show_pci problems

hello,
When I execute /bin/show_pci it gives me the pci version and list of pci
devices.
I downloaded the pci driver sample programs from
/usr/free/qnx4/os/utlis/misc/pci_utils.tgz. The executables (show_pci,
pci_write) work fine. However when i recompile them using watcom 10.6 and
execute them it gives me errors like “No BIOS32 found”, “PCI BIOS not
found”…

my makefile is :

INCLUDE_FILES = pci.h

OBJECTS = show_pci.c

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

$(OBJECTS):$(INCLUDE_FILES)

can anyone please help me out on this??

thanks
Anup

“Anup Katake” <anup@tamu.edu> wrote in message
news:apn5vu$687$1@news.tamu.edu

hello,
When I execute /bin/show_pci it gives me the pci version and list of pci
devices.
I downloaded the pci driver sample programs from
/usr/free/qnx4/os/utlis/misc/pci_utils.tgz. The executables (show_pci,
pci_write) work fine. However when i recompile them using watcom 10.6 and
execute them it gives me errors like “No BIOS32 found”, “PCI BIOS not
found”…

my makefile is :

INCLUDE_FILES = pci.h

OBJECTS = show_pci.c

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call PCI
function are limited in the size of segment they can use.

$(OBJECTS):$(INCLUDE_FILES)

can anyone please help me out on this??

thanks
Anup

David Gibbs wrote:

“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:

“Mario Charest” postmaster@127.0.0.1 wrote in message

“Anup Katake” <> anup@tamu.edu> > wrote in message

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call PCI
function are limited in the size of segment they can use.



Hi Mario


Is this documented anywhere?


In the Caveats sections for the _CA_PCI calls:

The stack size must be less than 64K.

Also, don’t forget to mention that there is a workaround
for this problem (the pci server thingy).

Rennie

“Mario Charest” postmaster@127.0.0.1 wrote in message >

“Anup Katake” <> anup@tamu.edu> > wrote in message
show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call PCI
function are limited in the size of segment they can use.

Hi Mario

Is this documented anywhere?

I have several programs with large stacks (I think 80K) that give the
illusion of working.

On the other hand I’m not using the QNX PCI library. I wrote all of my own
routines from scratch. Maybe that’s the trick.

“Bill Caroselli (Q-TPS)” <QTPS@EarthLink.net> wrote in message
news:app5q2$mch$1@inn.qnx.com

“Mario Charest” postmaster@127.0.0.1 wrote in message
“Anup Katake” <> anup@tamu.edu> > wrote in message
show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call PCI
function are limited in the size of segment they can use.


Hi Mario

Is this documented anywhere?

I beleive it is in the PCI function.

I have several programs with large stacks (I think 80K) that give the
illusion of working.

On the other hand I’m not using the QNX PCI library. I wrote all of my
own
routines from scratch. Maybe that’s the trick.

Yes, this limitation is cause by the PCI library, don’t have a clue why that
is though.

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

“Mario Charest” postmaster@127.0.0.1 wrote in message
“Anup Katake” <> anup@tamu.edu> > wrote in message
show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call PCI
function are limited in the size of segment they can use.


Hi Mario

Is this documented anywhere?

In the Caveats sections for the _CA_PCI calls:

The stack size must be less than 64K.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

David Gibbs <dagibbs@qnx.com> wrote:
: “Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:
:> Is this documented anywhere?

: In the Caveats sections for the _CA_PCI calls:

: The stack size must be less than 64K.

This isn’t in the released version of the Watcom C Library Reference, but I
hope that we’ll release an updated version at some point.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Bill Caroselli (Q-TPS) wrote:

“Bill Caroselli (Q-TPS)” <> QTPS@EarthLink.net> > wrote in message


OK. This is just starting to really sink in. So all of the QNX drivers are
using this PCI server too? This can be a major reason for some of the
excessive system slowness.

I don’t think it’s sinking in quite yet…

Rennie

“Rennie Allen” <rallen@csical.com> wrote in message
news:3DC00E3B.2080302@csical.com

David Gibbs wrote:
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:

“Mario Charest” postmaster@127.0.0.1 wrote in message

“Anup Katake” <> anup@tamu.edu> > wrote in message

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call PCI
function are limited in the size of segment they can use.



Hi Mario


Is this documented anywhere?


In the Caveats sections for the _CA_PCI calls:

The stack size must be less than 64K.

Also, don’t forget to mention that there is a workaround
for this problem (the pci server thingy).

Hi.

We have an app, setup with a 96K stack size and the _CA_PCI calls seem to be
working. We can’t reduce the stack size. What sort of problem can we run
into (other than the one mentioned already).

It seems crazy to have to setup a pci server, when all I need to do is to
figure out if a PCI board is present in the system and to get a few
configuration parameters. Setting up the pci server will be a major task!!!

I would be interested in getting a new version of the _CA_PCI function that
do not have this limitation.

TIA

Augie

Rennie

“Augie Henriques” <augiehenriques@hotmail.com> wrote in message
news:aprbkl$814$1@inn.qnx.com

“Rennie Allen” <> rallen@csical.com> > wrote in message
news:> 3DC00E3B.2080302@csical.com> …
David Gibbs wrote:
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:

“Mario Charest” postmaster@127.0.0.1 wrote in message

“Anup Katake” <> anup@tamu.edu> > wrote in message

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call PCI
function are limited in the size of segment they can use.



Hi Mario


Is this documented anywhere?


In the Caveats sections for the _CA_PCI calls:

The stack size must be less than 64K.

Also, don’t forget to mention that there is a workaround
for this problem (the pci server thingy).

Hi.

We have an app, setup with a 96K stack size and the _CA_PCI calls seem to
be
working. We can’t reduce the stack size. What sort of problem can we run
into (other than the one mentioned already).

Don’t know, i’m surprise program doesn’t crash.

It seems crazy to have to setup a pci server, when all I need to do is to
figure out if a PCI board is present in the system and to get a few
configuration parameters. Setting up the pci server will be a major
task!!!

Not it’s not a major task, I beleive there is alreay a server available on
QSS ftp site.

Writting this from scratch is less then a days work. All you need to do is
turn every function _CA_PCI into a message that is send to the server who
call the real function on your behalf and reply with the results.

I would be interested in getting a new version of the _CA_PCI function
that
do not have this limitation.

I doubt QSS will be putting effort into this, bite!

TIA

Augie


Rennie

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:aprdqi$am2$1@inn.qnx.com

“Augie Henriques” <> augiehenriques@hotmail.com> > wrote in message
news:aprbkl$814$> 1@inn.qnx.com> …

“Rennie Allen” <> rallen@csical.com> > wrote in message
news:> 3DC00E3B.2080302@csical.com> …
David Gibbs wrote:
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:

“Mario Charest” postmaster@127.0.0.1 wrote in message

“Anup Katake” <> anup@tamu.edu> > wrote in message

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call
PCI
function are limited in the size of segment they can use.



Hi Mario


Is this documented anywhere?


In the Caveats sections for the _CA_PCI calls:

The stack size must be less than 64K.

Also, don’t forget to mention that there is a workaround
for this problem (the pci server thingy).

Hi.

We have an app, setup with a 96K stack size and the _CA_PCI calls seem
to
be
working. We can’t reduce the stack size. What sort of problem can we
run
into (other than the one mentioned already).

Don’t know, i’m surprise program doesn’t crash.


It seems crazy to have to setup a pci server, when all I need to do is
to
figure out if a PCI board is present in the system and to get a few
configuration parameters. Setting up the pci server will be a major
task!!!

Not it’s not a major task, I beleive there is alreay a server available on
QSS ftp site.

Hi Mario.

Where exactly?

TIA

Augie

Writting this from scratch is less then a days work. All you need to do is
turn every function _CA_PCI into a message that is send to the server who
call the real function on your behalf and reply with the results.


I would be interested in getting a new version of the _CA_PCI function
that
do not have this limitation.

I doubt QSS will be putting effort into this, bite!


TIA

Augie


Rennie

\

Eric Doenges wrote:

On Wed, 30 Oct 2002 00:34:12 +0100, Anup Katake wrote:

[ … ]

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

[ … ]

I think I remember reading somewhere that the QNX PCI routines do not
work if called from a program with more than 64K of stack, since they
call the PC’s BIOS, which assumes a 64K stack segment. There is ‘PCI
manager’ sourcecode somewhere on the QNX website that lets you
circumvent this by breaking the PCI functions out into a seperate
process with a small stack.

I’ve run into a problem on both 4.24 and 4.25 QNX
systems when doing a “show_pci -v”. If there is
PCI activity, the system will occasionally “lock up”.
I’ve found that I can force this to occur by causing
PCI activity (say writing data out a serial port on
a multiport PCI card, or reading data from a PCI
scsi interface or while there is a lot of network
activity through a PCI network card) and then
repeatedly doing the show_pci -v as fast as I can.
(up arrow, enter, up arrow, enter, …) Sometimes
it happens quite quickly, sometimes I have to do
it for several minutes but it always happens. If
there is no significant PCI activity, it does not seem
to happen. I have no idea why. I’ve done this
on a number of different hardware configurations
from old 100 Mhz Pentiums to current machines.
My only fix has been ,“don’t do this anymore”.

Regards,
Chris

“Augie Henriques” <augiehenriques@hotmail.com> wrote in message
news:aprehm$bbs$1@inn.qnx.com

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:aprdqi$am2$> 1@inn.qnx.com> …

“Augie Henriques” <> augiehenriques@hotmail.com> > wrote in message
news:aprbkl$814$> 1@inn.qnx.com> …

“Rennie Allen” <> rallen@csical.com> > wrote in message
news:> 3DC00E3B.2080302@csical.com> …
David Gibbs wrote:
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:

“Mario Charest” postmaster@127.0.0.1 wrote in message

“Anup Katake” <> anup@tamu.edu> > wrote in message

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call
PCI
function are limited in the size of segment they can use.



Hi Mario


Is this documented anywhere?


In the Caveats sections for the _CA_PCI calls:

The stack size must be less than 64K.

Also, don’t forget to mention that there is a workaround
for this problem (the pci server thingy).

Hi.

We have an app, setup with a 96K stack size and the _CA_PCI calls seem
to
be
working. We can’t reduce the stack size. What sort of problem can we
run
into (other than the one mentioned already).

Don’t know, i’m surprise program doesn’t crash.


It seems crazy to have to setup a pci server, when all I need to do is
to
figure out if a PCI board is present in the system and to get a few
configuration parameters. Setting up the pci server will be a major
task!!!

FYI QNX6 uses a pci server.

Not it’s not a major task, I beleive there is alreay a server available
on
QSS ftp site.

Hi Mario.

Where exactly?

ftp://ftp.qnx.com/usr/free/qnx4/os/samples/misc/ca_pci_msg.tgz

Mario Charest postmaster@127.0.0.1 wrote:

“Bill Caroselli (Q-TPS)” <> QTPS@EarthLink.net> > wrote in message
news:app5q2$mch$> 1@inn.qnx.com> …
“Mario Charest” postmaster@127.0.0.1 wrote in message
“Anup Katake” <> anup@tamu.edu> > wrote in message
show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call PCI
function are limited in the size of segment they can use.


Hi Mario

Is this documented anywhere?

I beleive it is in the PCI function.


I have several programs with large stacks (I think 80K) that give the
illusion of working.

On the other hand I’m not using the QNX PCI library. I wrote all of my
own
routines from scratch. Maybe that’s the trick.

Yes, this limitation is cause by the PCI library, don’t have a clue why that
is though.

The CA_PCI* library actually makes direct dives into the PCI BIOS…the
PCI BIOS supplies a set of entry points that are callable from 32-bit
protected mode, but they assume that the address of anything on the stack
is less than the 64K mark.

I expect it isn’t “assume”, I expect it is probably something like using
a 16-bit register for the stack address in the BIOS code. If you’re stack
isn’t in range, who knows what will happen…usually the call fails, but
you might damage things, or do other nastiness.

(Under QNX6, we implement the PCI services as servers and the callable
library does messages to the pci server… essentially what I did in
the pci_msg archive that someone posted the ftp link to, earlier.)

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:aprdqi$am2$1@inn.qnx.com

Writting this from scratch is less then a days work. All you need to do is
turn every function _CA_PCI into a message that is send to the server who
call the real function on your behalf and reply with the results.

The problem I have with this is that most PCI functions are a memory
read/write.

Talking to a PCI server involves message passing, task swapping, scheduling,
yadda, yadda, yadda. It kind of defeats the purpose of having the nice fast
PCI bus.

Personally, if I have to live with a 64K stack size in programs that access
PCI devices, I can live with that. I can code for it. I would still prefer
to do my own PCI access, then to have to message to a server.

“Bill Caroselli (Q-TPS)” <QTPS@EarthLink.net> wrote in message
news:aprpgg$nip$1@inn.qnx.com

The problem I have with this is that most PCI functions are a memory
read/write.

Talking to a PCI server involves message passing, task swapping,
scheduling,
yadda, yadda, yadda. It kind of defeats the purpose of having the nice
fast
PCI bus.

Personally, if I have to live with a 64K stack size in programs that
access
PCI devices, I can live with that. I can code for it. I would still
prefer
to do my own PCI access, then to have to message to a server.

OK. This is just starting to really sink in. So all of the QNX drivers are

using this PCI server too? This can be a major reason for some of the
excessive system slowness.

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:aprdqi$am2$> 1@inn.qnx.com> …

Writting this from scratch is less then a days work. All you need to do is
turn every function _CA_PCI into a message that is send to the server who
call the real function on your behalf and reply with the results.


The problem I have with this is that most PCI functions are a memory
read/write.

Talking to a PCI server involves message passing, task swapping, scheduling,
yadda, yadda, yadda. It kind of defeats the purpose of having the nice fast
PCI bus.

Personally, if I have to live with a 64K stack size in programs that access
PCI devices, I can live with that. I can code for it. I would still prefer
to do my own PCI access, then to have to message to a server.

_CA_PCI calls are used for querying & configuring a PCI device –
determing what IRQ or memory range it is using, etc. This means that
they are generally only used at initialization time.

For the main accesses/control of the device, whether it is on the
PCI or ISA bus, you’re gonna do the same thing – attach an interrupt
handler, map in a memory range, program the DMA controller to read/write
to DMA safe memory, or read/write values to io-ports use in/out calls.
None of these use the _CA_PCI calls, none of these would be routed through
the pci server.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

OK. This is just starting to really sink in. So all of the QNX drivers are
using this PCI server too? This can be a major reason for some of the
excessive system slowness.

Nope. As I said previously – the _CA_PCI calls are setup, query,
and configuration calls. Using them might slow down initialization
a little bit – but (reasonable) overhead at initialization time is
not usually a large concern – not as much as during operation.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:aprtd2$3jb$2@nntp.qnx.com

“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:

OK. This is just starting to really sink in. So all of the QNX drivers
are
using this PCI server too? This can be a major reason for some of the
excessive system slowness.

Nope. As I said previously – the _CA_PCI calls are setup, query,
and configuration calls. Using them might slow down initialization
a little bit – but (reasonable) overhead at initialization time is
not usually a large concern – not as much as during operation.

Ah. Right! This is good news.

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:aprku7$ii6$1@inn.qnx.com

“Augie Henriques” <> augiehenriques@hotmail.com> > wrote in message
news:aprehm$bbs$> 1@inn.qnx.com> …

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:aprdqi$am2$> 1@inn.qnx.com> …

“Augie Henriques” <> augiehenriques@hotmail.com> > wrote in message
news:aprbkl$814$> 1@inn.qnx.com> …

“Rennie Allen” <> rallen@csical.com> > wrote in message
news:> 3DC00E3B.2080302@csical.com> …
David Gibbs wrote:
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:

“Mario Charest” postmaster@127.0.0.1 wrote in message

“Anup Katake” <> anup@tamu.edu> > wrote in message

show_pci: $(OBJECTS)
cc -T1 -M -o show_pci -N100k $(OBJECTS)

Get rid of the -N100k. Stack is too big. Program that call
PCI
function are limited in the size of segment they can use.



Hi Mario


Is this documented anywhere?


In the Caveats sections for the _CA_PCI calls:

The stack size must be less than 64K.

Also, don’t forget to mention that there is a workaround
for this problem (the pci server thingy).

Hi.

We have an app, setup with a 96K stack size and the _CA_PCI calls
seem
to
be
working. We can’t reduce the stack size. What sort of problem can
we
run
into (other than the one mentioned already).

Don’t know, i’m surprise program doesn’t crash.


It seems crazy to have to setup a pci server, when all I need to do
is
to
figure out if a PCI board is present in the system and to get a few
configuration parameters. Setting up the pci server will be a major
task!!!

FYI QNX6 uses a pci server.


Not it’s not a major task, I beleive there is alreay a server
available
on
QSS ftp site.

Hi Mario.

Where exactly?

ftp://ftp.qnx.com/usr/free/qnx4/os/samples/misc/ca_pci_msg.tgz
\

Any idea where I can get the sched.h file from?

TIA

Augie