All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Xenomai 2.6.1 on beaglebone (TI AM3359 SoC)
@ 2012-07-12 19:54 Stephan Kappertz
  2012-07-12 20:30 ` Gilles Chanteperdrix
  2012-07-13  9:00 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 8+ messages in thread
From: Stephan Kappertz @ 2012-07-12 19:54 UTC (permalink / raw)
  To: xenomai

Hi,

I am trying to use Xenomai 2.6.1 on a beaglebone (AM3359 Cortex A8 SoC) running Linux 3.2.21. As the TI AM3359 is not supported in 3.2.21 mainline kernel, I am using the slightly patched kernel from linux-omap. The adeos patch applied without errors after minor fixups. 
Building the kernel with or without Xenomai enabled succeeds.

Now the adeos patched kernel boots fine when disabling Xenomai & ipipe in the Kconfig configuration.

However, after enabling Xenomai & ipipe it hangs in an endless loop right after starting the Interrupt pipeline. Here's the bootlog:

Uncompressing Linux... done, booting the kernel.
Linux version 3.2.21 (stephan@ubuntu) (gcc version 4.6.2 (Buildroot 2011.11) ) #12 PREEMPT Thu Jul 12 21:08:26 CEST 22
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: am335xevm
Ignoring tag cmdline (using the default kernel command line)
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
AM335X ES1.0 (sgx neon )
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: console=ttyO0,115200n8 mem=256M earlyprintk=ttyO0 lpj=2494464
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 250944k/250944k available, 11200k reserved, 0K highmem
Virtual kernel memory layout:
   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
   fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
   vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
   lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
   modules : 0xbf000000 - 0xc0000000   (  16 MB)
     .text : 0xc0008000 - 0xc03e3000   (3948 kB)
     .init : 0xc03e3000 - 0xc083b000   (4448 kB)
     .data : 0xc083c000 - 0xc087e440   ( 266 kB)
      .bss : 0xc087e464 - 0xc08b3270   ( 212 kB)
NR_IRQS:396
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
OMAP clockevent source: GPTIMER2 at 24000000 Hz
OMAP clocksource: GPTIMER1 at 32768 Hz
I-pipe, 0.032 MHz clocksource
sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
Interrupt pipeline (release #1)
------------[ cut here ]------------

This is the last console output line. The cut here part comes from a WARN_ON_ONCE in kernel/softirq.c. This warning does not show up with ipipe disabled:

static void __local_bh_enable(unsigned int cnt)
{
	WARN_ON_ONCE(in_irq()); 
	WARN_ON_ONCE(!irqs_disabled()); <--- This warning asserts

	if (softirq_count() == cnt)
		trace_softirqs_on((unsigned long)__builtin_return_address(0));
	sub_preempt_count(cnt);
}

Using a JTAG interface and gdb I see that the kernel didn't crash but the timer IRQ is constantly firing and the timer .ack handler is never called. When I CTRL^C break into the kernel, I always end up in one of the following functions:

handle_level_irq ()
omap3_intc_handle_irq ()
generic_handle_irq ()
irq_enter ()
irq_exit ()

And with less probability:

idle_cpu ()
irq_check_poll ()
rcu_enter_nohz ()

So far I found two things the AM3359 handles different compared to the Igepv2 board:

1) MACHINE_START has .handle_irq = omap3_intc_handle_irq while it is not defined in the ipipe-2.6 kernel repository

2) The AM3359 uses a different timer for system clock (not the default omap3 timer)

Any idea how I can dive into this issue? I have no clear understanding of the core-3.2 implementation so I'm not sure where to start.

Thanks a lot,
Stephan

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

end of thread, other threads:[~2012-07-13 14:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 19:54 [Xenomai] Xenomai 2.6.1 on beaglebone (TI AM3359 SoC) Stephan Kappertz
2012-07-12 20:30 ` Gilles Chanteperdrix
2012-07-12 20:47   ` Gilles Chanteperdrix
2012-07-13  7:09     ` Stephan Kappertz
2012-07-13  7:32       ` Gilles Chanteperdrix
2012-07-13  9:00 ` Gilles Chanteperdrix
2012-07-13  9:15   ` Gilles Chanteperdrix
2012-07-13 14:37     ` Stephan Kappertz

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.