From: Gabriele Moabiti <gabmoa@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] floating point (int 16) exception
Date: Fri, 31 Oct 2008 18:41:19 +0000 (GMT) [thread overview]
Message-ID: <125728.91697.qm@domain.hid> (raw)
In-Reply-To: 490B3E58.3010206@domain.hid
[-- Attachment #1: Type: text/plain, Size: 1847 bytes --]
>You mean you want to handle a division by zero without ending the
>program, and without even switching to secondary mode? Then in this
>case, I am afraid you are on your own.
mmm... it's better if i explain the scenario to make sense.
I am developing a driver for a CNC using xenomai.
Now this cnc run on dos/win (and linux) and the real-time is based on nmi (with
a pci card generate the nmi @ 0.125 us - 2ms attached to the peripherals and servodrives).
Now we want to switch to linux only changing the pci cart with an eth card and rtnet to
communicate.
I have already done the ring 0 driver on linux (on windows is very similar) in a the *orrible* way (I know!),
reprogramming the IDT and using cli and sti and using using xenomai only for small task
but we want to use rtnet so I have to better integrate into the xenomai context and
the only way to do it proper is to shift cnc to user rt domain.
(NOTE: it's a long story but cnc, written in asm x86 (500k) need to take the first 16 MB and this
is done with dirty tricks on gdt on ring 0, absolutely incompatible with linux/xenomai but
in ring 3 with some mapping this problems disappears of course)
The cnc need to take different decisions on fpu exceptions:
1) the intel defaults actions on masked fpu exceptions aren't right for cnc
2) an exception sometimes can occur but this must not stop cnc!
(the cnc register the problem continue if it can be resumed)
So custom exceptions handling is *really* needed.
However I think a robust hard real time application may need to remain in rt even if an
fpu exception is raised and a custom exception handling is not so strange.
Gabriele
Unisciti alla community di Io fotografo e video, il nuovo corso di fotografia di Gazzetta dello sport:
http://www.flickr.com/groups/iofotografoevideo
[-- Attachment #2: Type: text/html, Size: 2419 bytes --]
prev parent reply other threads:[~2008-10-31 18:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-31 16:26 [Xenomai-help] floating point (int 16) exception Gabriele Moabiti
2008-10-31 16:31 ` Gilles Chanteperdrix
2008-10-31 16:47 ` Gabriele Moabiti
2008-10-31 16:52 ` Gilles Chanteperdrix
2008-10-31 17:15 ` Gabriele Moabiti
2008-10-31 17:20 ` Gilles Chanteperdrix
2008-10-31 18:41 ` Gabriele Moabiti [this message]
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=125728.91697.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.