All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Intel EP80579 support
@ 2009-04-10 23:28 Bosko Radivojevic
  2009-04-11 20:10 ` Gilles Chanteperdrix
  2009-04-12 20:08 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 11+ messages in thread
From: Bosko Radivojevic @ 2009-04-10 23:28 UTC (permalink / raw)
  To: xenomai@xenomai.org

Hi all,

I'm quite new in anything related to Intel and Xenomai on it, so I'm
sorry if my question(s) may sound silly ;) I hope some experience I
have after 1 year of dealing with Xenomai on ARM will help me.

Anyway, I have Megrez+Mizar evaluation kit, which consist of Mergez
(Development Board) and Mizar (Intel EP80579 Module):
- http://www.m31.com/en/m31-projects-embedded-solutions/prodotti/megrez-evaluation-board.html
- http://www.m31.com/en/m31-projects-embedded-solutions/prodotti/mizar-intel-ep80579-module.html
- http://www.intel.com/design/intarch/devkits/ep80579/index.htm

Before I understand what is the status of vanila Linux support (I got
2.6.18 kernel in the kit, latest drivers on Intel's web are also for
2.6.18), I'm wondering if latest Xenomai/Adeos will work on this
platform?

Thanx.

--
Bosko


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-10 23:28 [Xenomai-help] Intel EP80579 support Bosko Radivojevic
@ 2009-04-11 20:10 ` Gilles Chanteperdrix
  2009-04-15 23:13   ` Bosko Radivojevic
  2009-04-12 20:08 ` Gilles Chanteperdrix
  1 sibling, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2009-04-11 20:10 UTC (permalink / raw)
  To: Bosko Radivojevic; +Cc: xenomai@xenomai.org

Bosko Radivojevic wrote:
> Hi all,
> 
> I'm quite new in anything related to Intel and Xenomai on it, so I'm
> sorry if my question(s) may sound silly ;) I hope some experience I
> have after 1 year of dealing with Xenomai on ARM will help me.
> 
> Anyway, I have Megrez+Mizar evaluation kit, which consist of Mergez
> (Development Board) and Mizar (Intel EP80579 Module):
> - http://www.m31.com/en/m31-projects-embedded-solutions/prodotti/megrez-evaluation-board.html
> - http://www.m31.com/en/m31-projects-embedded-solutions/prodotti/mizar-intel-ep80579-module.html
> - http://www.intel.com/design/intarch/devkits/ep80579/index.htm
> 
> Before I understand what is the status of vanila Linux support (I got
> 2.6.18 kernel in the kit, latest drivers on Intel's web are also for
> 2.6.18), I'm wondering if latest Xenomai/Adeos will work on this
> platform?

If it is an x86 and it works with the latest Linux, then I guess it
should work with Xenomai. If, on the other hand, it runs with a heavily
modified version of Linux, maybe Xenomai will need some adaptations too.

-- 
					    Gilles.


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-10 23:28 [Xenomai-help] Intel EP80579 support Bosko Radivojevic
  2009-04-11 20:10 ` Gilles Chanteperdrix
@ 2009-04-12 20:08 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 11+ messages in thread
From: Gilles Chanteperdrix @ 2009-04-12 20:08 UTC (permalink / raw)
  To: Bosko Radivojevic; +Cc: xenomai@xenomai.org

Bosko Radivojevic wrote:
> Hi all,
> 
> I'm quite new in anything related to Intel and Xenomai on it, so I'm
> sorry if my question(s) may sound silly ;) I hope some experience I
> have after 1 year of dealing with Xenomai on ARM will help me.
> 
> Anyway, I have Megrez+Mizar evaluation kit, which consist of Mergez
> (Development Board) and Mizar (Intel EP80579 Module):
> - http://www.m31.com/en/m31-projects-embedded-solutions/prodotti/megrez-evaluation-board.html
> - http://www.m31.com/en/m31-projects-embedded-solutions/prodotti/mizar-intel-ep80579-module.html
> - http://www.intel.com/design/intarch/devkits/ep80579/index.htm
> 
> Before I understand what is the status of vanila Linux support (I got
> 2.6.18 kernel in the kit, latest drivers on Intel's web are also for
> 2.6.18), I'm wondering if latest Xenomai/Adeos will work on this
> platform?

Ah! It is the thing once named "tolapai", right? I once saw a
presentation which said that the tolapai could not do bus master DMA on
the PCI bus for other peripherals than the built-in ones (so, for
instance, if you want to add a Wifi card, you have to use copy packets
around). I had no confirmation of this information, but if it is true, I
think it really cripples this processor.

-- 
					    Gilles.


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-11 20:10 ` Gilles Chanteperdrix
@ 2009-04-15 23:13   ` Bosko Radivojevic
  2009-04-15 23:26     ` Bosko Radivojevic
  0 siblings, 1 reply; 11+ messages in thread
From: Bosko Radivojevic @ 2009-04-15 23:13 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org

Hi!

I manged to boot my Tolapai with 2.6.28.8 Linux kernel and Xenomai
2.4.7. Rootfs is based on buildroot, meaning uclibc. I've compiled
Xenomai libs and my app by uclibc toolchain. Xenomai is built without
--enable-x86-sep.

First test, to create & start RT task (from user space) passed ok.
But, second one, enabling an interrupt failed. Here is the output,
followed by test code. What am I doing wrong? :)

# ./user_irq
Task created!
BUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<00000000>] 0x0
*pde = 00000000
Oops: 0000 [#1]
last sysfs file:
Modules linked in:

Pid: 655, comm: user_irq Not tainted (2.6.28.8-ipipe #8) Intel Tolapai
Based Board
EIP: 0060:[<00000000>] EFLAGS: 00010206 CPU: 0
EIP is at 0x0
EAX: 00000026 EBX: fffffffd ECX: 00000026 EDX: c06ebf80
ESI: 00000000 EDI: c06edf20 EBP: 00000000 ESP: df043f2c
 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
Process user_irq (pid: 655, ti=df043000 task=df1a8960 task.ti=df043000)
I-pipe domain Linux
Stack:
 c05b4a2c c044ded9 fffffffd df043fb8 c0447fe4 00000001 00000000 c0441ba7
 00000000 c06edf20 df1a8960 00000001 00000280 00000000 00000000 00000002
 c07b2204 c07b2200 c043841e df043fb8 00000021 c07a6f00 c0441a67 c07a6f04
Call Trace:
 [<c05b4a2c>] rthal_irq_enable+0x26/0x29
 [<c044ded9>] rt_intr_enable+0x28/0x49
 [<c0447fe4>] __rt_intr_enable+0x34/0x3b
 [<c0441ba7>] hisyscall_event+0x140/0x24a
 [<c043841e>] __ipipe_dispatch_event+0x96/0x14e
 [<c0441a67>] hisyscall_event+0x0/0x24a
 [<c041083e>] __ipipe_syscall_root+0x44/0x96
 [<c0403693>] system_call+0x2b/0x4c
Code:  Bad EIP value.
EIP: [<00000000>] 0x0 SS:ESP 0068:df043f2c
---[ end trace e8aec4c9df299570 ]---
Segmentation fault

Code:
#define IRQ_NUMBER 38
#define TASK_PRIO  50
#define TASK_MODE  T_JOINABLE
#define TASK_STKSZ 0

RT_INTR intr_desc;
RT_TASK task_desc;

void irq_server (void *cookie)
{
int err, counter=0;

    for (;;counter++) {
      rt_task_set_mode(0, T_PRIMARY, NULL);
      err = rt_intr_wait(&intr_desc,TM_INFINITE);

      if (err > 0) {
           printf ("Interrupt received %d!!\n", counter);
       } else {
           printf ("rt_intr_wait(): %d\n", err);
       }
       rt_intr_enable (&intr_desc);
    }
}

int main (int argc, char *argv[])
{
    int err;

    mlockall(MCL_CURRENT|MCL_FUTURE);

    err = rt_intr_create(&intr_desc, "MyIrq", 38, I_NOAUTOENA);

    if (err) {
      printf ("rt_intr_create: %d\n", err);
      return 0;
    }

    err = rt_task_create(&task_desc, "MyIrqServer", TASK_STKSZ,
TASK_PRIO, TASK_MODE);
    printf ("Task created!\n");

    rt_intr_enable (&intr_desc);
    printf ("Interrupt enabled!\n");

    if (!err)
      rt_task_start(&task_desc,&irq_server,NULL);
    else
      printf ("rt_intr_create: %d\n", err);

    printf ("user_irq [%d]: started.\n", getpid());
    if (rt_task_join (&task_desc)) {
      printf ("Error joining task\n");
    }
    return 0;
}

--
Bosko


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-15 23:13   ` Bosko Radivojevic
@ 2009-04-15 23:26     ` Bosko Radivojevic
  2009-04-15 23:45       ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Bosko Radivojevic @ 2009-04-15 23:26 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org

Maybe this may help:

# cd /proc/xenomai
# cat affinity
00000001
# cat apc
APC          CPU0
  0:            0    (pipe_wakeup)
  1:            0    (lostage_handler)
  2:            0    (registry_export)
  3:            0    (pse51_lostage_handler)
# cat faults
TRAP         CPU0
  0:            0    (Divide error)
  1:            0    (Debug)
  3:            0    (Int3)
  4:            0    (Overflow)
  5:            0    (Bounds)
  6:            0    (Invalid opcode)
  7:            0    (FPU not available)
  8:            0    (Double fault)
  9:            0    (FPU segment overrun)
 10:            0    (Invalid TSS)
 11:            0    (Segment not present)
 12:            0    (Stack segment)
 13:            0    (General protection)
 14:            0    (Page fault)
 15:            0    (Spurious interrupt)
 16:            0    (FPU error)
 17:            0    (Alignment check)
 18:            0    (Machine check)
 19:            0    (SIMD error)
# cat hal
2.2-06
# cat heap
size=129536:used=64:pagesz=512  (main heap)
size=32256:used=0:pagesz=512  (stack pool)
# cat irq
IRQ         CPU0
297:       14807         [timer]
322:           0         [virtual]
# cat latency
1000
# cat stat
CPU  PID    MSW        CSW        PF    STAT       %CPU  NAME
  0  0      0          0          0     00500080  100.0  ROOT
  0  0      0          16645      0     00000000    0.0  IRQ297: [timer]
# cat sched
CPU  PID    PRI      PERIOD     TIMEOUT    TIMEBASE  STAT       NAME
  0  0       -1      0          0          master    R          ROOT
# cat timebases
NAME       RESOLUTION     JIFFIES   STATUS
master              1         n/a   enabled,set
# cat timer
status=on:setup=0:clock=107197728116:timerdev=lapic:clockdev=tsc
# cat version
2.4.7
# cat timerstat/master
CPU  SCHEDULED   FIRED       TIMEOUT    INTERVAL   HANDLER      NAME
0    40456       40455       3337906    4000000    NULL         [host-timer]


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-15 23:26     ` Bosko Radivojevic
@ 2009-04-15 23:45       ` Gilles Chanteperdrix
  2009-04-15 23:55         ` Bosko Radivojevic
  2009-04-20 11:24         ` Bosko Radivojevic
  0 siblings, 2 replies; 11+ messages in thread
From: Gilles Chanteperdrix @ 2009-04-15 23:45 UTC (permalink / raw)
  To: Bosko Radivojevic; +Cc: xenomai@xenomai.org

Bosko Radivojevic wrote:
> Maybe this may help:
> 
> # cd /proc/xenomai
> # cat affinity
> 00000001
> # cat apc
> APC          CPU0
>   0:            0    (pipe_wakeup)
>   1:            0    (lostage_handler)
>   2:            0    (registry_export)
>   3:            0    (pse51_lostage_handler)
> # cat faults
> TRAP         CPU0
>   0:            0    (Divide error)
>   1:            0    (Debug)
>   3:            0    (Int3)
>   4:            0    (Overflow)
>   5:            0    (Bounds)
>   6:            0    (Invalid opcode)
>   7:            0    (FPU not available)
>   8:            0    (Double fault)
>   9:            0    (FPU segment overrun)
>  10:            0    (Invalid TSS)
>  11:            0    (Segment not present)
>  12:            0    (Stack segment)
>  13:            0    (General protection)
>  14:            0    (Page fault)
>  15:            0    (Spurious interrupt)
>  16:            0    (FPU error)
>  17:            0    (Alignment check)
>  18:            0    (Machine check)
>  19:            0    (SIMD error)
> # cat hal
> 2.2-06
> # cat heap
> size=129536:used=64:pagesz=512  (main heap)
> size=32256:used=0:pagesz=512  (stack pool)
> # cat irq
> IRQ         CPU0
> 297:       14807         [timer]
> 322:           0         [virtual]
> # cat latency
> 1000
> # cat stat
> CPU  PID    MSW        CSW        PF    STAT       %CPU  NAME
>   0  0      0          0          0     00500080  100.0  ROOT
>   0  0      0          16645      0     00000000    0.0  IRQ297: [timer]
> # cat sched
> CPU  PID    PRI      PERIOD     TIMEOUT    TIMEBASE  STAT       NAME
>   0  0       -1      0          0          master    R          ROOT
> # cat timebases
> NAME       RESOLUTION     JIFFIES   STATUS
> master              1         n/a   enabled,set
> # cat timer
> status=on:setup=0:clock=107197728116:timerdev=lapic:clockdev=tsc
> # cat version
> 2.4.7
> # cat timerstat/master
> CPU  SCHEDULED   FIRED       TIMEOUT    INTERVAL   HANDLER      NAME
> 0    40456       40455       3337906    4000000    NULL         [host-timer]

Could you cat or grep 38 /proc/interrupts ?

-- 
					    Gilles.


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-15 23:45       ` Gilles Chanteperdrix
@ 2009-04-15 23:55         ` Bosko Radivojevic
  2009-04-20 11:24         ` Bosko Radivojevic
  1 sibling, 0 replies; 11+ messages in thread
From: Bosko Radivojevic @ 2009-04-15 23:55 UTC (permalink / raw)
  To: Gilles Chanteperdrix, xenomai@xenomai.org

There is no such entry in /proc/interrupts

On 4/16/09, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> Bosko Radivojevic wrote:
>> Maybe this may help:
>>
>> # cd /proc/xenomai
>> # cat affinity
>> 00000001
>> # cat apc
>> APC          CPU0
>>   0:            0    (pipe_wakeup)
>>   1:            0    (lostage_handler)
>>   2:            0    (registry_export)
>>   3:            0    (pse51_lostage_handler)
>> # cat faults
>> TRAP         CPU0
>>   0:            0    (Divide error)
>>   1:            0    (Debug)
>>   3:            0    (Int3)
>>   4:            0    (Overflow)
>>   5:            0    (Bounds)
>>   6:            0    (Invalid opcode)
>>   7:            0    (FPU not available)
>>   8:            0    (Double fault)
>>   9:            0    (FPU segment overrun)
>>  10:            0    (Invalid TSS)
>>  11:            0    (Segment not present)
>>  12:            0    (Stack segment)
>>  13:            0    (General protection)
>>  14:            0    (Page fault)
>>  15:            0    (Spurious interrupt)
>>  16:            0    (FPU error)
>>  17:            0    (Alignment check)
>>  18:            0    (Machine check)
>>  19:            0    (SIMD error)
>> # cat hal
>> 2.2-06
>> # cat heap
>> size=129536:used=64:pagesz=512  (main heap)
>> size=32256:used=0:pagesz=512  (stack pool)
>> # cat irq
>> IRQ         CPU0
>> 297:       14807         [timer]
>> 322:           0         [virtual]
>> # cat latency
>> 1000
>> # cat stat
>> CPU  PID    MSW        CSW        PF    STAT       %CPU  NAME
>>   0  0      0          0          0     00500080  100.0  ROOT
>>   0  0      0          16645      0     00000000    0.0  IRQ297: [timer]
>> # cat sched
>> CPU  PID    PRI      PERIOD     TIMEOUT    TIMEBASE  STAT       NAME
>>   0  0       -1      0          0          master    R          ROOT
>> # cat timebases
>> NAME       RESOLUTION     JIFFIES   STATUS
>> master              1         n/a   enabled,set
>> # cat timer
>> status=on:setup=0:clock=107197728116:timerdev=lapic:clockdev=tsc
>> # cat version
>> 2.4.7
>> # cat timerstat/master
>> CPU  SCHEDULED   FIRED       TIMEOUT    INTERVAL   HANDLER      NAME
>> 0    40456       40455       3337906    4000000    NULL
>> [host-timer]
>
> Could you cat or grep 38 /proc/interrupts ?
>
> --
> 					    Gilles.
>

-- 
Sent from Gmail for mobile | mobile.google.com


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-15 23:45       ` Gilles Chanteperdrix
  2009-04-15 23:55         ` Bosko Radivojevic
@ 2009-04-20 11:24         ` Bosko Radivojevic
  2009-04-20 18:17           ` Gilles Chanteperdrix
  1 sibling, 1 reply; 11+ messages in thread
From: Bosko Radivojevic @ 2009-04-20 11:24 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org

Hi All,

no ideas what could be causing problem?

Sincerely,
Bosko


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-20 11:24         ` Bosko Radivojevic
@ 2009-04-20 18:17           ` Gilles Chanteperdrix
  2009-04-20 23:21             ` Bosko Radivojevic
  0 siblings, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2009-04-20 18:17 UTC (permalink / raw)
  To: Bosko Radivojevic; +Cc: xenomai@xenomai.org

Bosko Radivojevic wrote:
> Hi All,
> 
> no ideas what could be causing problem?

Well, you are using an IRQ which does not appear in /proc/interrupts,
this is not a good sign. If the IRQ belongs to a PCI device, you should
claim the PCI device, so that the interrupt is routed by the kernel.
Then, you will be able to request this irq. I may be completely wrong,
since I do not know well the details of irqs allocation on x86.

-- 
					    Gilles.


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-20 18:17           ` Gilles Chanteperdrix
@ 2009-04-20 23:21             ` Bosko Radivojevic
  2009-04-21  9:53               ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Bosko Radivojevic @ 2009-04-20 23:21 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org

Hi Gilles,

thank you for your answers. I'm doing pretty much the same thing as I
did on ARM platform - I'm using one of GPIO pins as Interrupt source.
On ARM platform I was using one of the GPIO pins as IRQ 110, also
without having it in /proc/interrupts.

Intel provides API (accessible through ioctl()) which I use to set
GPIO pin (#25 in my case) in input mode and, as manual says, it can be
used as Interrupt source (for #25 it says IRQ 38).

Sincerely,
Bosko


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

* Re: [Xenomai-help] Intel EP80579 support
  2009-04-20 23:21             ` Bosko Radivojevic
@ 2009-04-21  9:53               ` Gilles Chanteperdrix
  0 siblings, 0 replies; 11+ messages in thread
From: Gilles Chanteperdrix @ 2009-04-21  9:53 UTC (permalink / raw)
  To: Bosko Radivojevic; +Cc: xenomai@xenomai.org

Bosko Radivojevic wrote:
> Hi Gilles,
> 
> thank you for your answers. I'm doing pretty much the same thing as I
> did on ARM platform - I'm using one of GPIO pins as Interrupt source.
> On ARM platform I was using one of the GPIO pins as IRQ 110, also
> without having it in /proc/interrupts.
> 
> Intel provides API (accessible through ioctl()) which I use to set
> GPIO pin (#25 in my case) in input mode and, as manual says, it can be
> used as Interrupt source (for #25 it says IRQ 38).
> 
> Sincerely,
> Bosko

The difference between ARM and x86 is that on ARM, all irqs are created
when the board support is initialized. From what I understand, on x86,
irqs are created when requested. Which is why for instance, you see that
PCI irqs are only routed when the PCI device is requested by a driver.
So, for the IRQ 38 to exist, you probably need to request it as if you
were going to use it on Linux side, then you may request it on Xenomai side.

-- 
                                                 Gilles.


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

end of thread, other threads:[~2009-04-21  9:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10 23:28 [Xenomai-help] Intel EP80579 support Bosko Radivojevic
2009-04-11 20:10 ` Gilles Chanteperdrix
2009-04-15 23:13   ` Bosko Radivojevic
2009-04-15 23:26     ` Bosko Radivojevic
2009-04-15 23:45       ` Gilles Chanteperdrix
2009-04-15 23:55         ` Bosko Radivojevic
2009-04-20 11:24         ` Bosko Radivojevic
2009-04-20 18:17           ` Gilles Chanteperdrix
2009-04-20 23:21             ` Bosko Radivojevic
2009-04-21  9:53               ` Gilles Chanteperdrix
2009-04-12 20:08 ` 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.