* [Xenomai-core] Xenomai on PXA255
@ 2006-05-25 10:59 Bart Jonkers
2006-05-29 13:19 ` Jan Kiszka
2006-05-29 14:00 ` Gilles Chanteperdrix
0 siblings, 2 replies; 7+ messages in thread
From: Bart Jonkers @ 2006-05-25 10:59 UTC (permalink / raw)
To: xenomai
Hey,
I'm trying to run Xenomai enabled kernel on the PXA255 (arm). When I
compile the patched kernel, I get some undefined references errors.
When I search through the patched kernel, I found the functions an
variables defined for the integrator architecture.
Which functions and variables need I to define for the PXA255 and what
are there purpose, so I can add support for the PXA255 processor.
Or are there some patches around to support the PXA255.
Thanks,
Bart
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Xenomai on PXA255
2006-05-25 10:59 [Xenomai-core] Xenomai on PXA255 Bart Jonkers
@ 2006-05-29 13:19 ` Jan Kiszka
2006-05-29 14:00 ` Gilles Chanteperdrix
1 sibling, 0 replies; 7+ messages in thread
From: Jan Kiszka @ 2006-05-29 13:19 UTC (permalink / raw)
To: Bart Jonkers; +Cc: ROSSIER Daniel, xenomai
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
Bart Jonkers wrote:
> Hey,
>
> I'm trying to run Xenomai enabled kernel on the PXA255 (arm). When I
> compile the patched kernel, I get some undefined references errors.
> When I search through the patched kernel, I found the functions an
> variables defined for the integrator architecture.
>
> Which functions and variables need I to define for the PXA255 and what
> are there purpose, so I can add support for the PXA255 processor.
> Or are there some patches around to support the PXA255.
The guru (Philippe) is not in the house, but I put those two guys on the
CC who contributed a lot of ARM code. Maybe someone can comment on the
required adoptions (I'm no ARM expert).
You may furthermore speed up the discussion by naming the undefined
symbols to motivate other patch authors to explain their meanings.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Xenomai on PXA255
2006-05-25 10:59 [Xenomai-core] Xenomai on PXA255 Bart Jonkers
2006-05-29 13:19 ` Jan Kiszka
@ 2006-05-29 14:00 ` Gilles Chanteperdrix
2006-05-29 14:14 ` Bart Jonkers
1 sibling, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2006-05-29 14:00 UTC (permalink / raw)
To: Bart Jonkers; +Cc: xenomai
Bart Jonkers wrote:
> Hey,
>
> I'm trying to run Xenomai enabled kernel on the PXA255 (arm). When I
> compile the patched kernel, I get some undefined references errors.
> When I search through the patched kernel, I found the functions an
> variables defined for the integrator architecture.
>
> Which functions and variables need I to define for the PXA255 and what
> are there purpose, so I can add support for the PXA255 processor.
> Or are there some patches around to support the PXA255.
The Ipipe patch for ARM only support the integrator platform for
now. There exist patch for another ARM platform, but it exist only as
a separated patch. Looking at the patch contents it seems that the only
patched files specific to the integrator architecture are :
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/integrator_cp.c
include/asm-arm/arch-integrator/entry-macro.S
include/asm-arm/arch-integrator/platform.h
include/asm-arm/arch-integrator/timex.h
Looking rapidly at these files, it seems that the machine specific
functions and variables are reduced to:
int __ipipe_mach_timerint;
int __ipipe_mach_timerstolen;
unsigned int __ipipe_mach_ticks_per_jiffy;
void __ipipe_mach_acktimer(void);
unsigned long long __ipipe_mach_get_tsc(void);
void __ipipe_mach_set_dec(unsigned long reload);
unsigned long __ipipe_mach_get_dec(void);
If you provide the same variables and functions for the PXA platform, I
think there is no modification to be done at Xenomai level.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Xenomai on PXA255
2006-05-29 14:00 ` Gilles Chanteperdrix
@ 2006-05-29 14:14 ` Bart Jonkers
2006-05-29 14:45 ` Stelian Pop
0 siblings, 1 reply; 7+ messages in thread
From: Bart Jonkers @ 2006-05-29 14:14 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Mon, 2006-05-29 at 16:00 +0200, Gilles Chanteperdrix wrote:
> Bart Jonkers wrote:
> > Hey,
> >
> > I'm trying to run Xenomai enabled kernel on the PXA255 (arm). When I
> > compile the patched kernel, I get some undefined references errors.
> > When I search through the patched kernel, I found the functions an
> > variables defined for the integrator architecture.
> >
> > Which functions and variables need I to define for the PXA255 and what
> > are there purpose, so I can add support for the PXA255 processor.
> > Or are there some patches around to support the PXA255.
>
> The Ipipe patch for ARM only support the integrator platform for
> now. There exist patch for another ARM platform, but it exist only as
> a separated patch. Looking at the patch contents it seems that the only
> patched files specific to the integrator architecture are :
> arch/arm/mach-integrator/core.c
> arch/arm/mach-integrator/integrator_cp.c
> include/asm-arm/arch-integrator/entry-macro.S
> include/asm-arm/arch-integrator/platform.h
> include/asm-arm/arch-integrator/timex.h
>
> Looking rapidly at these files, it seems that the machine specific
> functions and variables are reduced to:
>
> int __ipipe_mach_timerint;
> int __ipipe_mach_timerstolen;
> unsigned int __ipipe_mach_ticks_per_jiffy;
>
> void __ipipe_mach_acktimer(void);
> unsigned long long __ipipe_mach_get_tsc(void);
> void __ipipe_mach_set_dec(unsigned long reload);
> unsigned long __ipipe_mach_get_dec(void);
>
> If you provide the same variables and functions for the PXA platform, I
> think there is no modification to be done at Xenomai level.
I found this out already. But it would be a easier to implement this
functions if I know what they have to do. So could somebody give an
explanation of this variables and functions?
Thanks,
Bart
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Xenomai on PXA255
2006-05-29 14:14 ` Bart Jonkers
@ 2006-05-29 14:45 ` Stelian Pop
2006-05-29 15:45 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Stelian Pop @ 2006-05-29 14:45 UTC (permalink / raw)
To: Bart Jonkers; +Cc: xenomai
Le lundi 29 mai 2006 à 16:14 +0200, Bart Jonkers a écrit :
> > The Ipipe patch for ARM only support the integrator platform for
> > now. There exist patch for another ARM platform, but it exist only as
> > a separated patch. Looking at the patch contents it seems that the only
> > patched files specific to the integrator architecture are :
> > arch/arm/mach-integrator/core.c
> > arch/arm/mach-integrator/integrator_cp.c
> > include/asm-arm/arch-integrator/entry-macro.S
> > include/asm-arm/arch-integrator/platform.h
> > include/asm-arm/arch-integrator/timex.h
> >
> > Looking rapidly at these files, it seems that the machine specific
> > functions and variables are reduced to:
> >
> > int __ipipe_mach_timerint;
> > int __ipipe_mach_timerstolen;
> > unsigned int __ipipe_mach_ticks_per_jiffy;
> >
> > void __ipipe_mach_acktimer(void);
> > unsigned long long __ipipe_mach_get_tsc(void);
> > void __ipipe_mach_set_dec(unsigned long reload);
> > unsigned long __ipipe_mach_get_dec(void);
> >
> > If you provide the same variables and functions for the PXA platform, I
> > think there is no modification to be done at Xenomai level.
Gilles is 100% correct. All the platform specific code has to do is
provide the low level timer manipulation functions.
> I found this out already. But it would be a easier to implement this
> functions if I know what they have to do. So could somebody give an
> explanation of this variables and functions?
Well, __ipipe_mach_acktimer acks the timer, __ipipe_mach_get_tsc returns
the TSC of the platform, __ipipe_mach_set_dec sets the decrementer etc.
Should I go on ?
If you have specific questions feel free to ask. But I suggest you read
and try to understand the code first.
Stelian.
--
Stelian Pop <stelian.pop@domain.hid>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Xenomai on PXA255
2006-05-29 14:45 ` Stelian Pop
@ 2006-05-29 15:45 ` Gilles Chanteperdrix
2006-05-29 19:17 ` Stelian Pop
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2006-05-29 15:45 UTC (permalink / raw)
To: Stelian Pop; +Cc: xenomai
Stelian Pop wrote:
> If you have specific questions feel free to ask. But I suggest you read
> and try to understand the code first.
Maybe we could provide a quick overview of how this works, Stelian,
please correct me if I am wrong.
If we start before rthal_timer_request is called, when the timer is
handled by Linux, we see that __ipipe_decr_ticks is set to
__ipipe_mach_ticks_per_jiffy, so that __ipipe_grab_irq does not
reprogram the timer. But __ipipe_mach_timerstolen is set to 0, so
integrator_timer_interrupt reprogram the timer at each tick.
Now, when rthal_timer_request (defined in ksrc/arch/arm/hal.c) is
called when Xenomai start handling the timer, we can see the two
different modes:
- in periodic mode, ipipe_tune_timer get called (indirectly via
rthal_set_timer, defined in include/asm-generic/hal.h), so
the proper value of __ipipe_decr_ticks is computed using
__ipipe_mach_ticks_per_jiffy, and __ipipe_mach_set_dec get called by
__ipipe_grab_irq at each tick to reprogram the timer
- in aperiodic (aka one-shot) mode, ipipe_tune_timer does not get
called, so __ipipe_decr_ticks remains set to
__ipipe_mach_ticks_per_jiffy and __ipipe_grab_irq does not call
__ipipe_mach_set_dec. Instead, __ipipe_mach_set_dec is called for
each shot by Xenomai (function rthal_timer_program_shot in
include/asm-arm/hal.h)
In both modes, __ipipe_mach_timerstolen is set to 1, so that
integrator_timer_interrupt never reprograms the timer.
When CONFIG_IPIPE is set, integrator_timer_interrupt never acks the
timer interrupt, instead, it gets ack'ed and unmasked in
__ipipe_ack_timerirq, installed as an acknowledge function for the timer
IRQ in __ipipe_enable_pipeline.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Xenomai on PXA255
2006-05-29 15:45 ` Gilles Chanteperdrix
@ 2006-05-29 19:17 ` Stelian Pop
0 siblings, 0 replies; 7+ messages in thread
From: Stelian Pop @ 2006-05-29 19:17 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
Le lundi 29 mai 2006 à 17:45 +0200, Gilles Chanteperdrix a écrit :
> Stelian Pop wrote:
> > If you have specific questions feel free to ask. But I suggest you read
> > and try to understand the code first.
>
> Maybe we could provide a quick overview of how this works, Stelian,
> please correct me if I am wrong.
Your description is accurate. However, such deep knowledge on the inner
workings should not be needed to port Xenomai to a new ARM platform.
(well, in case it works immediately. Debugging the port could need more
knowledge :) ).
In the list of 'undocumented' functions there is also
__ipipe_mach_get_tsc() which should return some accurate time
information. Most of the ARM platforms do not have a special Time Stamp
Clock register, so most of the time the tick count is used instead
(giving a TSC resolution of one microsecond). This is what standard
Linux also use.
If the platform has something more appropriate than the core timer for
measuring the time, this function is where you need to wire it.
Stelian.
--
Stelian Pop <stelian.pop@domain.hid>
Open Wide
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-05-29 19:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-25 10:59 [Xenomai-core] Xenomai on PXA255 Bart Jonkers
2006-05-29 13:19 ` Jan Kiszka
2006-05-29 14:00 ` Gilles Chanteperdrix
2006-05-29 14:14 ` Bart Jonkers
2006-05-29 14:45 ` Stelian Pop
2006-05-29 15:45 ` Gilles Chanteperdrix
2006-05-29 19:17 ` Stelian Pop
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.