PDA

View Full Version : Execution segment violation with a driver



ZerBit
08-28-2003, 08:17 AM
Hi all

I have developed an application with the a PCI Board. I have
used Knoppix (Debian unstable) in a Athlon 1.4 machine and I donīt
have any problems. It works perfectly. Then I have bought a VIA EPIA M-
10000 Ezra board. I have installed Knoppix in that board without problems. I also have tried to mknode and insmod and it has been installed, but when i try to run the demo application i have a segment violation. It says that it has an invalid operation.

I have debugged (as far as i can, not so far ) and i have put
several printk lines and define DEBUG. I have seen that ioctl is
called with a command (cmd) and a pciscan is execute (it works OK, it detects 1 PCI Card) until it calls PUT_DATA macro.

#define PUT_DATA(dtype) copy_to_user((dtype *)arg,(dtype *)&Buf,sizeof(dtype))

Here i have the segment violation and i donīt know why it happens.

Could you give me an idea?

The EPIA board has not full speed in floating point operation only has
a half-speed FPU. The driver doesnīt use it.

Some i686 instructions are not implemented on the EPIA ezra. Could this be a reason? I have compiled the driver as follows :

driver.o: driver.c
gcc -Wall -O -DMODULE -D__KERNEL__ -DLINUX -c driver.c

Could i add another flags?

You could find more info in this link.

http://forums.viaarena.com/messageview.cfm?catid=28&threadid=43817


Thanks in advance.

Juan Carlos