s h(deleted)
|
PCI BIOS alternative handler
|
s h(deleted)
10/03/2016 8:45 AM
post116934
|
PCI BIOS alternative handler
Hi,
We encountered a problem when using the PCI BIOS alternative handler used (-E0) on QNX4 Proc32 ver 4.25R (Feb 15 2012).
In our software (PCI device drivers and utilities) the _CA_PCI_Find_Device (sys/pci.h) function seemed to randomly fail
to detect a present PCI device.
We found that implementation of the Find PCI Device (int 1ah, function b102h) depends on uninitialized registers (EBX,
EDI).
It is possible that other PCI functions have similar problem.
Proposed solution:
a) fix the alternative PCI BIOS handler so it does not use uninitialized values and release fixed Proc32
b) workaround built into clib - we were able to disassemble clib, change _CA_PCI_Find_Device so that it pre-initialize
all struct _pci_regs members (eax, ebx, edi), updating clib using modified pci module, and recompiling our sofware using
modified clib - this solution does not work for 3rd party software which we cannot update in this way
How to reproduce:
Attached sample program succeeds to find present PCI device if stack is filled by 0x00 pattern, but fails in case of
0xff pattern.
How to use the sample program:
* run QNX4 with Proc32 -E0 option
* set devid, venid and index according to a present PCI device (edit those variables in finddev.c)
* fill stack by 0x00 pattern (enable invocation of set_stack(512, 0x0000000) in finddev.c)
* build and run sample program as root, Find PCI Device result will be 0x0 (PCI_SUCCESS)
* fill stack by 0xff pattern (disable invocation of set_stack(512, 0x00000000) in finddev.c)
* build and run sample program as root, Find PCI Device result will be 0x83 (PCI_BAD_VENDOR_ID)
Thanks,
stepan hejny
|
|
|
Oleg Bolshakov
|
Re: PCI BIOS alternative handler
|
Oleg Bolshakov
10/03/2016 9:53 AM
post116935
|
Re: PCI BIOS alternative handler
Hi Stepan,
Thank you for your effort in debugging this issue. We'll look at this. I'll let you know about results.
Respectfully,
Oleg
3 окт. 2016 г., в 15:45:34, s h <community-noreply@qnx.com> написал:
> Hi,
>
> We encountered a problem when using the PCI BIOS alternative handler used (-E0) on QNX4 Proc32 ver 4.25R (Feb 15 2012)
.
> In our software (PCI device drivers and utilities) the _CA_PCI_Find_Device (sys/pci.h) function seemed to randomly
fail to detect a present PCI device.
>
> We found that implementation of the Find PCI Device (int 1ah, function b102h) depends on uninitialized registers (EBX,
EDI).
>
> It is possible that other PCI functions have similar problem.
>
> Proposed solution:
> a) fix the alternative PCI BIOS handler so it does not use uninitialized values and release fixed Proc32
> b) workaround built into clib - we were able to disassemble clib, change _CA_PCI_Find_Device so that it pre-initialize
all struct _pci_regs members (eax, ebx, edi), updating clib using modified pci module, and recompiling our sofware
using modified clib - this solution does not work for 3rd party software which we cannot update in this way
>
> How to reproduce:
> Attached sample program succeeds to find present PCI device if stack is filled by 0x00 pattern, but fails in case of
0xff pattern.
>
> How to use the sample program:
> * run QNX4 with Proc32 -E0 option
> * set devid, venid and index according to a present PCI device (edit those variables in finddev.c)
> * fill stack by 0x00 pattern (enable invocation of set_stack(512, 0x0000000) in finddev.c)
> * build and run sample program as root, Find PCI Device result will be 0x0 (PCI_SUCCESS)
> * fill stack by 0xff pattern (disable invocation of set_stack(512, 0x00000000) in finddev.c)
> * build and run sample program as root, Find PCI Device result will be 0x83 (PCI_BAD_VENDOR_ID)
>
> Thanks,
> stepan hejny
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post116934
> To cancel your subscription to this discussion, please e-mail general-qnx4-unsubscribe@community.qnx.com
> <finddev.c><Makefile>
|
|
|
s h(deleted)
|
Re: PCI BIOS alternative handler
|
s h(deleted)
10/25/2016 6:30 AM
post116995
|
Re: PCI BIOS alternative handler
Hi Oleg,
Did you guys have a chance to take a look on this issue?
Thanks,
stepan hejny
|
|
|
Oleg Bolshakov
|
Re: PCI BIOS alternative handler
|
Oleg Bolshakov
10/25/2016 6:54 AM
post116996
|
Re: PCI BIOS alternative handler
Hi Stepan,
I've updated the Proc to fix this issue. I'll let you know when new Proc will be available to download after our
internal testing process. Thanks for your patience.
Respectfully,
Oleg
25 окт. 2016 г., в 13:30:05, s h <community-noreply@qnx.com> написал:
> Hi Oleg,
> Did you guys have a chance to take a look on this issue?
> Thanks,
> stepan hejny
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post116995
> To cancel your subscription to this discussion, please e-mail general-qnx4-unsubscribe@community.qnx.com
|
|
|
Oleg Bolshakov
|
Re: PCI BIOS alternative handler
|
Oleg Bolshakov
11/01/2016 4:18 AM
post117042
|
Re: PCI BIOS alternative handler
Hi Stepan,
Here is a link to updated Proc32:
http://community.qnx.com/sf/wiki/do/viewPage/projects.qnx4/wiki/LatestSoftwareUpdates
Let me know how it'll work on your system.
Respectfully,
Oleg
25 окт. 2016 г., в 13:53:56, Олег Большаков <O.Bolshakov@kpda.ru> написал:
> Hi Stepan,
>
> I've updated the Proc to fix this issue. I'll let you know when new Proc will be available to download after our
internal testing process. Thanks for your patience.
>
> Respectfully,
> Oleg
>
> 25 окт. 2016 г., в 13:30:05, s h <community-noreply@qnx.com> написал:
>
>> Hi Oleg,
>> Did you guys have a chance to take a look on this issue?
>> Thanks,
>> stepan hejny
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post116995
>> To cancel your subscription to this discussion, please e-mail general-qnx4-unsubscribe@community.qnx.com
>
|
|
|
s h(deleted)
|
Re: PCI BIOS alternative handler
|
s h(deleted)
11/01/2016 4:32 AM
post117043
|
Re: PCI BIOS alternative handler
Hi Oleg,
Thank you very much, we will test it right away and let you know the result.
stepan hejny
|
|
|
s h(deleted)
|
Re: PCI BIOS alternative handler
|
s h(deleted)
11/16/2016 4:48 AM
post117121
|
Re: PCI BIOS alternative handler
Hi Oleg,
Thank you, the Proc32 -E0 works well now.
We noticed there is new option -E1.
Do you have some release notes what was changed since the 2012.02.15 version?
Thank you very much,
stepan hejny
|
|
|
Oleg Bolshakov
|
Re: PCI BIOS alternative handler
|
Oleg Bolshakov
11/16/2016 7:42 AM
post117122
|
Re: PCI BIOS alternative handler
Hi Steoan,
The -E1 option is the same as -E0. It was added for future improvement, but such improvement have not been realized.
There are no changes for Proc since 2012.02.15 except -E0 fix.
Respectfully,
Oleg
16 нояб. 2016 г., в 12:48, s h <community-noreply@qnx.com> написал:
> Hi Oleg,
>
> Thank you, the Proc32 -E0 works well now.
>
> We noticed there is new option -E1.
> Do you have some release notes what was changed since the 2012.02.15 version?
>
> Thank you very much,
> stepan hejny
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post117121
> To cancel your subscription to this discussion, please e-mail general-qnx4-unsubscribe@community.qnx.com
|
|
|
|