<HTML><HEAD>
<META http-equiv=Content-Type content='text/html; charset=windows-1252'>
<title>Samsung Enterprise Portal mySingle</title>
<style> P, td, li {font-family:Arial, arial; font-size:9pt; margin-top:5px;margin-bottom:5px;}</style>
</HEAD><BODY><p><p>
Hello,
<p>I am working on a character driver for reading and writing the registers
to FPGA in our system.</p>
<p>I am using driver ioctl to read/write to these registers of FPGA. As the
function call to the ioctl is being made, the printk trace shows that the call
goes to switch->copy_from_user. As soon as the call is made to copy_from_user,
the kernel crashes</p>
<p>Can someone help me with this problem?</p>
<p> </p>
<p>***************************************************************************************************</p>
<p> Unhandled kernel unaligned access in unaligned.c::emulate_load_store_insn,
line 483</p>
<p>:</p>
<p>$0 : 00000000 10001f00 8fbf0034 02a01021 801157a0 8fe8e000 10001f00 ffff00ff</p>
<p>$8 : 8fe8ffe0 00001f00 00000000 00000003 74652053 8fe9fed8 0000000a 50434942</p>
<p>$16: 10001f01 00000001 801157a0 0000000f 8fe8fee8 00000104 00000000 0000000f</p>
<p>$24: 00000000 2ac0fdb0 8fe8e000
8fe8fe38 00000001 8012010c</p>
<p>Hi : 00000000</p>
<p>Lo : 00000000</p>
<p>epc : 8011f774 Tainted: GF</p>
<p>Status: 10001f02</p>
<p>Cause : 00800014</p>
<p>Process rsgbm (pid: 317, stackpage=8fe8e000)</p>
<p>Stack: 802d920a 0000000a 10001f01 0000003c 10001f01 0000003c
8012010c</p>
<p> 80120104 caa8f356 8fe82008 8fe82000 0000000f 00000000 7fff7d00 7fff7d00</p>
<p> 0000c001 00000003 10012808 ffffffff caa8e548 00004000 8fe9e272 00000150</p>
<p> 7fff7d00 ffffffea 00000000 00000240 8fe82000 00000000 00000001 00000001</p>
<p> 7ebff310 00000000 0000000f 8fef24e0 00000004 7ebff3e8 00000000 0000002e</p>
<p> 80159c6c ...</p>
<p>Call Trace: [<8012010c>] [<80120104>] [<caa8f356>]
[<caa8e548>] [<80159c6c>]</p>
<p> [<8010a5c4>] [<80271dc4>]</p>
<p> </p>
<p>Code: 8c820004 24110001 ac430000 <ac620004> ac800000 ac800004
ac800000 ac800004</p>
<p> 8f820004</p>
<p> </p>
<p>Unit Fault Handler !!! (INDEX=10)</p>
<p>**************************************************************************************************</p>
<p>int</p>
<p>chr1_ioctl(struct inode *ino, struct file *filp, unsigned int cmd,</p>
<p> unsigned long arg)</p>
<p>{</p>
<p> int ret = 0;</p>
<p> n2_debug_rw_reg *dw;</p>
<p> </p>
<p> switch(cmd)</p>
<p> {</p>
<p> case IOCTL_WIN_DEBUG_READ_CODE:</p>
<p> {</p>
<p> n2_debug_rw_reg test;</p>
<p> printk("%s %d\n",
current->comm, current->pid);</p>
<p> printk("%lx\n",
arg);</p>
<p> copy_from_user(&test,
(n2_debug_rw_reg*)arg, sizeof(n2_debug_rw_reg));</p>
<p> printk("%lx %lx\n",
((n2_debug_rw_reg*)arg)->data, ((n2_debug_rw_reg*)arg)-></p>
<p>addr);</p>
<p> }</p>
<p>}</p>
<p>}</p>
<p> </p>
<p>Thanks & Regards,</p>
<p>--Murahari</p></BODY></HTML>