From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 6 Nov 2008 14:02:07 +0000 (GMT) From: Gabriele Moabiti MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1939125318-1225980127=:36286" Message-ID: <184467.36286.qm@domain.hid> Subject: Re: [Xenomai-help] the exception saga - system hangs List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: Xenomai help --0-1939125318-1225980127=:36286 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A>> __asm__ __volatile__("nop; movl %dr7, %eax;nop");=0A>=0A>This pie= ce of inline assembly is incorrect, you should mark as output=0A>register t= he registers you clobber.=0A=0A*ops* I'm not very skilled in Gnu asm=0AThe = user task asm istruction is used only to raise an exception (CPL=3D0 only),= =0Abut I can change the example:=0A=0Ainsted of the that asm line i write = =0A__asm__ __volatile__(nop; clts;nop;);=0A=0Aand in the kernel module I ch= ange the check=0A=0A- if (*istr =3D=3D 0x210f && (*(istr+1) & 0xFF) =3D=3D = 0xf8) { // movl %dr7, %eax=0A- regs->x86reg_ip+=3D3;=0A+if (*istr =3D= =3D 0x060f) { /* clts */=0A+ regs->x86reg_ip+=3D2;=0A=0Athe behaviour is= always the same... after some loops system hang=0A(tested with turned on a= nd off all debug options of xenomai)=0A=0A Gabriele=0A=0A=0A Unisciti = alla community di Io fotografo e video, il nuovo corso di fotografia di Gaz= zetta dello sport:=0Ahttp://www.flickr.com/groups/iofotografoevideo --0-1939125318-1225980127=:36286 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
<= div style=3D"font-family: arial,helvetica,sans-serif; font-size: 10pt;">>>    __asm__ __volatile__("nop; movl %dr7, %eax;nop");>
>This piece of inline assembly is incorrect, you should mark a= s output
>register the registers you clobber.

*ops* I'm not ve= ry skilled in Gnu asm
The user task asm istruction is used only to raise= an exception (CPL=3D0 only),
but I can change the example:

inste= d of the that asm line i write
__asm__ __volatile__(nop; clts;nop;);
and in the kernel module I change the check

- if (*istr =3D=3D = 0x210f && (*(istr+1) & 0xFF) =3D=3D 0xf8) { // movl %dr7, %eax
-      regs->x86reg_ip+=3D3;
+if (*= istr =3D=3D 0x060f) { /* clts */
+    regs->x86reg_ip+= =3D2;

the behaviour is always the same... after some loops system ha= ng
(tested with turned on and off all debug options of xenomai)

&= nbsp;Gabriele


=0A=0A=0A=0A
Scopri la community di Io fotografo e = video
=0AIl nuovo corso di Gazze= tta dello sport per diventare veri fotografi!
--0-1939125318-1225980127=:36286--