pci_irq_routing_options() question

Hello,

Documentation for pci_irq_routing_options() function says that first
argument is a pointer to IRQRoutingOptionsBuffer structure. According to
the PCI BIOS Specification (Rev.2.1) this data structure is:

typedef struct
{
WORD BufferSize;
BYTE FAR* DataBuffer;
} IRQRoutingOptionsBuffer;

According to /usr/include/hw/pci.h this data structure is
struct _pci_route_buffer{
uint16_t BufferSize;
uint16_t DataBufferOffset;
uint16_t DataBuffSeg;
} IRQRoutingOptionsBuffer;

So, I’d very appreciate if someone could show me an example of
manipulations with mmap(), mem_offset() and/or anything else, to get
those DataBufferOffset and DataBufferSeg.

So far (I’m sure I’m doing something wrong but I don’t think it is good
enough reason for such behaviour of “server”), I can’t get PCI_SUCCESS
return value, as well as pci-bios server leaves only core
/var/dumps/pci-bios.core and there is no /dev/pci anymore :frowning:

Thanks in advance.
Eduard. [ed1k at lavalink dot com]

I have attached some source that reads the IRQ routing information.

“ed1k” <ed1k@fake.address> wrote in message
news:MPG.1ac98d2ff44be3dc989684@inn.qnx.com

Hello,

Documentation for pci_irq_routing_options() function says that first
argument is a pointer to IRQRoutingOptionsBuffer structure. According to
the PCI BIOS Specification (Rev.2.1) this data structure is:

typedef struct
{
WORD BufferSize;
BYTE FAR* DataBuffer;
} IRQRoutingOptionsBuffer;

According to /usr/include/hw/pci.h this data structure is
struct _pci_route_buffer{
uint16_t BufferSize;
uint16_t DataBufferOffset;
uint16_t DataBuffSeg;
} IRQRoutingOptionsBuffer;

So, I’d very appreciate if someone could show me an example of
manipulations with mmap(), mem_offset() and/or anything else, to get
those DataBufferOffset and DataBufferSeg.

So far (I’m sure I’m doing something wrong but I don’t think it is good
enough reason for such behaviour of “server”), I can’t get PCI_SUCCESS
return value, as well as pci-bios server leaves only core
/var/dumps/pci-bios.core and there is no /dev/pci anymore > :frowning:

Thanks in advance.
Eduard. [ed1k at lavalink dot com]

begin 666 irq_rout.c
M(VEN8VQU9&4@/’-T9&EO+F@^#0HC:6YC;‘5D92 <W1D;&EB+F@^#0HC:6YC
M;‘5D92 \97)R;F\N:#X-"B-I;F-L=61E(#QI;G1T>7!E<RYH/@T*(VEN8VQU
M9&4@/&AW+W!C:2YH/@T*(VEN8VQU9&4@/’-Y<R]N975T<FEN;RYH/@T*#0H-
M"G-T<G5C="![#0H)25)14F]U=&EN9T]P=&EO;G-"=69F97(@8G5F.PT*“75I
M;G0X7W0@9&%T86)U9B!;,C T.%T#0IO=71E7V)U9CL-”@T*:6YT(&UA
M:6X@‘9O:60I#0I[#0H):6YT(’!H9&P[#0H)=6EN=#,R7W0@:7)Q.PT#0H-
M"@EI9B H*’!H9&P@/2!P8VE?871T86-H("@P2D@/3T@+3$I(‘L-"@D)<’)I
M;G1F("@B56YA8FQE(‘1O(&%T=&%C:" M(&5R<FYO(“5S7&XB+”!S=’)E<G)O
M<B H97)R;F\I
3L-"@D)97AI=" H,2D[#0H)“7T-”@T*“6UE;7-E=” H<F]U
M=&5?8G5F+F1A=&%B=68L(# L(’-I>F5O9B H<F]U=&5?8G5F+F1A=&%B=68I
M3L-"@ER;W5T95]B=68N8G5F+D)U9F9EF4@/2!S:7IE;V8@’)O=71E
M7V)U9BYD871A8G5F3L-"@EI9B H<&-I7VER<5]R;W5T:6YG7V]P=&EO;G,@
M
"9R;W5T95]B=68N8G5F+" F:7)Q2 A/2!00TE?4U5#0T534RD@>PT"0EP
M<FEN=&8@")2;W5T:6YG(&]P=&EO;B!F86EL960@+2!E<G)N;R E<UQN(BP@
M<W1R97)R;W(@
&5R<FYO2D[#0H)"65X:70@#$I.PT*“0E]#0H-”@EP<FEN
M=&8@")00TD@27)Q($UA<" ](“5X7&XB+”!I<G$I.PT"7!C:5]D971A8V@@
<’!H9&PI.PT"7)E='5R;B H,“D[#0I]#0H-”@``
`
end

In article <c3pb2b$18h$1@inn.qnx.com>, hsbrown@qnx.com says…

I have attached some source that reads the IRQ routing information.

Hi,

Thank you very much. I tried to compile and run the attached code. It
does pretty same thing that my code does, i.e. kills pci-bios server. I
tried to add ThreadCtl() call, but it didn’t help. Where is my mistake:

uudecode article.txt

uudecode: article.txt: no `end’ line

gcc -oirq_route irq_route.c

./irq_route

Routing option failed - errno No such process.

coreinfo -vvvvvv /var/dumps/pci-bios.core

pci-bios.core:
size=156 total_size=2312 system_private:off/size=480,104
asinfo:off/size=1512,480 meminfo:off/size=584,96 hwinfo:off/size=
928,584
cpuinfo:off/size=376,32 cacheattr:off/size=2312,0 qtime:off/size=304,72
callout:off/size=160,72 callin:off/size=232,64 intrinfo:off/size=
1992,320
typed_strings:off/size=680,32 strings:off/size=712,216
processor=X86 num_cpus=1
cpu 1 cpu=686 name=Pentium II Stepping 2 speed=348
flags=0xc00017ff FPU MMU CPUID RDTSC INVLPG WP BSWAP MMX CMOV PSE PGE
MTRR SEP FXSR
cyc/sec=348520400 tod_adj=1080089310395081871 nsec=125018869186 inc=
999847
boot=1080074910 epoch=1970 intr=0
rate=838095345 scale=-15 load=1193
MACHINE=“x86pc” HOSTNAME=“localhost”
hwflags=0x000540
valid=512 heads=255 cyls=524 sectors=63 nblocks=8401995 spare=0
valid=512 heads=128 cyls=787 sectors=63 nblocks=6338304 spare=0
pid=5 parent=2 child=0 pgrp=5 sid=1
flags=0x002210 umask=0 base_addr=0x8048000 init_stack=0x8047f3c
ruid=0 euid=0 suid=0 rgid=0 egid=0 sgid=0
ign=0000000006800000 queue=ff00000000000000 pending=0000000000000000
fds=4 threads=1 timers=0 chans=7
thread 1 SIGNALLED-SIGSEGV code=1 MAPERR refaddr=8048000 fltno=11
ip=0xb033a155 sp=0x8047a48 stkbase=0x7fc7000 stksize=528384
state=STOPPED flags=80000000 last_cpu=1 timeout=00000000
pri=10 realpri=10 policy=OTHER
Mapping 0x08046000-0x08048000 RW-
Mapping 0x08048000-0x08051000 RWX
Mapping 0x08051000-0x08053000 RWX
Mapping 0x08053000-0x08057000 RW-
Mapping 0xb0300000-0xb034a000 RWX
Mapping 0xb034a000-0xb034e000 RWX



“ed1k” <> ed1k@fake.address> > wrote in message
news:> MPG.1ac98d2ff44be3dc989684@inn.qnx.com> …
Hello,

Documentation for pci_irq_routing_options() function says that first
argument is a pointer to IRQRoutingOptionsBuffer structure. According to
the PCI BIOS Specification (Rev.2.1) this data structure is:

typedef struct
{
WORD BufferSize;
BYTE FAR* DataBuffer;
} IRQRoutingOptionsBuffer;

According to /usr/include/hw/pci.h this data structure is
struct _pci_route_buffer{
uint16_t BufferSize;
uint16_t DataBufferOffset;
uint16_t DataBuffSeg;
} IRQRoutingOptionsBuffer;

So, I’d very appreciate if someone could show me an example of
manipulations with mmap(), mem_offset() and/or anything else, to get
those DataBufferOffset and DataBufferSeg.

So far (I’m sure I’m doing something wrong but I don’t think it is good
enough reason for such behaviour of “server”), I can’t get PCI_SUCCESS
return value, as well as pci-bios server leaves only core
/var/dumps/pci-bios.core and there is no /dev/pci anymore > :frowning:

Thanks in advance.
Eduard. [ed1k at lavalink dot com]


begin 666 irq_rout.c
M(VEN8VQU9&4@/’-T9&EO+F@^#0HC:6YC;‘5D92 <W1D;&EB+F@^#0HC:6YC
M;‘5D92 \97)R;F\N:#X-"B-I;F-L=61E(#QI;G1T>7!E<RYH/@T*(VEN8VQU
M9&4@/&AW+W!C:2YH/@T*(VEN8VQU9&4@/’-Y<R]N975T<FEN;RYH/@T*#0H-
M"G-T<G5C="![#0H)25)14F]U=&EN9T]P=&EO;G-"=69F97(@8G5F.PT*“75I
M;G0X7W0@9&%T86)U9B!;,C T.%T#0IO=71E7V)U9CL-”@T*:6YT(&UA
M:6X@‘9O:60I#0I[#0H):6YT(’!H9&P[#0H)=6EN=#,R7W0@:7)Q.PT#0H-
M"@EI9B H*’!H9&P@/2!P8VE?871T86-H("@P2D@/3T@+3$I(‘L-"@D)<’)I
M;G1F("@B56YA8FQE(‘1O(&%T=&%C:" M(&5R<FYO(“5S7&XB+”!S=’)E<G)O
M<B H97)R;F\I
3L-"@D)97AI=" H,2D[#0H)“7T-”@T*“6UE;7-E=” H<F]U
M=&5?8G5F+F1A=&%B=68L(# L(’-I>F5O9B H<F]U=&5?8G5F+F1A=&%B=68I
M3L-"@ER;W5T95]B=68N8G5F+D)U9F9EF4@/2!S:7IE;V8@’)O=71E
M7V)U9BYD871A8G5F3L-"@EI9B H<&-I7VER<5]R;W5T:6YG7V]P=&EO;G,@
M
"9R;W5T95]B=68N8G5F+" F:7)Q2 A/2!00TE?4U5#0T534RD@>PT"0EP
M<FEN=&8@")2;W5T:6YG(&]P=&EO;B!F86EL960@+2!E<G)N;R E<UQN(BP@
M<W1R97)R;W(@
&5R<FYO2D[#0H)"65X:70@#$I.PT*“0E]#0H-”@EP<FEN
M=&8@")00TD@27)Q($UA<" ](“5X7&XB+”!I<G$I.PT"7!C:5]D971A8V@@
'!H9&PI.PT"7)E='5R;B H,“D[#0I]#0H-”@``
`
end

I can only suspect that there is someting wrong in your BIOS. I have just
compiled the same code on my machine and it runs just fine.
Try starting pci-bios with -vvv and then run your code and see if there are
any errors in sloginfo.

“ed1k” <ed1k@fake.address> wrote in message
news:MPG.1acabcf01ccca1b8989685@inn.qnx.com

In article <c3pb2b$18h$> 1@inn.qnx.com> >, > hsbrown@qnx.com > says…
I have attached some source that reads the IRQ routing information.

Hi,

Thank you very much. I tried to compile and run the attached code. It
does pretty same thing that my code does, i.e. kills pci-bios server. I
tried to add ThreadCtl() call, but it didn’t help. Where is my mistake:

uudecode article.txt

uudecode: article.txt: no `end’ line

gcc -oirq_route irq_route.c

./irq_route

Routing option failed - errno No such process.

coreinfo -vvvvvv /var/dumps/pci-bios.core

pci-bios.core:
size=156 total_size=2312 system_private:off/size=480,104
asinfo:off/size=1512,480 meminfo:off/size=584,96 hwinfo:off/size=
928,584
cpuinfo:off/size=376,32 cacheattr:off/size=2312,0 qtime:off/size=304,72
callout:off/size=160,72 callin:off/size=232,64 intrinfo:off/size=
1992,320
typed_strings:off/size=680,32 strings:off/size=712,216
processor=X86 num_cpus=1
cpu 1 cpu=686 name=Pentium II Stepping 2 speed=348
flags=0xc00017ff FPU MMU CPUID RDTSC INVLPG WP BSWAP MMX CMOV PSE PGE
MTRR SEP FXSR
cyc/sec=348520400 tod_adj=1080089310395081871 nsec=125018869186 inc=
999847
boot=1080074910 epoch=1970 intr=0
rate=838095345 scale=-15 load=1193
MACHINE=“x86pc” HOSTNAME=“localhost”
hwflags=0x000540
valid=512 heads=255 cyls=524 sectors=63 nblocks=8401995 spare=0
valid=512 heads=128 cyls=787 sectors=63 nblocks=6338304 spare=0
pid=5 parent=2 child=0 pgrp=5 sid=1
flags=0x002210 umask=0 base_addr=0x8048000 init_stack=0x8047f3c
ruid=0 euid=0 suid=0 rgid=0 egid=0 sgid=0
ign=0000000006800000 queue=ff00000000000000 pending=0000000000000000
fds=4 threads=1 timers=0 chans=7
thread 1 SIGNALLED-SIGSEGV code=1 MAPERR refaddr=8048000 fltno=11
ip=0xb033a155 sp=0x8047a48 stkbase=0x7fc7000 stksize=528384
state=STOPPED flags=80000000 last_cpu=1 timeout=00000000
pri=10 realpri=10 policy=OTHER
Mapping 0x08046000-0x08048000 RW-
Mapping 0x08048000-0x08051000 RWX
Mapping 0x08051000-0x08053000 RWX
Mapping 0x08053000-0x08057000 RW-
Mapping 0xb0300000-0xb034a000 RWX
Mapping 0xb034a000-0xb034e000 RWX




“ed1k” <> ed1k@fake.address> > wrote in message
news:> MPG.1ac98d2ff44be3dc989684@inn.qnx.com> …
Hello,

Documentation for pci_irq_routing_options() function says that first
argument is a pointer to IRQRoutingOptionsBuffer structure. According
to
the PCI BIOS Specification (Rev.2.1) this data structure is:

typedef struct
{
WORD BufferSize;
BYTE FAR* DataBuffer;
} IRQRoutingOptionsBuffer;

According to /usr/include/hw/pci.h this data structure is
struct _pci_route_buffer{
uint16_t BufferSize;
uint16_t DataBufferOffset;
uint16_t DataBuffSeg;
} IRQRoutingOptionsBuffer;

So, I’d very appreciate if someone could show me an example of
manipulations with mmap(), mem_offset() and/or anything else, to get
those DataBufferOffset and DataBufferSeg.

So far (I’m sure I’m doing something wrong but I don’t think it is
good
enough reason for such behaviour of “server”), I can’t get PCI_SUCCESS
return value, as well as pci-bios server leaves only core
/var/dumps/pci-bios.core and there is no /dev/pci anymore > :frowning:

Thanks in advance.
Eduard. [ed1k at lavalink dot com]


begin 666 irq_rout.c
M(VEN8VQU9&4@/’-T9&EO+F@^#0HC:6YC;‘5D92 <W1D;&EB+F@^#0HC:6YC
M;‘5D92 \97)R;F\N:#X-"B-I;F-L=61E(#QI;G1T>7!E<RYH/@T*(VEN8VQU
M9&4@/&AW+W!C:2YH/@T*(VEN8VQU9&4@/’-Y<R]N975T<FEN;RYH/@T*#0H-
M"G-T<G5C="![#0H)25)14F]U=&EN9T]P=&EO;G-"=69F97(@8G5F.PT*“75I
M;G0X7W0@9&%T86)U9B!;,C T.%T#0IO=71E7V)U9CL-”@T*:6YT(&UA
M:6X@‘9O:60I#0I[#0H):6YT(’!H9&P[#0H)=6EN=#,R7W0@:7)Q.PT#0H-
M"@EI9B H*’!H9&P@/2!P8VE?871T86-H("@P2D@/3T@+3$I(‘L-"@D)<’)I
M;G1F("@B56YA8FQE(‘1O(&%T=&%C:" M(&5R<FYO(“5S7&XB+”!S=’)E<G)O
M<B H97)R;F\I
3L-"@D)97AI=" H,2D[#0H)“7T-”@T*“6UE;7-E=” H<F]U
M=&5?8G5F+F1A=&%B=68L(# L(’-I>F5O9B H<F]U=&5?8G5F+F1A=&%B=68I
M3L-"@ER;W5T95]B=68N8G5F+D)U9F9EF4@/2!S:7IE;V8@’)O=71E
M7V)U9BYD871A8G5F3L-"@EI9B H<&-I7VER<5]R;W5T:6YG7V]P=&EO;G,@
M
"9R;W5T95]B=68N8G5F+" F:7)Q2 A/2!00TE?4U5#0T534RD@>PT"0EP
M<FEN=&8@")2;W5T:6YG(&]P=&EO;B!F86EL960@+2!E<G)N;R E<UQN(BP@
M<W1R97)R;W(@
&5R<FYO2D[#0H)"65X:70@#$I.PT*“0E]#0H-”@EP<FEN
M=&8@")00TD@27)Q($UA<" ](“5X7&XB+”!I<G$I.PT"7!C:5]D971A8V@@
'!H9&PI.PT"7)E='5R;B H,“D[#0I]#0H-”@``
`
end

Hugh Brown wrote:

No, my BIOS is fine. The problem is a version of QNX. It always sigsegv in
QNX6.1 patch A (I tried quite a few PC with different BIOS) and works just
fine in QNX 6.2.1. Is there any workaround for QNX 6.1? Or is it at least
known (solved) issue?

Thank you,
Eduard.

I can only suspect that there is someting wrong in your BIOS. I have just
compiled the same code on my machine and it runs just fine.
Try starting pci-bios with -vvv and then run your code and see if there are
any errors in sloginfo.

“ed1k” <> ed1k@fake.address> > wrote in message
news:> MPG.1acabcf01ccca1b8989685@inn.qnx.com> …
In article <c3pb2b$18h$> 1@inn.qnx.com> >, > hsbrown@qnx.com > says…

It is a known, solved issue and was fixed after 6.1.

“ed1k” <ed1k@somewhere.ca> wrote in message news:c3s93o$hem$1@inn.qnx.com

Hugh Brown wrote:

No, my BIOS is fine. The problem is a version of QNX. It always sigsegv in
QNX6.1 patch A (I tried quite a few PC with different BIOS) and works just
fine in QNX 6.2.1. Is there any workaround for QNX 6.1? Or is it at least
known (solved) issue?

Thank you,
Eduard.

I can only suspect that there is someting wrong in your BIOS. I have
just
compiled the same code on my machine and it runs just fine.
Try starting pci-bios with -vvv and then run your code and see if there
are
any errors in sloginfo.

“ed1k” <> ed1k@fake.address> > wrote in message
news:> MPG.1acabcf01ccca1b8989685@inn.qnx.com> …
In article <c3pb2b$18h$> 1@inn.qnx.com> >, > hsbrown@qnx.com > says…

In article <c3seju$lp9$1@inn.qnx.com>, hsbrown@qnx.com says…

It is a known, solved issue and was fixed after 6.1.

Thank you very much. BTW, I think it wouldn’t hurt anyone if the example
you have attached were put in documentation:
http://www.qnx.com/developers/docs/momentics621
_docs/neutrino/lib_ref/p/pci_irq_routing_options.html
Mmm… Steve?

Best regards,
Eduard.

“ed1k” <> ed1k@somewhere.ca> > wrote in message news:c3s93o$hem$> 1@inn.qnx.com> …
Hugh Brown wrote:

ed1k <ed1k@fake.address> wrote:

In article <c3seju$lp9$> 1@inn.qnx.com> >, > hsbrown@qnx.com > says…
It is a known, solved issue and was fixed after 6.1.


Thank you very much. BTW, I think it wouldn’t hurt anyone if the example
you have attached were put in documentation:
http://www.qnx.com/developers/docs/momentics621
_docs/neutrino/lib_ref/p/pci_irq_routing_options.html
Mmm… Steve?

I’ve added it. Thanks for the suggestion.


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

In article <c4c5ao$i1j$1@inn.qnx.com>, stever@sreid.ott.qnx.com says…

ed1k <> ed1k@fake.address> > wrote:
In article <c3seju$lp9$> 1@inn.qnx.com> >, > hsbrown@qnx.com > says…
It is a known, solved issue and was fixed after 6.1.


Thank you very much. BTW, I think it wouldn’t hurt anyone if the example
you have attached were put in documentation:
http://www.qnx.com/developers/docs/momentics621
_docs/neutrino/lib_ref/p/pci_irq_routing_options.html
Mmm… Steve?

I’ve added it.

Thank you very much.

Thanks for the suggestion.


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