03-04-2012 11:16 AM - edited 03-04-2012 11:18 AM
Ubuntu 11.10 32-bit: Installed dev packages, set up a bunch of symlinks so all the headers could be found. Executed run_xbmd.csh, completed sucessfully, kernel module loaded, /dev/xbmd created. Ran xbmd_app get the error: Negotiated link speed invalid: LW = 0
I realize neither Win7 nor Ubuntu are the reference environments from the example, but my UMPC is the only device with WinXP and PCIe expansion isn't an option. I chose Ubuntu because the latest Fedora has some show stopping GUI bugs and windows is ultimately the target.
Since 2 independent implementations are each having problems, and the PCIe slot indeed works with other cards, I suspect the FPGA programming (which was the easiest of it all with the copy command posted elsewhere on the forum) is the issue. Further, if it were a critical problem then the card would never be detected or the computer wouldn't boot. This likely means it's something subtle and/or intimately entangled in the details of PCIe. This is my first experience with PCIe design and I was hoping the dissect a working example to learn more.
I need to get this working before Thursday if possible. At that, I have to choose between losing another weekend of productivity or overnight shipping on a TI DSP kit. I would like to use Xilinx since I want integrate PCIe DSP and peripheral management in parallel. I just need a trustworthy starting point, then I can reverse engineer it. I will accept any help I can get.
BTW: Already scoured Google, Bing, Xilinx, comp.arch.fpga, semantic and related searches, etc. for 3 days. Going to need something new here.
I haven't customized any source code (aside from unlocked_ioctl and pci_get_device updates in xbmd_app), but I'll glady post it if needed. Would prefer a clean solution with source code without any contamination from me.
EDITED: previously no break lines
Solved! Go to Solution.
03-06-2012 02:33 AM
i ran into the exact same probelm. I recompiled the source code of the xap1052 driver using WDDK and visual studio. Installing the driver on windows 7 did not fail but running it (by allowing unsigned driver on startup) caused a BSOD. I have no clue of what can go wrong, and reading the driver code a is painful.
It would be nice from Xilinx to start supporting today's architecture in their example because winXP and 32 bit are quite outdated in the PC world ...
I'll keep digging, but i'am afraid the solution is far from my expertise ...
03-06-2012 08:48 AM - edited 03-06-2012 09:07 AM
Make sure that you aren't running driver verifier, which seems very unlikely since you have just installed the driver, but you never know.
Driver Verifier under Windows 7 x64 picks up a load of errors that verifier under Windows XP x86 didn't, one of which BSODs the PC before you get into Windows... I know it seems stupid, but it's a place to start.
From memory, the standard xapp1052 DRIVER (can't speak for the Application) ran in Windows 7 x64 but had a few problems that shouldnt cause a BSOD. I can't be 100% about this though as I had made significant changes to the xapp 1052 Windows XP x86 Driver before I ported it to Windows 7 x64.
The BSOD you're getting could very well be caused by the xapp1052 Application, where there are several bugs that will cause a BSOD, but depending on your configuration may or may not occur. I cant really say what is most likely to be causing the Application to BSOD now as I had re-written 50% of the DriverMgr before it was ported to Windows 7 x64.
If you can fire up WinDBG or similar and tell me which function within the Driver is active when the PC crashes, I might be able to point you in the right direction. In saying that: If you could do a debug build of the DriverMgr DLL, attach a debugger to it, and let us know which function is causing the crashes, I may be able to shed some light. Do both and you're laughing!
If you want to have a crack at getting the driver working yourself, I would fire up WinDBG and start looking at where you're getting crashes then move on Static Driver Verifier and Driver Verifier.
Fixing the DriverMgr code shouldn't be too difficult, but I wouldn't suggest doing it without a proper debugger attached. Text won't cut it - trust me :)
Further driver fixing: Static verifier will complain about a few things in the xapp1052 driver, but I wouldn't expect any of them to be causing your BSOD. Also, Driver Verifier (Run->verifier) is an excellent way of catching bugs on the fly and is your friend (if you can get past the BSOD before windows loads...)!
And before anyone asks: sadly I'm unable to post source code, but I'm happy to give pointers if I can...
Good luck and let us know how you get on.
03-07-2012 06:55 PM - edited 03-07-2012 06:59 PM
Rather than compound driver debug with 32 to 64 bit migration on top of the relatively fewer diagnostic tools on Windows, I'm focusing on getting the Linux version working. I've also installed the card in an expresscard to pcie expansion slot on my laptop that allows me to power and program the card, then cold boot the system to ensure a clean start.
lspci -vv yields the following:
05:00.0 Memory controller: Xilinx Corporation Zomojo Z1
Subsystem: Xilinx Corporation Zomojo Z1
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
Interrupt: pin A routed to IRQ 19
Region 0: Memory at f1c00000 (32-bit, non-prefetchable) [size=1K]
Capabilities:  Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities:  MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities:  Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
Capabilities: [100 v1] Device Serial Number 00-00-00-01-01-00-0a-35
"LnkCap: Port #0, Speed 2.5GT/s, Width x1"
"LnkSta: Speed 2.5GT/s, Width x1"
seem to state the device indeed has a link. I'm currently reading through the kernel module source code and "lspci -xxx" PCI configuration space to manually verify that the link width information is there in the right place. I suspect that the originally linux kernel 2.6 module code may simply be pointing to the wrong registers. I'm trying my best to salvage this purchase.
03-08-2012 08:34 PM
Fixed it on Ubuntu. The issue was a matter of updating the drivers.
change: ioctl: XPCIe_Ioctl
and: int XPCIe_Ioctl(struct inode *inode, <BR>
struct file *filp, <BR>
unsigned int cmd,<BR>
unsigned long arg)<BR>
to: unlocked_ioctl: XPCIe_Ioctl
and: int XPCIe_Ioctl(struct file *filp, <BR>
unsigned int cmd,<BR>
unsigned long arg)<BR>
ioctl and the next solution (manual kernel locking) are both deprecated from what I read. The old 4 vs new 3 argument calls were misaligning the arguments. While I would like to move to Win7 in the future, I will not be putting this effort into those drivers. Hopefully by the time I'm ready to code the PC application, Xilinx will have updated their examples. *cough DSP cough* Let me know if anyone is unable to reproduce this fix, I'll clean up my code and post a diff patch.
05-02-2012 11:30 AM
07-27-2012 03:22 PM
Thanks sumenthus for posting the fix, I have the same issue and your solution fixes the problem but when I run xbmd_app and I try to perform DMA transfer test by slecting either write or read using the default configuration, the application closed immediatly and I got this error:
ero page size is deprecated
Floating point exception
Please did you see this error also?
08-15-2012 01:25 AM
Can i get a copy of your driver code for xapp1052 on Win7? i want to test Xilinx PCIe on Win7. Win XP is outdated and the driver seems unstable.
My email is patrickyip0 at gmail dot com
08-23-2012 05:00 PM
Wondering if anyone got and solution for Win7 driver.
I have vanilla driver installed the way you described but get a BSOD, looking into Windbg stack says it asserted in USBHUB driver. While I am trying to decode and relate to my code any pointers on where I should focus for Win7 would help, if you are able to share any section of code that is really great!
Appreciate your time.