Skip to contentSkip to conversation

Kernel 3.5.7 not booting in qemu for vexpress-a9 with xenomai-2.6.2.1

Xenomai Thierry Bultel 2 participants 12 messages Apr 7, 2013 – Apr 10, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console, the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Any ideas ? May I have missed something ?

Regards
Thierry

#1 lore raw
Quoted 11 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Quoted 6 lines

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Signature · 1 line
                                                                Gilles.
#2 lore raw
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion. It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Cheers
Thierry

#3 lore raw
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Signature · 1 line
                                                                Gilles.
#4 lore raw
Quoted 46 lines · Gilles Chanteperdrix
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Quoted 8 lines

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Found the mail: "I just got a reply from ARM support and obviously I missed the thing that my release of Cortex-A9 does NOT have a global timer (they added it from r1p0, mine is r0p1)."

You know what version your processor is by reading the first few lines printed by the kernel:
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d

41 is used by all cores from ARM
fc09 represents the cortex a9

The remaining 1 and 2 mean that this cortex a9 is an r1p2

Signature · 1 line
                                                                Gilles.
#5 lore raw
Quoted 62 lines · Gilles Chanteperdrix
Quoted 46 lines · Gilles Chanteperdrix
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Quoted 8 lines

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Found the mail: "I just got a reply from ARM support and obviously I missed the thing that my release of Cortex-A9 does NOT have a global timer (they added it from r1p0, mine is r0p1)."

Quoted 9 lines

You know what version your processor is by reading the first few lines printed by the kernel:
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d

41 is used by all cores from ARM
fc09 represents the cortex a9

The remaining 1 and 2 mean that this cortex a9 is an r1p2

Many thanks,
I confirm that this fix makes vexpress boot in qemu:

arch/arm/kernel/smp_twd.c +4 -0
diff -Nru linux-3.5.7/arch/arm/kernel/smp_twd.c linux-3.5.7.new/arch/arm/kernel/smp_twd.c
@@ -28,6 +28,7 @@
 #include <asm/localtimer.h>
 #include <asm/hardware/gic.h>
 #include <asm/ipipe.h>
+#include <asm/cputype.h>
 
 /* set up by the platform code */
 static void __iomem *twd_base;
@@ -56,6 +57,9 @@
 
 static void __cpuinit gt_setup(unsigned long base_paddr, unsigned bits)
 {
+	if ((read_cpuid_id() & 0xf00000) == 0)
+		return;
+
 	twd_clk = twd_get_clock();
 
 	if (!IS_ERR_OR_NULL(twd_clk))

FYI I have CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c53c7d

Cheers
Thierry

#6 lore raw
Quoted 70 lines · Thierry Bultel
Quoted 69 lines · Gilles Chanteperdrix
Quoted 46 lines · Gilles Chanteperdrix
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Quoted 8 lines

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Found the mail: "I just got a reply from ARM support and obviously I missed the thing that my release of Cortex-A9 does NOT have a global timer (they added it from r1p0, mine is r0p1)."

You know what version your processor is by reading the first few lines printed by the kernel:
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d

41 is used by all cores from ARM
fc09 represents the cortex a9

Quoted 6 lines
Quoted 2 lines

The remaining 1 and 2 mean that this cortex a9 is an r1p2

Many thanks,
I confirm that this fix makes vexpress boot in qemu:

Merged thanks. I believe you should keep the calculation of twd_timer_rate, otherwise the twd timers will not be calibratd correctly. The following:

http://git.xenomai.org/?p=ipipe-gch.git;a=commitdiff;h=9a776ad3c41fa1aef1b60d0cce5de3ca9dece42d;hp=82b6948fed3581e65bcce64b91b16140686263a7

Works for me.

Signature · 1 line
                                                                Gilles.
#7 lore raw
Quoted 80 lines · Gilles Chanteperdrix
Quoted 70 lines · Thierry Bultel
Quoted 69 lines · Gilles Chanteperdrix
Quoted 46 lines · Gilles Chanteperdrix
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Quoted 8 lines

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Found the mail: "I just got a reply from ARM support and obviously I missed the thing that my release of Cortex-A9 does NOT have a global timer (they added it from r1p0, mine is r0p1)."

You know what version your processor is by reading the first few lines printed by the kernel:
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d

41 is used by all cores from ARM
fc09 represents the cortex a9

Quoted 6 lines
Quoted 2 lines

The remaining 1 and 2 mean that this cortex a9 is an r1p2

Many thanks,
I confirm that this fix makes vexpress boot in qemu:

Quoted 9 lines

Merged thanks. I believe you should keep the calculation of twd_timer_rate, otherwise the twd timers will not be calibratd correctly. The following:

http://git.xenomai.org/?p=ipipe-gch.git;a=commitdiff;h=9a776ad3c41fa1aef1b60d0cce5de3ca9dece42d;hp=82b6948fed3581e65bcce64b91b16140686263a7

Works for me.

It works on what platform ? It does not in qemu. The boot hangs the same way.

#8 lore raw
Quoted 85 lines · Thierry Bultel
Quoted 84 lines · Gilles Chanteperdrix
Quoted 70 lines · Thierry Bultel
Quoted 69 lines · Gilles Chanteperdrix
Quoted 46 lines · Gilles Chanteperdrix
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Quoted 8 lines

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Found the mail: "I just got a reply from ARM support and obviously I missed the thing that my release of Cortex-A9 does NOT have a global timer (they added it from r1p0, mine is r0p1)."

You know what version your processor is by reading the first few lines printed by the kernel:
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d

41 is used by all cores from ARM
fc09 represents the cortex a9

Quoted 6 lines
Quoted 2 lines

The remaining 1 and 2 mean that this cortex a9 is an r1p2

Many thanks,
I confirm that this fix makes vexpress boot in qemu:

Merged thanks. I believe you should keep the calculation of twd_timer_rate, otherwise the twd timers will not be calibratd correctly. The following:

Quoted 8 lines
Quoted 5 lines

http://git.xenomai.org/?p=ipipe-gch.git;a=commitdiff;h=9a776ad3c41fa1aef1b60d0cce5de3ca9dece42d;hp=82b6948fed3581e65bcce64b91b16140686263a7

Works for me.

It works on what platform ? It does not in qemu. The boot hangs the same way.

It works on omap4, a platform with global timers... So, what you are saying is that it is in fact the twd calibration which hangs?

Signature · 1 line
                                                                Gilles.
#9 lore raw
Quoted 93 lines · Gilles Chanteperdrix
Quoted 91 lines · Thierry Bultel
Quoted 89 lines · Gilles Chanteperdrix
Quoted 70 lines · Thierry Bultel
Quoted 69 lines · Gilles Chanteperdrix
Quoted 46 lines · Gilles Chanteperdrix
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Quoted 8 lines

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Found the mail: "I just got a reply from ARM support and obviously I missed the thing that my release of Cortex-A9 does NOT have a global timer (they added it from r1p0, mine is r0p1)."

You know what version your processor is by reading the first few lines printed by the kernel:
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d

41 is used by all cores from ARM
fc09 represents the cortex a9

Quoted 6 lines
Quoted 2 lines

The remaining 1 and 2 mean that this cortex a9 is an r1p2

Many thanks,
I confirm that this fix makes vexpress boot in qemu:

Merged thanks. I believe you should keep the calculation of twd_timer_rate, otherwise the twd timers will not be calibratd correctly. The following:

http://git.xenomai.org/?p=ipipe-gch.git;a=commitdiff;h=9a776ad3c41fa1aef1b60d0cce5de3ca9dece42d;hp=82b6948fed3581e65bcce64b91b16140686263a7

Works for me.

Quoted 6 lines
Quoted 2 lines

It works on what platform ? It does not in qemu. The boot hangs the same way.

It works on omap4, a platform with global timers... So, what you are saying is that it is in fact the twd calibration which hangs?

Yes indeed

Quoted 1 line
#10 lore raw
In reply to Gilles Chanteperdrix
Quoted 93 lines · Gilles Chanteperdrix
Quoted 91 lines · Thierry Bultel
Quoted 89 lines · Gilles Chanteperdrix
Quoted 70 lines · Thierry Bultel
Quoted 69 lines · Gilles Chanteperdrix
Quoted 46 lines · Gilles Chanteperdrix
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Quoted 8 lines

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Found the mail: "I just got a reply from ARM support and obviously I missed the thing that my release of Cortex-A9 does NOT have a global timer (they added it from r1p0, mine is r0p1)."

You know what version your processor is by reading the first few lines printed by the kernel:
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d

41 is used by all cores from ARM
fc09 represents the cortex a9

Quoted 6 lines
Quoted 2 lines

The remaining 1 and 2 mean that this cortex a9 is an r1p2

Many thanks,
I confirm that this fix makes vexpress boot in qemu:

Merged thanks. I believe you should keep the calculation of twd_timer_rate, otherwise the twd timers will not be calibratd correctly. The following:

http://git.xenomai.org/?p=ipipe-gch.git;a=commitdiff;h=9a776ad3c41fa1aef1b60d0cce5de3ca9dece42d;hp=82b6948fed3581e65bcce64b91b16140686263a7

Works for me.

Quoted 7 lines
Quoted 2 lines

It works on what platform ? It does not in qemu. The boot hangs the same way.

It works on omap4, a platform with global timers... So, what you are saying is that it is in fact the twd calibration which hangs?

Probably related, I first did not notice it,
the twd_get_clock() call fails in my case (See below; smp_twd: clock not found: -2):

Is it safe to call twd_calibrate_rate in this case ?

tbultel@laois:~/Qemu/qemu-1.4.0$ ./arm-softmmu/qemu-system-arm -M
vexpress-a9 -kernel
/shared/Buildroot/output.linaro.vexpress-a9/images/uImage  -m 1024M
-serial stdio -append "console=ttyAMA0"
Booting Linux on physical CPU 0
Initializing cgroup subsys cpuset
Linux version 3.5.7-ipipe (tbultel@laois) (gcc version 4.7.3 20121001
(prerelease) (crosstool-NG linaro-1.13.1-4.7-2012.10-20121022 - Linaro
GCC 2012.10) ) #6 SMP Wed Apr 10 15:00:16 CEST 2013
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: ARM-Versatile Express
Memory policy: ECC disabled, Data cache writealloc
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
PERCPU: Embedded 9 pages/cpu @84626000 s14848 r8192 d13824 u36864
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096
Kernel command line: console=ttyAMA0
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1024MB = 1024MB total
Memory: 975912k/975912k available, 72664k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc0800000 - 0xff000000   (1000 MB)
    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x805a0570   (5730 kB)
      .init : 0x805a1000 - 0x83d7da00   (57203 kB)
      .data : 0x83d7e000 - 0x83db98f8   ( 239 kB)
       .bss : 0x83db991c - 0x83e1f9ac   ( 409 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:256
smp_twd: clock not found: -2
I-pipe, 1.000 MHz clocksource
#11 lore raw
Quoted 102 lines · Thierry Bultel
Quoted 93 lines · Gilles Chanteperdrix
Quoted 91 lines · Thierry Bultel
Quoted 89 lines · Gilles Chanteperdrix
Quoted 70 lines · Thierry Bultel
Quoted 69 lines · Gilles Chanteperdrix
Quoted 46 lines · Gilles Chanteperdrix
Quoted 35 lines · Thierry Bultel
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Thierry Bultel

Hi,

I am using a vanilla 3.5.7 kernel in qemu-1.4.0
The base defconfig is the vexpress.

I want to use xenomai-2.6.2.1 with it.

The non-patched kernel boots fine, the patched one doesnot, there is nothing on the console,
the boot logo does not comeand Qemu then takes 100% CPU.

Here is my command line
./qemu-1.4.0/arm-softmmu/qemu-system-arm -M vexpress-a9 -kernel ./Buildroot/output.linaro.vexpress-a9/build/linux-3.5.7/arch/arm/boot/uImage -append "console=ttyAMA0" -m 1024M -serial stdio

Quoted 7 lines
Quoted 1 line

Any ideas ? May I have missed something ?

Well, vexpress is not in the list of machines supported by Xenomai. So, someone needs to port the I-pipe kernel to it.

Hi Gilles,

We already talked about the vexpress, it was at the beginning of the rtcan discussion.
It used to work (and pretty well), my configuration was:

linux-3.2.21+ipipe-core-3.2.21-arm-1.patch

Quoted 7 lines

and I have just successfully tested

linux-3.2.21+ipipe-core-3.2.21-arm-4.patch
as well.

There is likely not much missing for having it working on the 3.5.7 kernel. I am taking a look.

Quoted 8 lines

Someone did the port of the I-pipe patch to vexpress (but did not contribute it), the difference between vexpress and other cortex A9 based SOCs is that it does not support global timers, the one used by the I-pipe patch as clocksource. The difference between 3.2 and later patches is probably that later patches unconditionally use the global timer. The fix around this is to add code do detect the cortex a9 revision and do not register the global timers when the revision is too old.

Found the mail: "I just got a reply from ARM support and obviously I missed the thing that my release of Cortex-A9 does NOT have a global timer (they added it from r1p0, mine is r0p1)."

You know what version your processor is by reading the first few lines printed by the kernel:
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d

41 is used by all cores from ARM
fc09 represents the cortex a9

Quoted 6 lines
Quoted 2 lines

The remaining 1 and 2 mean that this cortex a9 is an r1p2

Many thanks,
I confirm that this fix makes vexpress boot in qemu:

Merged thanks. I believe you should keep the calculation of twd_timer_rate, otherwise the twd timers will not be calibratd correctly. The following:

http://git.xenomai.org/?p=ipipe-gch.git;a=commitdiff;h=9a776ad3c41fa1aef1b60d0cce5de3ca9dece42d;hp=82b6948fed3581e65bcce64b91b16140686263a7

Works for me.

Quoted 7 lines
Quoted 2 lines

It works on what platform ? It does not in qemu. The boot hangs the same way.

It works on omap4, a platform with global timers... So, what you are saying is that it is in fact the twd calibration which hangs?

Quoted 5 lines

Probably related, I first did not notice it,
the twd_get_clock() call fails in my case (See below; smp_twd: clock not found: -2):

Is it safe to call twd_calibrate_rate in this case ?

See:
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#The_Cortex-A9_case

The issues are probably unrelated. From my point of view, if you want vexpress to really work with I-pipe, someone has to consider the work to be done as a real port of the I-pipe kernel to this architecture. You can use this page as a check list.

Signature · 1 line
                                                                Gilles.