All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] first module help
@ 2011-04-22  6:52 Aurele Traynard
  2011-04-22  7:19 ` Gilles Chanteperdrix
  2011-04-22  9:01 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 8+ messages in thread
From: Aurele Traynard @ 2011-04-22  6:52 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

hello,

I am new in xenomai, I am trying to make a module to read a "FPGA register"
who is on the "data bus".
without xenomai I use "ioremap" and "readl/writel" but with xenomai those
doesn't work...

so i would like to know how i could read this register?
i would like to know if there is a book i could read?
i would like to know if a rt_task can read/write memory allocated by the
kernel ("kmalloc")?
i would like to know if there are any forums where i could find any help?

i would like to know a lots of things...
thanks for any help

Aurèle

PS : http://www.captain.at/xenomai.php is dead...

[-- Attachment #2: Type: text/html, Size: 756 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai-help] first module help
  2011-04-22  6:52 [Xenomai-help] first module help Aurele Traynard
@ 2011-04-22  7:19 ` Gilles Chanteperdrix
  2011-04-22  9:01 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2011-04-22  7:19 UTC (permalink / raw)
  To: Aurele Traynard; +Cc: xenomai

Aurele Traynard wrote:
> hello,
> 
> I am new in xenomai, I am trying to make a module to read a "FPGA register"
> who is on the "data bus".
> without xenomai I use "ioremap" and "readl/writel" but with xenomai those
> doesn't work...

How do you mean they do not work? If they did not work, your kernel
would probably not even boot...

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai-help] first module help
  2011-04-22  6:52 [Xenomai-help] first module help Aurele Traynard
  2011-04-22  7:19 ` Gilles Chanteperdrix
@ 2011-04-22  9:01 ` Gilles Chanteperdrix
  2011-04-22 12:49   ` Aurele Traynard
       [not found]   ` <BANLkTikNWeDdRMXFN=gHK=sQshMgP-=y5w@domain.hid>
  1 sibling, 2 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2011-04-22  9:01 UTC (permalink / raw)
  To: Aurele Traynard; +Cc: xenomai

Aurele Traynard wrote:
> hello,
> 
> I am new in xenomai, I am trying to make a module to read a "FPGA register"
> who is on the "data bus".
> without xenomai I use "ioremap" and "readl/writel" but with xenomai those
> doesn't work...
>
> so i would like to know how i could read this register?
> i would like to know if there is a book i could read?


Ok. No answer, I probably started on the wrong foot. First, you should
read the documents here:

http://www.xenomai.org/index.php/Publications
http://www.xenomai.org/index.php/Included_documentation_summary

More generally, we try to have most ressources in the wiki
http://www.xenomai.org

Then, you will understand that your question is a bit vague. I recently
answered the more precise question which you will probably have after
you have read all this, see:
https://mail.gna.org/public/xenomai-help/2011-04/msg00059.html

> i would like to know if a rt_task can read/write memory allocated by the
> kernel ("kmalloc")?

Yes, it can.

> i would like to know if there are any forums where i could find any help?
> 
> i would like to know a lots of things...


This list is the right place to ask, but please take care of reading the
documentation and especially the FAQ, in order to avoid asking questions
 which have already been asked.

http://www.xenomai.org/index.php/FAQs


> thanks for any help
> 
> Aurèle
> 
> PS : http://www.captain.at/xenomai.php is dead...

This site is not Xenomai website, so, there is nothing we can do about it.


-- 
					    Gilles.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai-help] first module help
  2011-04-22  9:01 ` Gilles Chanteperdrix
@ 2011-04-22 12:49   ` Aurele Traynard
       [not found]   ` <BANLkTikNWeDdRMXFN=gHK=sQshMgP-=y5w@domain.hid>
  1 sibling, 0 replies; 8+ messages in thread
From: Aurele Traynard @ 2011-04-22 12:49 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 2148 bytes --]

ok i'm sorry i wasn't clear at all...
my problem is : when i call readl in a rt_task, the task is stopped...
(maybe because the rt_task is launched in a module?)
"Xenomai: suspending kernel thread bf0041c8 ('test_rt') at 0xbf003824 after
exception #0"
if i remove the readl there is no problem

With a normal Linux, in a module there isn't any problem

thanks

2011/4/22 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>

> Aurele Traynard wrote:
> > hello,
> >
> > I am new in xenomai, I am trying to make a module to read a "FPGA
> register"
> > who is on the "data bus".
> > without xenomai I use "ioremap" and "readl/writel" but with xenomai those
> > doesn't work...
> >
> > so i would like to know how i could read this register?
> > i would like to know if there is a book i could read?
>
>
> Ok. No answer, I probably started on the wrong foot. First, you should
> read the documents here:
>
> http://www.xenomai.org/index.php/Publications
> http://www.xenomai.org/index.php/Included_documentation_summary
>
> More generally, we try to have most ressources in the wiki
> http://www.xenomai.org
>
> Then, you will understand that your question is a bit vague. I recently
> answered the more precise question which you will probably have after
> you have read all this, see:
> https://mail.gna.org/public/xenomai-help/2011-04/msg00059.html
>
> > i would like to know if a rt_task can read/write memory allocated by the
> > kernel ("kmalloc")?
>
> Yes, it can.
>
> > i would like to know if there are any forums where i could find any help?
> >
> > i would like to know a lots of things...
>
>
> This list is the right place to ask, but please take care of reading the
> documentation and especially the FAQ, in order to avoid asking questions
>  which have already been asked.
>
> http://www.xenomai.org/index.php/FAQs
>
>
> > thanks for any help
> >
> > Aurèle
> >
> > PS : http://www.captain.at/xenomai.php is dead...
>
> This site is not Xenomai website, so, there is nothing we can do about it.
>
>
> --
>                                             Gilles.
>
>

[-- Attachment #2: Type: text/html, Size: 3233 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai-help] first module help
       [not found]   ` <BANLkTikNWeDdRMXFN=gHK=sQshMgP-=y5w@domain.hid>
@ 2011-04-22 13:15     ` Gilles Chanteperdrix
  2011-04-22 13:42       ` Aurele Traynard
  0 siblings, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2011-04-22 13:15 UTC (permalink / raw)
  To: Aurele Traynard; +Cc: Xenomai help

Aurele Traynard wrote:
> ok i'm sorry i wasn't clear at all...
> my problem is : when i call readl in a rt_task, the task is stopped...
> (maybe because the rt_task is launched in a module?)
> "Xenomai: suspending kernel thread bf0041c8 ('test_rt') at 0xbf003824 after
> exception #0"
> if i remove the readl there is no problem
> 
> With a normal Linux, in a module there isn't any problem

On what platform? I can think of two things:
- the platform you use maps the ioremaped memory on-demand (x86 and ARM
at least do not allow this, but I do not know about other platforms)
- you are making an unaligned access, it works with Linux because it has
a handler for handling unaligned accesses, whereas Xenomai default
handler is to simply suspend a task doing this kind of things.

Please do not forget to CC the mailing list.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai-help] first module help
  2011-04-22 13:15     ` Gilles Chanteperdrix
@ 2011-04-22 13:42       ` Aurele Traynard
  2011-04-22 14:20         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 8+ messages in thread
From: Aurele Traynard @ 2011-04-22 13:42 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Xenomai help

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

2011/4/22 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>

> Aurele Traynard wrote:
> > ok i'm sorry i wasn't clear at all...
> > my problem is : when i call readl in a rt_task, the task is stopped...
> > (maybe because the rt_task is launched in a module?)
> > "Xenomai: suspending kernel thread bf0041c8 ('test_rt') at 0xbf003824
> after
> > exception #0"
> > if i remove the readl there is no problem
> >
> > With a normal Linux, in a module there isn't any problem
>
> On what platform? I can think of two things:
> - the platform you use maps the ioremaped memory on-demand (x86 and ARM
> at least do not allow this, but I do not know about other platforms)
> - you are making an unaligned access, it works with Linux because it has
> a handler for handling unaligned accesses, whereas Xenomai default
> handler is to simply suspend a task doing this kind of things.
>
> Please do not forget to CC the mailing list.
>
> --
>                                             Gilles.
>
I'm working with PXA270 (ARMv5te), FPGA's registers physicaly are mapped as
CPU's registers... so it is alligned (i read 0x040001C0 and i use a 32bits
integer....)
so if i understand it should work...

thanks

[-- Attachment #2: Type: text/html, Size: 1637 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai-help] first module help
  2011-04-22 13:42       ` Aurele Traynard
@ 2011-04-22 14:20         ` Gilles Chanteperdrix
  2011-04-22 15:11           ` Aurele Traynard
  0 siblings, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2011-04-22 14:20 UTC (permalink / raw)
  To: Aurele Traynard; +Cc: Xenomai help

Aurele Traynard wrote:
> 2011/4/22 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> 
>> Aurele Traynard wrote:
>>> ok i'm sorry i wasn't clear at all...
>>> my problem is : when i call readl in a rt_task, the task is stopped...
>>> (maybe because the rt_task is launched in a module?)
>>> "Xenomai: suspending kernel thread bf0041c8 ('test_rt') at 0xbf003824
>> after
>>> exception #0"
>>> if i remove the readl there is no problem
>>>
>>> With a normal Linux, in a module there isn't any problem
>> On what platform? I can think of two things:
>> - the platform you use maps the ioremaped memory on-demand (x86 and ARM
>> at least do not allow this, but I do not know about other platforms)
>> - you are making an unaligned access, it works with Linux because it has
>> a handler for handling unaligned accesses, whereas Xenomai default
>> handler is to simply suspend a task doing this kind of things.
>>
>> Please do not forget to CC the mailing list.
>>
>> --
>>                                             Gilles.
>>
> I'm working with PXA270 (ARMv5te), FPGA's registers physicaly are mapped as
> CPU's registers... so it is alligned (i read 0x040001C0 and i use a 32bits
> integer....)
> so if i understand it should work...

Are you sure 0x040001C0 is a virtual address?

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai-help] first module help
  2011-04-22 14:20         ` Gilles Chanteperdrix
@ 2011-04-22 15:11           ` Aurele Traynard
  0 siblings, 0 replies; 8+ messages in thread
From: Aurele Traynard @ 2011-04-22 15:11 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Xenomai help

[-- Attachment #1: Type: text/plain, Size: 1827 bytes --]

2011/4/22 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>

> Aurele Traynard wrote:
> > 2011/4/22 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> >
> >> Aurele Traynard wrote:
> >>> ok i'm sorry i wasn't clear at all...
> >>> my problem is : when i call readl in a rt_task, the task is stopped...
> >>> (maybe because the rt_task is launched in a module?)
> >>> "Xenomai: suspending kernel thread bf0041c8 ('test_rt') at 0xbf003824
> >> after
> >>> exception #0"
> >>> if i remove the readl there is no problem
> >>>
> >>> With a normal Linux, in a module there isn't any problem
> >> On what platform? I can think of two things:
> >> - the platform you use maps the ioremaped memory on-demand (x86 and ARM
> >> at least do not allow this, but I do not know about other platforms)
> >> - you are making an unaligned access, it works with Linux because it has
> >> a handler for handling unaligned accesses, whereas Xenomai default
> >> handler is to simply suspend a task doing this kind of things.
> >>
> >> Please do not forget to CC the mailing list.
> >>
> >> --
> >>                                             Gilles.
> >>
> > I'm working with PXA270 (ARMv5te), FPGA's registers physicaly are mapped
> as
> > CPU's registers... so it is alligned (i read 0x040001C0 and i use a
> 32bits
> > integer....)
> > so if i understand it should work...
>
> Are you sure 0x040001C0 is a virtual address?
>
> --
>                                             Gilles.
>
I'm sure it is not a virtual address. It is the physical address.
I use "ioremap" and after i use the value given by "ioremap" in "readl"

I apologize I realized my mistake thanks to you... it wasn't in any case
from Xenomai (I just launch the task too early...)

Thanks a lot for your time.
Aurèle

[-- Attachment #2: Type: text/html, Size: 3072 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-22 15:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-22  6:52 [Xenomai-help] first module help Aurele Traynard
2011-04-22  7:19 ` Gilles Chanteperdrix
2011-04-22  9:01 ` Gilles Chanteperdrix
2011-04-22 12:49   ` Aurele Traynard
     [not found]   ` <BANLkTikNWeDdRMXFN=gHK=sQshMgP-=y5w@domain.hid>
2011-04-22 13:15     ` Gilles Chanteperdrix
2011-04-22 13:42       ` Aurele Traynard
2011-04-22 14:20         ` Gilles Chanteperdrix
2011-04-22 15:11           ` Aurele Traynard

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.