* [Xenomai-help] Segfault inb
@ 2006-09-06 16:38 Ignacio García Pérez
2006-09-06 16:41 ` Gilles Chanteperdrix
0 siblings, 1 reply; 2+ messages in thread
From: Ignacio García Pérez @ 2006-09-06 16:38 UTC (permalink / raw)
To: xenomai
Hi,
There must be something very obvious I'm missing, yet I don't know why
and I'm stuck.
I've got a very simple program that starts a simple periodic task that
reads from port 0x281 at 2KHz. When the inb(0x281) is executed my
program segfaults. If I comment that code, everything works fine (the
periodic task executes as expected).
In my initialization code, I've remembered to:
iopl(3)
mlockall(MCL_CURRENT | MCL_FUTURE)
rt_misc_get_io_region
Even tried to issue the iopl(3) again from the periodic task itself. No way.
I'm using kernel 2.6.17.11 and Xenomai v2.2.2.
Regards.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-help] Segfault inb
2006-09-06 16:38 [Xenomai-help] Segfault inb Ignacio García Pérez
@ 2006-09-06 16:41 ` Gilles Chanteperdrix
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2006-09-06 16:41 UTC (permalink / raw)
To: Ignacio García Pérez; +Cc: xenomai
Ignacio García Pérez wrote:
> Hi,
>
> There must be something very obvious I'm missing, yet I don't know why
> and I'm stuck.
>
> I've got a very simple program that starts a simple periodic task that
> reads from port 0x281 at 2KHz. When the inb(0x281) is executed my
> program segfaults. If I comment that code, everything works fine (the
> periodic task executes as expected).
>
> In my initialization code, I've remembered to:
>
> iopl(3)
> mlockall(MCL_CURRENT | MCL_FUTURE)
> rt_misc_get_io_region
>
> Even tried to issue the iopl(3) again from the periodic task itself. No way.
>
> I'm using kernel 2.6.17.11 and Xenomai v2.2.2.
Do you check the return values of iopl and mlockall ?
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-06 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-06 16:38 [Xenomai-help] Segfault inb Ignacio García Pérez
2006-09-06 16:41 ` Gilles Chanteperdrix
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.