From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 10 Oct 2008 13:50:36 +0000 (GMT) From: Gabriele Moabiti MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1742083866-1223646636=:70429" Message-ID: <39918.70429.qm@domain.hid> Subject: Re: [Xenomai-help] trap exceptions in user 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-1742083866-1223646636=:70429 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A=0A> Xenomai uses rthal_trap_catch, so, you can use Xenomai code as an e= xample.=0A=0ANamed=0AKD: kernel driver (ring 0).=0AUD: user space task (rin= g 3).=0A=0A- KD reserve 16 MB of memory (note: virtual and physical contig= uous)=0A=0A- I use rthal_trap_catch to customize exceptions (redirected to = "custom_except" function)=0A The "custom_except" function print the number= of exception and recall the xenomai standard one.=0A=0A- KD has an rtdm in= terface to map the 16 MB memory on user space with rtdm_iomap_to_user.=0A= =0A- UD starts and It maps with the rtdm (rtdm_iomap_to_user)=0A=0A- UD cop= y a binary asm x86 test fpu (some instructions to generate exceptions for t= ests) in the 16 MB memory mapped=0A=0A- UD start the real time task=0A=0ANo= w here is a the problem.=0AIf I invoke an exception (int 3, floating point = exception and so on) outside the 16 MB mapped memory "custom_except" is cal= led ok.=0AIf the same code is invoked into the 16 MB mapped memory the prog= ram crash (and this is ok) reporting the description of the exception in th= e terminal (also this is ok) but "custom_except" is not called!=0A=0AIs the= re something wrong using the mapped memory in this mode?=0A=0ANOTE:=0AI am = using xenomai 2.4.0rc1 with kernel 2.6.23=0A=0A=0A Scopri il blog di Y= ahoo! Mail:=0ATrucchi, novit=C3=A0 e scrivi la tua opinione.=0Ahttp://www.y= mailblogit.com/blog --0-1742083866-1223646636=:70429 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

> Xenomai uses rthal_trap_catch, so, you can use Xenomai code as an e= xample.

Named
KD: kernel driver (ring 0).
UD: user space task = (ring 3).

- KD reserve 16 MB  of memory (note: virtual and phys= ical contiguous)

- I use rthal_trap_catch to customize exceptions (r= edirected to "custom_except" function)
  The "custom_except" functi= on print the number of exception and recall the xenomai standard one.
- KD has an rtdm interface to map the 16 MB memory on user space with rtd= m_iomap_to_user.

- UD starts and It maps with the rtdm (rtdm_iomap_t= o_user)

- UD copy a binary asm x86 test fpu (some instructions to generate exceptions for tests) in the 16 MB memory mapped

- UD star= t the real time task

Now here is a the problem.
If I invoke an ex= ception (int 3, floating point exception and so on) outside the 16 MB mappe= d memory "custom_except" is called ok.
If the same code is invoked into = the 16 MB mapped memory the program crash (and this is ok) reporting the de= scription of the exception in the terminal (also this is ok) but "custom_ex= cept" is not called!

Is there something wrong using the mapped memor= y in this mode?

NOTE:
I am using xenomai 2.4.0rc1 with kernel 2.6= .23


=0A=0A=0A=0A
Scopri il Blog di Yahoo! Mail: trucchi, novit=C3=A0, consigli... e scrivi= la tua opinione! --0-1742083866-1223646636=:70429--