Xenomai for A13 - A10

Started by crubille, February 04, 2013, 10:55:17 PM

Previous topic - Next topic

crubille

Hello,

so if i get a running kernel, i dont still have xenomai application working - and i dont know why.

If you suspect me to dont send infos, i remember you i send infos about patchs and A10 timers, but last week i cant do anything and have no mail.

If you wand, send me your mail adress in private messages and i send you back the files in a more convenient forms.

Saturday, i start write some code and let it compile (on the A13) sunday in the night.
Monday, i get a kernel which hang the A13.
In the evening i check it and recompile.
This morning i get a kernel, boot the A13 and go to my office.

So, it is for the sunxi 3.4 kernel.
The xenomai ipipe-core-3.4.6-arm-4.patch fail in some place but it is obvious to correct the faillures.
I then have to
- add one line in arch/arm/Kconfig for the sun5i as for several others arm:

       select IPIPE_ARM_KUSER_TSC if IPIPE


- add definition for TIMER2 and TIMER4 in arch/arm/plat-sunxi/include/plat/platform.h


#ifdef CONFIG_IPIPE
#define SW_TIMER2_CTL_REG                 (SW_VA_TIMERC_IO_BASE + 0x30)
#define SW_TIMER2_INTVAL_REG              (SW_VA_TIMERC_IO_BASE + 0x34)
#define SW_TIMER2_CNTVAL_REG              (SW_VA_TIMERC_IO_BASE + 0x38)

#define SW_TIMER4_CTL_REG                 (SW_VA_TIMERC_IO_BASE + 0x50)
#define SW_TIMER4_INTVAL_REG              (SW_VA_TIMERC_IO_BASE + 0x54)
#define SW_TIMER4_CNTVAL_REG              (SW_VA_TIMERC_IO_BASE + 0x58)
#endif /* CONFIG_IPIPE */



add the code in arch/arm/mach_sun5i/core.c


*** arch/arm/mach-sun5i/core.c.ori 2013-02-20 00:07:57.000000000 +0100
--- arch/arm/mach-sun5i/core.c 2013-02-19 01:35:44.000000000 +0100
***************
*** 64,69 ****
--- 64,74 ----
  #include <plat/core.h>
  #include <plat/sys_config.h>
 
+ #include <linux/ipipe.h>
+ #include <linux/ipipe_tickdev.h>
+
+
+
  /**
   * Machine Implementations
   *
*************** static int timer_set_next_event(unsigned
*** 317,322 ****
--- 322,472 ----
  return 0;
  }
 
+
+ #ifdef CONFIG_IPIPE
+
+ /* ***********************************************
+    The IPIPE TIMER
+    *********************************************** */
+ /*
+  * Reprogram the timer
+  */
+ static int sun5i_set_timer4(unsigned long evt, void *timer)
+ {
+   volatile u32  val = 0;
+
+   val = readl(SW_TIMER4_CTL_REG);
+   if( (val & 0x1 ) == 1 )
+     {
+       /* running */
+       val &= ~(0x1);  /* stop the timer */
+       writel(val, SW_TIMER4_CTL_REG);
+       // sleep for 2 T_cycle that is 2 ticks
+       __delay(50); // wait for hardware synchronisation
+       if( evt > 1 ) evt --;
+     }
+   /* set the timer */
+   writel( evt, SW_TIMER4_CNTVAL_REG);
+   /* start the timer */
+   val |=  0x2; // reload!
+   writel(val, SW_TIMER4_CTL_REG);
+   val |=  0x1 ; // start
+   writel(val, SW_TIMER4_CTL_REG);
+   return 0;
+ }
+
+ /*
+  * IRQ handler for the timer.
+  */
+ static void sun5i_ack_timer4(void)
+ {
+ writel(0x1<<4, SW_TIMER_INT_STA_REG);
+ }
+
+ static void sun5i_request_timer4(struct ipipe_timer *timer, int steal)
+ {
+ /* Set timer on  - Enable interrupt. */
+ volatile u32  val = 0;
+
+ val = readl(SW_TIMER4_CTL_REG);
+ val &= ~(0x07<<4);
+ val &= ~(0x03<<2);
+ val |=  (1<<2) ; // 24 MHz
+ val &= ~(1<<1);
+ val |= 1<<7; // single mode -- stop continuous mode
+ writel(val, SW_TIMER4_CTL_REG);
+ __delay(50);
+ sun5i_ack_timer4();
+ /* Enable timer4 interrupt */
+ val = readl(SW_TIMER_INT_CTL_REG);
+ val |= (1<<4);
+ writel(val, SW_TIMER_INT_CTL_REG);
+ }
+
+ static void sun5i_release_timer4(struct ipipe_timer *timer)
+ {
+ volatile u32  val = 0;
+ /* Disable interrupt. */
+ val = readl(SW_TIMER_INT_CTL_REG);
+ val &= ~(1<<4);
+ writel(val, SW_TIMER_INT_CTL_REG);
+
+ }
+
+ static struct ipipe_timer sun5i_itimer = {
+   .irq = SW_INT_IRQNO_TIMER4 ,
+   .request = sun5i_request_timer4,
+   .set = sun5i_set_timer4,
+   .ack = sun5i_ack_timer4,
+   .release = sun5i_release_timer4,
+   .name = "sun5i_timer4",
+   .rating =  240 ,
+   .freq = 24000000 ,
+   .min_delay_ticks = 20 ,
+   //  .cpumask = ,
+ };
+
+ /* ***********************************************
+    The IPIPE CLOCK
+    *********************************************** */
+
+ static struct __ipipe_tscinfo tsc_info = {
+   .type = IPIPE_TSC_TYPE_FREERUNNING_COUNTDOWN ,
+   .freq = 24000000 , // ATTENTION should go to PPL6/6
+   .counter_vaddr = SW_TIMER2_CNTVAL_REG ,
+   .u = {
+     {
+       .counter_paddr = SW_TIMER2_CNTVAL_REG - SW_VA_TIMERC_IO_BASE + SW_PA_TIMERC_IO_BASE,
+       .mask = 0xffffffff,
+     },
+   },
+ };
+
+ void  sun5i_ipipe_tsc_timer2_init( void )
+ {
+ /* Set timer on  */
+ volatile u32  val = 0;
+
+ /* set clock source to HOSC (24Mhz) LOOK for PLL6/6 for future */
+ val = readl(SW_TIMER2_CTL_REG);
+ val &= ~(0x1); // stop timer
+ val &= ~(0x07<<4); // clear divisor
+ val &= ~(0x03<<2); // clear source
+
+ val &= ~(0x1<<7); // continous mode
+ val |=  (1<<2) ;  // 24 Mhz
+ writel(val, SW_TIMER2_CTL_REG);
+
+ /* set value */
+ writel( tsc_info.u.mask, SW_TIMER2_INTVAL_REG);
+ /* start and auto reload */
+ __delay(50); // wait for hardware synchronisation
+ val = readl(SW_TIMER2_CTL_REG);
+ val |= 1 | (1<<1);
+ writel(val, SW_TIMER2_CTL_REG);
+
+ }
+
+ /* ***********************************************
+    The IPIPE IRQ
+    *********************************************** */
+
+ /* ***********************************************
+    Register IPIPE
+    *********************************************** */
+
+
+
+ void sun5i_ipipe_init( void )
+ {
+   ipipe_timer_register(&sun5i_itimer); // register timer
+
+   //  tsc_info.freq = clock_tick_rate;// from the example dont care
+   sun5i_ipipe_tsc_timer2_init();
+   __ipipe_tsc_register(&tsc_info); // register clock
+ }
+ #endif /* CONFIG_IPIPE */
+
  static struct clock_event_device timer0_clockevent = {
  .name = "timer0",
  .shift = 32,
*************** static irqreturn_t sw_timer_interrupt(in
*** 331,336 ****
--- 481,490 ----
  {
  struct clock_event_device *evt = (struct clock_event_device *)dev_id;
 
+ #ifdef CONFIG_IPIPE
+  __ipipe_tsc_update();
+ #endif /* CONFIG_IPIPE */
+
  writel(0x1, SW_TIMER_INT_STA_REG);
 
  /*
*************** static void __init sw_timer_init(void)
*** 383,388 ****
--- 537,546 ----
  timer0_clockevent.cpumask = cpumask_of(0);
  timer0_clockevent.irq = sw_timer_irq.irq;
  clockevents_register_device(&timer0_clockevent);
+
+ #ifdef CONFIG_IPIPE
+ sun5i_ipipe_init();
+ #endif
  }
 
  struct sys_timer sw_sys_timer = {


uMinded

Quote from: Tele on February 19, 2013, 11:14:13 PM
So you have to change TMR1 -> TMR2, we have nothing to do with TMR1.
And the maximum clock source is 200MHz because PLL6/6 can be the highest clock source for timer2.
You have to change TIMER2_HPET_CLOCK_EVENT_HZ to 200MHz and have to recalculate min/max deltas. It will be 200MHz instead of 300MHz, its still fine, not so few, dont let it bring you down.
Tell me if Im wrong, Im a slow learner, I wont get offended.

- Nice catch on the PLL6/6, When I read the datasheet for the processor I saw the big notice that PLL6 outputs 1.2GHz and nothing else and I wrote off the div6 defore it even hit the TMR_2_CLK_PRESCALE.

- The Tim1's where a copy-paste mistake but they where fixed on my second kernel.

- I will re-calculate the values based on 200MHz clock but it shouldn't change much as I think the kernel was hanging due to a to-often ISR or pushing wrong TSC to the processor. I will go through crubille's change and see if were on the same track.

Crubille:

   I notice you are using a different convention for inserting the timer into the system and registering it with the I-Pipe. Where did you find documentation to do it your way? When I compiled my 3.0.x and 3.4.x kernels they demanded the following functions to work:

int __ipipe_mach_ticks_per_jiffy
int __ipipe_mach_timerstolen
int __ipipe_mach_timerint
__ipipe_mach_get_tsc(void)
__ipipe_mach_get_dec(void)
__ipipe_mach_release_timer(void)
__ipipe_mach_set_dec(unsigned long delay)
__ipipe_mach_acktimer(void)


That was with Xenomai-2.6.2.1 patched into the kernel.

crubille

At this time, i use the 24 Mhz clock for the clock (TIMER 2) and the clocktest show it is ok
and for the timer (TIMER4) and nothing append.

It is not a problem to swith the clock to PLL6/6, just check ticks are coherents.

At this time, my main question is: is the IRQ for TIMER4 really 67 ?

crubille


root@debian:/usr/xenomai/bin# ./latency
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.166|      2.624|     14.583|       0|     0|      2.166|     14.583
RTD|      1.416|      2.208|     25.749|       0|     0|      1.416|     25.749
RTD|      1.416|      2.166|     21.083|       0|     0|      1.416|     25.749
RTD|      1.416|      2.124|     25.583|       0|     0|      1.416|     25.749
RTD|      1.416|      2.166|     20.499|       0|     0|      1.416|     25.749
RTD|      1.416|      2.166|     24.958|       0|     0|      1.416|     25.749
RTD|      1.416|      2.124|     20.666|       0|     0|      1.416|     25.749
RTD|      1.416|      2.124|     24.916|       0|     0|      1.416|     25.749
RTD|      1.499|      2.208|     23.833|       0|     0|      1.416|     25.749
RTD|      1.416|      2.249|     29.666|       0|     0|      1.416|     29.666
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      1.416|      2.208|     29.666|       0|     0|    00:00:11/00:00:11


I just add the following in the core.c file:


writel( evt, SW_TIMER4_INTVAL_REG);


before

  writel( evt, SW_TIMER4_CNTVAL_REG);


and

     __delay(50);

after

ehj666

Quote from: uMinded on February 19, 2013, 08:28:22 PM
Latest & Greatest Kernal

EDIT:
Can you give this one a try too:
3.4.24-r1-xeno-debug
I have been working on getting the 3.4.x patched and some latest merges have made it possible. If this one works then were quite a few steps ahead.

Latest and greatest kernel boot log:
http://pastebin.com/2TPFtwqL

3.4.24-r1 kernel boot log:
http://pastebin.com/qQBn9LJY

uMinded

Quote from: ehj666 on February 20, 2013, 05:06:12 AM
3.4.24-r1 kernel boot log:
http://pastebin.com/qQBn9LJY

Now that's some real kernel debug messages eh! The I-Pipe TSC/cpu sync is the main problem with 3.0.36 so I am going to dump that kernel in favor of 3.4.24 as that actually boots with Xenomai.

I'm going to take a shot at doing it the way crubille did and see if we can get it booted and loaded.

crubille:

  I would be careful of the 3.4.24 version of arch/arm/plat-sunxi/include/plat/platform.h as some of the virtual address pointers are offset by 0x10 and you could reset a system clock unintentionally or worse. See the linux-sunxi.org site for the register definitions.

uMinded

This should boot up now:
Linux-3.4.24-r1-xeno-debug-r1-xe
Xenomai-2.6.2.1 User Progs

Hopefully the user programs work, I compiled them for -march=armv7-a -mfpu=vfp3

If it does can you please run the following:

/usr/xenomai/bin/clocktest -C sun5i_timer2  // Or just clocktest to test them all
/usr/xenomai/bin/latency


As usual dump them all please.

I talked to DigiKey, they didn't want to test my board and said they would call back. They have not so I will call them tomorrow and see if they can do it and ship ASAP.

Tele

Quote from: uMinded on February 20, 2013, 06:28:25 AM
This should boot up now:
Linux-3.4.24-r1-xeno-debug-r1-xe
As usual dump them all please.



U-Boot SPL 2012.10-rc1-03956-gd7ea23d (Oct 11 2012 - 15:48:58)
MMC:   SUNXI SD/MMC: 0
Loading U-Boot...   OK!
Jumping to U-Boot...


U-Boot 2012.10-rc1-03956-gd7ea23d (Oct 11 2012 - 15:48:58) Allwinner Technology

CPU:   SUNXI Family
Board: A13-OLinuXino
I2C:   ready
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
reading uEnv.txt

119 bytes read
Loaded environment from uEnv.txt
reading boot.scr

** Unable to read "boot.scr" from mmc 0:1 **
Loading file "boot.scr" from mmc device 0:1 xxa1
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - mmc 0:1 **
ext2load - load binary file from a Ext2 filesystem

Usage:
ext2load <interface> <dev[:part]> [addr] [filename] [bytes]
    - load binary file 'filename' from 'dev' on 'interface'
      to address 'addr' from ext2 filesystem
Loading file "boot/boot.scr" from mmc device 0:1 xxa1
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - mmc 0:1 **
ext2load - load binary file from a Ext2 filesystem

Usage:
ext2load <interface> <dev[:part]> [addr] [filename] [bytes]
    - load binary file 'filename' from 'dev' on 'interface'
      to address 'addr' from ext2 filesystem
reading script.bin

28156 bytes read
reading uImage

4139296 bytes read
## Booting kernel from Legacy Image at 48000000 ...
   Image Name:   Linux-3.4.24-r1-xeno-debug-r1-xe
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4139232 Bytes = 3.9 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

<6>Booting Linux on physical CPU 0
<6>Initializing cgroup subsys cpuset
<5>Linux version 3.4.24-r1-xeno-debug-r1-xeno-debug-dirty (uminded@uminded-desktop) (gcc version 4.7.3 20130102 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.01-20130125 - Linaro GCC 2013.01) ) #3 PREEMPT Tue Feb 19 22:20:06 CST 2013
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: sun5i
<6>Memory cut off:
<6>     MALI : 0x5c000000 - 0x5fffffff  (  64 MB)
<4>Ignoring tag cmdline (using the default kernel command line)
<4>Ignoring unrecognised tag 0x00000000
<6>debug: ignoring loglevel setting.
<6>Memory Reserved:
<6>     SYS  : 0x43000000 - 0x4300ffff  (  64 kB)
<6>     VE   : 0x44000000 - 0x48ffffff  (  80 MB)
Memory policy: ECC disabled, Data cache writeback
<6>chip-id: Unknown (AW1625)
<7>On node 0 totalpages: 114688
<7>free_area_init_node: node 0, pgdat c07ea920, node_mem_map c0a2f000
<7>  Normal zone: 896 pages used for memmap
<7>  Normal zone: 0 pages reserved
<7>  Normal zone: 113792 pages, LIFO batch:31
<7>pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768<c>
<7>pcpu-alloc: <c>[0] <c>0 <c>
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113792
<5>Kernel command line: mem=448M@0x40000000 console=ttyS0,115200 panic=10 debug ignore_loglevel print_fatal_signals=1
<6>PID hash table entries: 2048 (order: 1, 8192 bytes)
<6>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
<6>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>Memory: 448MB = 448MB total
<5>Memory: 362300k/362300k available, 96452k reserved, 0K highmem
<5>Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xdc800000 - 0xff000000   ( 552 MB)
    lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0770000   (7584 kB)
      .init : 0xc0770000 - 0xc07a0000   ( 192 kB)
      .data : 0xc07a0000 - 0xc07f03a8   ( 321 kB)
       .bss : 0xc07f03cc - 0xc0a2ea60   (2298 kB)
<6>SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
<6>NR_IRQS:96
<6>timer0: Periodic Mode
<6>I-pipe, 200.000 MHz clocksource
<6>sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
<6>Interrupt pipeline (release #4)
<6>Console: colour dummy device 80x30
<6>Calibrating delay loop... <c>1001.88 BogoMIPS (lpj=5009408)
<6>pid_max: default: 32768 minimum: 301
<6>Mount-cache hash table entries: 512
<6>Initializing cgroup subsys cpuacct
<6>Initializing cgroup subsys devices
<6>Initializing cgroup subsys freezer
<6>Initializing cgroup subsys blkio
<6>CPU: Testing write buffer coherency: ok
<6>hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
<6>Setting up static identity map for 0x4055de48 - 0x4055dea0
<6>devtmpfs: initialized
<6>dummy:
<6>NET: Registered protocol family 16
<6>hw-breakpoint: debug architecture 0x4 unsupported.
SOFTWINNER DMA Driver, (c) 2003-2004,2006 Simtec Electronics
<6>Initialize DMAC OK
<6>bio: create slab <bio-0> at 0
<5>SCSI subsystem initialized
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>Advanced Linux Sound Architecture Driver Version 1.0.25.
<6>cfg80211: Calling CRDA to update world regulatory domain
<6>Init eGon pin module V2.0
<6>Switching to clocksource ipipe_tsc
<5>FS-Cache: Loaded
<6>CacheFiles: Loaded
<6>timer0: Oneshot Mode
[usb_manager]: CONFIG_USB_SW_SUN5I_USB0_HOST_ONLY
[sw_hcd0]: usb host driver initialize........
[sw_hcd0]: [sw_hcd_host0]: open_usb_clock
[hcd0]: open, 0x60(0xc141), 0xcc(0x143)
[sw_hcd0]: host_init_state = 0
[sw_hcd0]: platform is usb host
[sw_hcd0]: sw_hcd_host0: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx (X), HB-ISO Tx (X), SoftConn)
[sw_hcd0]: sw_hcd_init_controller: sw_hcd_host0: USB Host mode controller at f1c13000 using PIO, IRQ 38
<6>sw_hcd_host0 sw_hcd_host0: sw_hcd host driver
<6>sw_hcd_host0 sw_hcd_host0: new USB bus registered, assigned bus number 1
<6>hub 1-0:1.0: USB hub found
<6>hub 1-0:1.0: 1 port detected
[sw_hcd_host0]: Set USB Power ON
axp driver uning configuration failed(562)
axp driver uning configuration failed(574)
<6>NET: Registered protocol family 2
<6>IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
<6>TCP established hash table entries: 16384 (order: 5, 131072 bytes)
<6>TCP bind hash table entries: 16384 (order: 6, 327680 bytes)
<6>TCP: Hash tables configured (established 16384 bind 16384)
<6>TCP: reno registered
<6>UDP hash table entries: 256 (order: 1, 12288 bytes)
<6>UDP-Lite hash table entries: 256 (order: 1, 12288 bytes)
<6>NET: Registered protocol family 1
<6>RPC: Registered named UNIX socket transport module.
<6>RPC: Registered udp transport module.
<6>RPC: Registered tcp transport module.
<6>RPC: Registered tcp NFSv4.1 backchannel transport module.
[pm]aw_pm_init!
Initializing RT-Tester: OK
<6>audit: initializing netlink socket (disabled)
<5>type=2000 audit(0.170:1): initialized
<6>I-pipe: head domain Xenomai registered.
<6>Xenomai: hal/arm started.
<6>Xenomai: scheduling class idle registered.
<6>Xenomai: scheduling class rt registered.
<6>Xenomai: real-time nucleus v2.6.2.1 (Day At The Beach) loaded.
<6>Xenomai: debug mode enabled.
<6>Xenomai: starting native API services.
<6>Xenomai: starting POSIX services.
<6>Xenomai: starting RTDM services.
<5>VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
<6>NTFS driver 2.1.30 [Flags: R/W].
<6>fuse init (API version 7.18)
<6>msgmni has been set to 707
<6>alg: No test for stdrng (krng)
<6>Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
<6>io scheduler noop registered
<6>io scheduler deadline registered
<6>io scheduler cfq registered (default)
<6>start plist test
<6>end plist test
<6>Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
<3>[uart]: failed to get uart2's used information
<3>[uart]: failed to get uart3's used information
<6>[uart]: used uart info.: 0x02
<6>[uart]: serial probe 1 irq 2 mapbase 0x01c28400
<6>sunxi-uart.1: ttyS0 at MMIO 0x1c28400 (irq = 2) is a U6_16550A
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Linux version 3.4.24-r1-xeno-debug-r1-xeno-debug-dirty (uminded@uminded-desktop) (gcc version 4.7.3 20130102 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.01-20130125 - Linaro GCC 2013.01) ) #3 PREEMPT Tue Feb 19 22:20:06 CST 2013
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: sun5i
[    0.000000] Memory cut off:
[    0.000000]  MALI : 0x5c000000 - 0x5fffffff  (  64 MB)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Ignoring unrecognised tag 0x00000000
[    0.000000] debug: ignoring loglevel setting.
[    0.000000] Memory Reserved:
[    0.000000]  SYS  : 0x43000000 - 0x4300ffff  (  64 kB)
[    0.000000]  VE   : 0x44000000 - 0x48ffffff  (  80 MB)
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] chip-id: Unknown (AW1625)
[    0.000000] On node 0 totalpages: 114688
[    0.000000] free_area_init_node: node 0, pgdat c07ea920, node_mem_map c0a2f000
[    0.000000]   Normal zone: 896 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 113792 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113792
[    0.000000] Kernel command line: mem=448M@0x40000000 console=ttyS0,115200 panic=10 debug ignore_loglevel print_fatal_signals=1
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 448MB = 448MB total
[    0.000000] Memory: 362300k/362300k available, 96452k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xdc800000 - 0xff000000   ( 552 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0770000   (7584 kB)
[    0.000000]       .init : 0xc0770000 - 0xc07a0000   ( 192 kB)
[    0.000000]       .data : 0xc07a0000 - 0xc07f03a8   ( 321 kB)
[    0.000000]        .bss : 0xc07f03cc - 0xc0a2ea60   (2298 kB)
[    0.000000] SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:96
[    0.000000] timer0: Periodic Mode
[    0.000000] I-pipe, 200.000 MHz clocksource
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[    0.000000] Interrupt pipeline (release #4)
[    0.000000] Console: colour dummy device 80x30
[    0.010000] Calibrating delay loop... 1001.88 BogoMIPS (lpj=5009408)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.070000] Initializing cgroup subsys cpuacct
[    0.070000] Initializing cgroup subsys devices
[    0.070000] Initializing cgroup subsys freezer
[    0.080000] Initializing cgroup subsys blkio
[    0.080000] CPU: Testing write buffer coherency: ok
[    0.090000] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
[    0.090000] Setting up static identity map for 0x4055de48 - 0x4055dea0
[    0.100000] devtmpfs: initialized
[    0.100000] dummy:
[    0.110000] NET: Registered protocol family 16
[    0.110000] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.120000] SOFTWINNER DMA Driver, (c) 2003-2004,2006 Simtec Electronics
[    0.120000] Initialize DMAC OK
[    0.130000] bio: create slab <bio-0> at 0
[    0.130000] SCSI subsystem initialized
[    0.140000] usbcore: registered new interface driver usbfs
[    0.140000] usbcore: registered new interface driver hub
[    0.140000] usbcore: registered new device driver usb
[    0.150000] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.160000] cfg80211: Calling CRDA to update world regulatory domain
[    0.160000] Init eGon pin module V2.0
[    0.170000] Switching to clocksource ipipe_tsc
[    0.170000] FS-Cache: Loaded
[    0.170000] CacheFiles: Loaded
[    0.180000] timer0: Oneshot Mode
[    0.180000] [usb_manager]: CONFIG_USB_SW_SUN5I_USB0_HOST_ONLY
[    0.180000] [sw_hcd0]: usb host driver initialize........
[    0.180000] [sw_hcd0]: [sw_hcd_host0]: open_usb_clock
[    0.180000] [hcd0]: open, 0x60(0xc141), 0xcc(0x143)
[    0.180000] [sw_hcd0]: host_init_state = 0
[    0.180000] [sw_hcd0]: platform is usb host
[    0.180000] [sw_hcd0]: sw_hcd_host0: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx (X), HB-ISO Tx (X), SoftConn)
[    0.180000] [sw_hcd0]: sw_hcd_init_controller: sw_hcd_host0: USB Host mode controller at f1c13000 using PIO, IRQ 38
[    0.180000] sw_hcd_host0 sw_hcd_host0: sw_hcd host driver
[    0.180000] sw_hcd_host0 sw_hcd_host0: new USB bus registered, assigned bus number 1
[    0.180000] hub 1-0:1.0: USB hub found
[    0.180000] hub 1-0:1.0: 1 port detected
[    0.180000] [sw_hcd_host0]: Set USB Power ON
[    0.180000] axp driver uning configuration failed(562)
[    0.180000] axp driver uning configuration failed(574)
[    0.180000] NET: Registered protocol family 2
[    0.180000] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.180000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.180000] TCP bind hash table entries: 16384 (order: 6, 327680 bytes)
[    0.180000] TCP: Hash tables configured (established 16384 bind 16384)
[    0.180000] TCP: reno registered
[    0.180000] UDP hash table entries: 256 (order: 1, 12288 bytes)
[    0.180000] UDP-Lite hash table entries: 256 (order: 1, 12288 bytes)
[    0.180000] NET: Registered protocol family 1
[    0.180000] RPC: Registered named UNIX socket transport module.
[    0.180000] RPC: Registered udp transport module.
[    0.180000] RPC: Registered tcp transport module.
[    0.180000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.180000] [pm]aw_pm_init!
[    0.180000] Initializing RT-Tester: OK
[    0.180000] audit: initializing netlink socket (disabled)
[    0.180000] type=2000 audit(0.170:1): initialized
[    0.190000] I-pipe: head domain Xenomai registered.
[    0.190000] Xenomai: hal/arm started.
[    0.190000] Xenomai: scheduling class idle registered.
[   21.610000] Xenomai: scheduling class rt registered.
[   21.610000] Xenomai: real-time nucleus v2.6.2.1 (Day At The Beach) loaded.
[   21.610000] Xenomai: debug mode enabled.
[   21.610000] Xenomai: starting native API services.
[   21.610000] Xenomai: starting POSIX services.
[   42.310000] Xenomai: starting RTDM services.
[   42.310000] VFS: Disk quotas dquot_6.5.2
[   42.310000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   42.310000] NTFS driver 2.1.30 [Flags: R/W].
[   42.310000] fuse init (API version 7.18)
[   42.310000] msgmni has been set to 707
[   42.310000] alg: No test for stdrng (krng)
[   42.310000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[   42.310000] io scheduler noop registered
[   42.310000] io scheduler deadline registered
[   42.310000] io scheduler cfq registered (default)
[   42.310000] start plist test
[   42.310000] end plist test
[   42.310000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[   42.310000] [uart]: failed to get uart2's used information
[   42.310000] [uart]: failed to get uart3's used information
[   42.310000] [uart]: used uart info.: 0x02
[   42.310000] [uart]: serial probe 1 irq 2 mapbase 0x01c28400
[   42.310000] sunxi-uart.1: ttyS0 at MMIO 0x1c28400 (irq = 2) is a U6_16550A
<6>console [ttyS0] enabled
[   42.310000] console [ttyS0] enabled
<6>brd: module loaded
[   42.310000] brd: module loaded
<6>loop: module loaded
[   42.310000] loop: module loaded
<6>'Low Performance USB Block' driver is deprecated. Please switch to usb-storage
[   42.310000] 'Low Performance USB Block' driver is deprecated. Please switch to usb-storage
<6>usbcore: registered new interface driver ub
[   42.310000] usbcore: registered new interface driver ub
<6>sun4i gpio driver init
[   42.310000] sun4i gpio driver init
[spi]: sw spi init !!
[   42.310000] [spi]: sw spi init !!
[spi]: sw spi init fetch spi0 uning configuration failed
[   42.310000] [spi]: sw spi init fetch spi0 uning configuration failed
[spi]: Get spi devices number failed
[   42.310000] [spi]: Get spi devices number failed
[spi]: register spi devices board info failed
[   42.310000] [spi]: register spi devices board info failed
[spi]: drivers/spi/spi_sunxi.c(L1872) [   42.310000] [spi]: drivers/spi/spi_sunxi.c(L1872) get spi 2 para failed, err code = -4
get spi 2 para failed, err code = -4
[spi]: source = sdram_pll_p, src_clk = 408000000, mclk 102000000
[   42.310000] [spi]: source = sdram_pll_p, src_clk = 408000000, mclk 102000000
<6>sun5i-spi sun5i-spi.2: master is unqueued, this is deprecated
[   42.310000] sun5i-spi sun5i-spi.2: master is unqueued, this is deprecated
[spi]: allwinners SoC SPI Driver loaded for Bus SPI-2 with 1 Slaves attached
[   42.310000] [spi]: allwinners SoC SPI Driver loaded for Bus SPI-2 with 1 Slaves attached
[spi]: [spi-2]: driver probe succeed, base f1c17000, irq 12, dma_id 2!
[   42.310000] [spi]: [spi-2]: driver probe succeed, base f1c17000, irq 12, dma_id 2!
<6>ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   42.310000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<6>ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   42.310000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[sw-ehci1]: open clock
[   42.310000] [sw-ehci1]: open clock
[sw-ehci1]: Set USB Power ON
[   42.310000] [sw-ehci1]: Set USB Power ON
<6>sw-ehci sw-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[   42.310000] sw-ehci sw-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
<6>sw-ehci sw-ehci.1: new USB bus registered, assigned bus number 2
[   42.310000] sw-ehci sw-ehci.1: new USB bus registered, assigned bus number 2
<6>sw-ehci sw-ehci.1: irq 39, io mem 0xf1c14000
[   42.310000] sw-ehci sw-ehci.1: irq 39, io mem 0xf1c14000


Xenomai services has been started. But then later it freezes at sw-ehci. Hmmmm.

uMinded

Hmm that is quite strange... I did not go anywhere near that subsystem.

Similar Bootlog

You can see in that if you search for "sw-ehci1" that that IRQ and memory address is indeed correct so why it would freeze I have no idea.

crubille:

  Did you have any USB issues when it comes to booting? Can you post your 3.4.x config file?

Tele

#54
Quote from: uMinded on February 20, 2013, 12:58:49 PM
Hmm that is quite strange...

Have to do it methodically. First we should compile a vanilla sunxi-3.2.24-r1 kernel with an A13_defconfig. If it runs then we can patch it with adeos-ipipe and high-res timer.

By the way, I have some doubts about this 3.2.24 kernel way. Because adeos ipipe patch was made for 3.2.21 kernel not for 3.2.24. If the patch runs without error (after modification) that is nice but it does not necessarily follow that is enough for the correct kernel patch. If you wanna be precise you have to compare 3.2.24 and 3.2.21 vanilla kernels, and then sunxi kernels in the aspect of ipipe patches. Otherwise you take some risk, you enter a twilight zone.

Im gonna try a vanilla sunxi-3.2.24-r1, then I come back to report.

EDIT:
I cant test that because it does not exist.
Maybe sunxi-3.4.24 patched with adeos ipipe 3.4.6
Hmmm.
EDIT2:
I cant do it for now. Sunxi gihub returns a server error 500. uMinded could you upload an unmodified sunxi-3.4.24-r1 onto your github please.

uMinded

Quote from: Tele on February 20, 2013, 02:05:57 PM
Have to do it methodically. First we should compile a vanilla sunxi-3.2.24-r1 kernel with an A13_defconfig. If it runs then we can patch it with adeos-ipipe and high-res timer.

I agree, I will upload a vanilla kernel with just a defconfig.

Quote from: Tele on February 20, 2013, 02:05:57 PM
By the way, I have some doubts about this 3.4.24 kernel way. Because adeos ipipe patch was made for 3.2.21 kernel not for 3.2.24. If the patch runs without error (after modification) that is nice but it does not necessarily follow that is enough for the correct kernel patch. If you wanna be precise you have to compare 3.2.24 and 3.2.21 vanilla kernels, and then sunxi kernels in the aspect of ipipe patches. Otherwise you take some risk, you enter a twilight zone.

The I-Pipe patch really is not that much of a modification, I would say over half if it is just putting spinlocks in the appropriate places. And revisions between the minor version are exactly that, minor. CHANGELOGS Just put in the kernel version in the web address to bring up the commit log and 80% are bugfixes for specific hardware, 10% code tweeks (like a line or two), 10% are actual compile/module tweeks.

Kernel development has seriously accelerated in the past 5 years, I remember back when I was working on 2.6.x and now were on 3.8.x!


Quote from: Tele on February 20, 2013, 02:05:57 PM
I cant test that because it does not exist.
Maybe sunxi-3.4.24 patched with adeos ipipe 3.4.6
Hmmm.
EDIT2:
I cant do it for now. Sunxi gihub returns a server error 500. uMinded could you upload an unmodified sunxi-3.4.24-r1 onto your github please.

I just started using github last week, I am having huge problems pushing to remotes as I use two different computers for development and my branch pointers are not being stored properly, checkouts do not pull changes, etc. Finding a branch in the linux-sunxi kernel is painful at best as "git branch -a" only lists the ones one off master. the 3.4.24-r1 is in a remote node.


git clone git://github.com/linux-sunxi/linux-sunxi.git
git checkout sunxi-v3.4.24-r1

// If you do the following:

git log --all | grep "2.4."

// You will get a listing of the current working branches. Anything with a -rn appended seems to have full sunxi patches.

ehj666

Quote from: Tele on February 20, 2013, 09:16:37 AM
Xenomai services has been started. But then later it freezes at sw-ehci. Hmmmm.

Yep. Just confirming, I get the same thing.

Tele

Quote from: uMinded on February 20, 2013, 03:27:06 PM

The I-Pipe patch really is not that much....
Its ok, I believe you. I was just thinking loudly. But Im a noobcake anyway, and thats a fact.

Quote from: uMinded on February 20, 2013, 03:27:06 PM

git clone git://github.com/linux-sunxi/linux-sunxi.git
git checkout sunxi-v3.4.24-r1

// If you do the following:

git log --all | grep "2.4."

// You will get a listing of the current working branches. Anything with a -rn appended seems to have full sunxi patches.

I hate 'git checkout'. It downloads about 1GB datas, althought sunxi-v3.4.24.r1.tar.gz is about 140MB. 'git checkout' is a peas of crab, but ok I will use it, if must.

uMinded

Quote from: Tele on February 20, 2013, 04:50:05 PM
I hate 'git checkout'. It downloads about 1GB datas, althought sunxi-v3.4.24.r1.tar.gz is about 140MB. 'git checkout' is a peas of crab, but ok I will use it, if must.

Where the heck did you find sunxi-v3.4.24.r1.tar.gz?? I have not found a way to download the isolated commits and 3.4.24-r1 is not listed as a tracked branch.

Yes it does download about 1GB even though the kernel source is <300mb but thats because the 2.4.24-r1 is about 16 branches deep and a couple hundred thousand commits. I'm sure theirs a way to just checkout the thread of commits for your requested checkout but I am new to Git as well...


Here is a13-olinuxino_defconfig + the boot string:
Linux-3.4.24-r1-vanilla

Tele

Quote from: uMinded on February 20, 2013, 06:02:04 PM
Where the heck did you find sunxi-v3.4.24.r1.tar.gz?? ...

Yes you can download gzipped tarballs as well.
https://github.com/linux-sunxi/linux-sunxi/tags

You will find a huge list (611) of tagged files. At the beginning and middle of the list you can see vanilla unmodified kernels, bases of forks. They look like v3.x.y or v2.x.y...all vanilla kernels, no sunxi stuffs inside. At the end of list(after many 'next page') you will see sunxi-3.x.y files, they are stable sunxi releases. They are about 140MB gzipped tarballs. At this moment it doesnt work, after few 'next page' it shows a server error 500. It worked before, and I used it instead of stupid 'github checkout':
Counting files...
Compressing files...
Getting files...
then you better go to take a lunch break, it wont be a quick one.
I reported this bug to github, I hope they fix it soon.