From: Gabriele Moabiti <gabmoa@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] trap exceptions in user
Date: Fri, 10 Oct 2008 15:24:29 +0000 (GMT) [thread overview]
Message-ID: <819144.28662.qm@domain.hid> (raw)
[-- Attachment #1: Type: text/plain, Size: 2535 bytes --]
> Where does custom_except leaves, in kernel-space or user-space ?
I have called rthal_trap_catch in the init function of the KD.
I have tried also in a rt task inside KD.
>> - KD has an rtdm interface to map the 16 MB memory on user space with
>> rtdm_iomap_to_user.
>> - UD starts and It maps with the rtdm (rtdm_iomap_to_user)
>
>This is completely useless. You can use an anonymous mapping in
>user-space, you will not need the help from an rtdm driver. And your
>mapping needs to be executable (you need to pass PROT_EXEC to mmap).
>>
>> - UD copy a binary asm x86 test fpu (some instructions to generate
>> exceptions for tests) in the 16 MB memory mapped
>
>If you do that, your binary needs to be relocatable, that is its code
>must not depend on the address at which it is loaded. Are you sure your
>binary blob has this property ?
It's a long story... I know anonymous mapping is better but I have need physical contiguos memory
(not for the test of course). The binary blob has fixed addresses between 1 to 16 MB so I have mapped the first 15 MB of the UD (starting to 1 MB). I Know it is very strange...
>>
>> - UD start the real time task
>>
>> Now here is a the problem. If I invoke an exception (int 3, floating
>> point exception and so on) outside the 16 MB mapped 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
>> description of the exception in the terminal (also this is ok) but
>> "custom_except" is not called!
>
>Who reports the exception, then ?
I start UD from the terminal and the terminal always report the right error.
>Are you sure the exception reported is
>the one you expect ?
Yes, I tried floating point, debug (int 3), page fault..
>IOW, are you sure the problem is not that your
>memory mapping is not executable ?
The PROT_EXEC flag is set.
If I try to execute some instructions It works.
>> Is there something wrong using the mapped memory in this mode?
>> NOTE: I am using xenomai 2.4.0rc1 with kernel 2.6.23
>>Is this a joke ? Why choosing a release candidate of a release which
>>happened since then ? Why not using the latest stable release ?
you are right. It will be better to use the latest one (not rc). I had an already patched kernel
(with an other working xenomai application)
Gabriele
Scopri il blog di Yahoo! Mail:
Trucchi, novità e scrivi la tua opinione.
http://www.ymailblogit.com/blog
[-- Attachment #2: Type: text/html, Size: 3311 bytes --]
next reply other threads:[~2008-10-10 15:24 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 15:24 Gabriele Moabiti [this message]
2008-10-10 15:38 ` [Xenomai-help] trap exceptions in user Gilles Chanteperdrix
-- strict thread matches above, loose matches on Subject: below --
2008-10-24 19:17 Gabriele Moabiti
2008-10-26 23:49 ` Gilles Chanteperdrix
2008-10-24 15:30 Gabriele Moabiti
2008-10-24 13:53 Gabriele Moabiti
2008-10-24 17:43 ` Gilles Chanteperdrix
2008-10-24 17:44 ` Gilles Chanteperdrix
2008-10-15 15:30 Gabriele Moabiti
2008-10-15 15:39 ` Jan Kiszka
2008-10-14 10:01 Gabriele Moabiti
2008-10-14 10:21 ` Jan Kiszka
2008-10-14 12:13 ` Gilles Chanteperdrix
2008-10-13 9:55 Gabriele Moabiti
2008-10-11 19:32 Gabriele Moabiti
2008-10-11 19:34 ` Gilles Chanteperdrix
2008-10-11 21:35 ` Philippe Gerum
2008-10-10 17:57 Gabriele Moabiti
2008-10-10 16:02 Gabriele Moabiti
2008-10-10 16:04 ` Gilles Chanteperdrix
2008-10-11 11:24 ` Gilles Chanteperdrix
2008-10-10 13:50 Gabriele Moabiti
2008-10-10 14:00 ` Gilles Chanteperdrix
2008-10-08 11:32 Gabriele Moabiti
2008-10-08 12:29 ` Gilles Chanteperdrix
2008-10-08 10:34 Gabriele Moabiti
2008-10-08 10:50 ` Gilles Chanteperdrix
[not found] <296620.67855.qm@domain.hid>
2008-10-08 10:09 ` Gilles Chanteperdrix
2008-10-03 12:30 Gabriele Moabiti
2008-10-03 14:58 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=819144.28662.qm@domain.hid \
--to=gabmoa@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.