Skip to contentSkip to conversation

Error while building Xenomai on Powerpc with instrument function entries enabled

Xenomai-help Giammarco Zacheo 3 participants 10 messages Sep 29, 2008 – Oct 7, 2008 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

While building the kernel with I-Pipe Tracer turned on with "Instrument function entries" enabled i got the following error:

[email protected]> make
make -C /home/giammarco/xenomai-ppc/linux-2.6-denx O=/home/giammarco/xenomai-ppc/linux-2.6-denx-build/.
Using /home/giammarco/xenomai-ppc/linux-2.6-denx as source for kernel

  GEN     /home/giammarco/xenomai-ppc/linux-2.6-denx-build/Makefile
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h

CALL
/home/giammarco/xenomai-ppc/linux-2.6-denx/scripts/checksyscalls.sh
CHK include/linux/compile.h
CALL
/home/giammarco/xenomai-ppc/linux-2.6-denx/arch/powerpc/kernel/systbl_chk.sh
CALL
/home/giammarco/xenomai-ppc/linux-2.6-denx/arch/powerpc/kernel/prom_init_check.sh
Error: External symbol '_mcount' referenced from prom_init.c make[3]: *** [prom_init_check] Error 1
make[2]: *** [arch/powerpc/kernel] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

The machine the kernel is configured for is a bPlan Efika computer, based on mpc5200b.

I'm using DENX linux kernel 2.6.26, Xenomai 2.4.5, and a gcc 4.3.1.

Thank you

Giammarco

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

It worked. Thanks a lot.

Giammarco

Quoted 60 lines · Philippe Gerum
Quoted 7 lines · Giammarco Zacheo

While building the kernel with I-Pipe Tracer turned on with "Instrument function entries" enabled i got the following error:

[email protected]> make
make -C /home/giammarco/xenomai-ppc/linux-2.6-denx O=/home/giammarco/xenomai-ppc/linux-2.6-denx-build/.
Using /home/giammarco/xenomai-ppc/linux-2.6-denx as source for kernel

Quoted 8 lines
  GEN     /home/giammarco/xenomai-ppc/linux-2.6-denx-build/Makefile
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h

CALL
/home/giammarco/xenomai-ppc/linux-2.6-denx/scripts/checksyscalls.sh
CHK include/linux/compile.h
CALL

/home/giammarco/xenomai-ppc/linux-2.6-denx/arch/powerpc/kernel/systbl_chk.sh

Quoted 2 lines

CALL

/home/giammarco/xenomai-ppc/linux-2.6-denx/arch/powerpc/kernel/prom_init_check.sh

Quoted 6 lines

Error: External symbol '_mcount' referenced from prom_init.c make[3]: *** [prom_init_check] Error 1
make[2]: *** [arch/powerpc/kernel] Error 2 make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

Quoted 6 lines

The machine the kernel is configured for is a bPlan Efika computer, based on mpc5200b.

I'm using DENX linux kernel 2.6.26, Xenomai 2.4.5, and a gcc 4.3.1.
<http://4.3.1.>

--- arch/powerpc/kernel/prom_init_check.sh~ 2008-07-30
11:38:19.000000000 +0200
+++ arch/powerpc/kernel/prom_init_check.sh 2008-10-01
12:39:47.000000000 +0200

(quoted diff) +1 -1
@@ -20,7 +20,7 @@
 _end enter_prom memcpy memset reloc_offset __secondary_hold
 __secondary_hold_acknowledge __secondary_hold_spinloop __start
 strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224
-reloc_got2 kernstart_addr"
+reloc_got2 kernstart_addr _mcount"
 
 NM="$1"
 OBJ="$2"
Quoted 12 lines

Thank you

Giammarco

------------------------------------------------------------------------

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

#3 lore raw
In reply to a message not in the archive

I was wrong. I am able to compile the kernel, but it hangs very early, giving this output:

zImage starting: loaded at 0x00400000 (sp: 0x017ffe50) Allocating 0x590acc bytes for kernel ...
OF version = 'EFIKA5K2,1.3'
gunzipping (0x01800000 <- 0x00407000:0x00619b3b)...done 0x4cd39c bytes

Linux/PowerPC load: root=/dev/nfs rw nfsroot=192.168.10.122:/opt/eldk/ppc_6xx ip=dhcp console=ttyPSC0
Finalizing device tree... using OF tree (promptr=01003ed8) cpu_exception:

SRR0 0x0180B338 SRR1  0x00043030 MSR  0x00003030
LR   0x01C704B4 CTR   0x01800000 CR   0x42002042   XER 0x0

DAR 0x00000000 DSISR 0x00000000 Type 2
GPR[] 0x40000000 0x017FFE20 0x00000000 0x41820014 0x01C704B4 0x42002042 0xC04D0000 0x017FFD90
GPR[] 0x00000001 0x00625C04 0x07C00008 0x07C00008 0x42002044 0x1004A33C 0x01C647A0 0x017FFC2C
GPR[] 0x01BDCA4C 0x01BDCA6C 0x01BF66C4 0x01BDCA78 0x08000000 0x01BDCA10 0xFFFFFFFF 0x07C53FC8
GPR[] 0x01800000 0x00590ACC 0x07C548A8 0x00000000 0x00000000 0x004062C8 0x0040E134 0x00000000
ibat0U 0x00001FFF ibat0L 0x00000012
ibat1U 0xF0001FFF ibat1L 0xF0000012
ibat2U 0x00000000 ibat2L 0x00000000
ibat3U 0x00000000 ibat3L 0x00000000
dbat0U 0xF0001FFF dbat0L 0xF000002A
dbat1U 0x80001FFF dbat1L 0x8000002A
dbat2U 0x00001FFF dbat2L 0x00000012
dbat3U 0xC0001FFF dbat3L 0xC000002A
HID0 0x0000C000
deadend:

Any hint about?

Giammarco

Quoted 60 lines · Philippe Gerum
Quoted 7 lines · Giammarco Zacheo

While building the kernel with I-Pipe Tracer turned on with "Instrument function entries" enabled i got the following error:

[email protected]> make
make -C /home/giammarco/xenomai-ppc/linux-2.6-denx O=/home/giammarco/xenomai-ppc/linux-2.6-denx-build/.
Using /home/giammarco/xenomai-ppc/linux-2.6-denx as source for kernel

Quoted 8 lines
  GEN     /home/giammarco/xenomai-ppc/linux-2.6-denx-build/Makefile
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h

CALL
/home/giammarco/xenomai-ppc/linux-2.6-denx/scripts/checksyscalls.sh
CHK include/linux/compile.h
CALL

/home/giammarco/xenomai-ppc/linux-2.6-denx/arch/powerpc/kernel/systbl_chk.sh

Quoted 2 lines

CALL

/home/giammarco/xenomai-ppc/linux-2.6-denx/arch/powerpc/kernel/prom_init_check.sh

Quoted 6 lines

Error: External symbol '_mcount' referenced from prom_init.c make[3]: *** [prom_init_check] Error 1
make[2]: *** [arch/powerpc/kernel] Error 2 make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

Quoted 6 lines

The machine the kernel is configured for is a bPlan Efika computer, based on mpc5200b.

I'm using DENX linux kernel 2.6.26, Xenomai 2.4.5, and a gcc 4.3.1.
<http://4.3.1.>

--- arch/powerpc/kernel/prom_init_check.sh~ 2008-07-30
11:38:19.000000000 +0200
+++ arch/powerpc/kernel/prom_init_check.sh 2008-10-01
12:39:47.000000000 +0200

(quoted diff) +1 -1
@@ -20,7 +20,7 @@
 _end enter_prom memcpy memset reloc_offset __secondary_hold
 __secondary_hold_acknowledge __secondary_hold_spinloop __start
 strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224
-reloc_got2 kernstart_addr"
+reloc_got2 kernstart_addr _mcount"
 
 NM="$1"
 OBJ="$2"
Quoted 12 lines

Thank you

Giammarco

------------------------------------------------------------------------

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

#4 lore raw
Quoted 34 lines · Giammarco Zacheo

I was wrong. I am able to compile the kernel, but it hangs very early, giving this output:

zImage starting: loaded at 0x00400000 (sp: 0x017ffe50) Allocating 0x590acc bytes for kernel ...
OF version = 'EFIKA5K2,1.3'
gunzipping (0x01800000 <- 0x00407000:0x00619b3b)...done 0x4cd39c bytes

Linux/PowerPC load: root=/dev/nfs rw nfsroot=192.168.10.122:/opt/eldk/ppc_6xx ip=dhcp console=ttyPSC0
Finalizing device tree... using OF tree (promptr=01003ed8) cpu_exception:

SRR0 0x0180B338 SRR1  0x00043030 MSR  0x00003030
LR   0x01C704B4 CTR   0x01800000 CR   0x42002042   XER 0x0

DAR 0x00000000 DSISR 0x00000000 Type 2
GPR[] 0x40000000 0x017FFE20 0x00000000 0x41820014 0x01C704B4 0x42002042 0xC04D0000 0x017FFD90
GPR[] 0x00000001 0x00625C04 0x07C00008 0x07C00008 0x42002044 0x1004A33C 0x01C647A0 0x017FFC2C
GPR[] 0x01BDCA4C 0x01BDCA6C 0x01BF66C4 0x01BDCA78 0x08000000 0x01BDCA10 0xFFFFFFFF 0x07C53FC8
GPR[] 0x01800000 0x00590ACC 0x07C548A8 0x00000000 0x00000000 0x004062C8 0x0040E134 0x00000000
ibat0U 0x00001FFF ibat0L 0x00000012
ibat1U 0xF0001FFF ibat1L 0xF0000012
ibat2U 0x00000000 ibat2L 0x00000000
ibat3U 0x00000000 ibat3L 0x00000000
dbat0U 0xF0001FFF dbat0L 0xF000002A
dbat1U 0x80001FFF dbat1L 0x8000002A
dbat2U 0x00001FFF dbat2L 0x00000012
dbat3U 0xC0001FFF dbat3L 0xC000002A
HID0 0x0000C000
deadend:

Quoted 1 line

Any hint about?

Did you try using vmalloc for the tracer logs ?

Signature · 1 line
					    Gilles.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

I can confirm that with vmalloc'ed buffers it hangs anyhow.

Giammarco

Quoted 54 lines · Giammarco Zacheo

I'm quite sure it was enabled. I will confirm it on Monday.

Giammarco

Quoted 44 lines · Gilles Chanteperdrix
Quoted 9 lines · Giammarco Zacheo

I was wrong. I am able to compile the kernel, but it hangs very early, giving this output:

zImage starting: loaded at 0x00400000 (sp: 0x017ffe50) Allocating 0x590acc bytes for kernel ...
OF version = 'EFIKA5K2,1.3'
gunzipping (0x01800000 <- 0x00407000:0x00619b3b)...done 0x4cd39c bytes

Linux/PowerPC load: root=/dev/nfs rw nfsroot=192.168.10.122:

/opt/eldk/ppc_6xx

Quoted 25 lines

ip=dhcp console=ttyPSC0
Finalizing device tree... using OF tree (promptr=01003ed8) cpu_exception:

SRR0 0x0180B338 SRR1  0x00043030 MSR  0x00003030
LR   0x01C704B4 CTR   0x01800000 CR   0x42002042   XER 0x0

DAR 0x00000000 DSISR 0x00000000 Type 2
GPR[] 0x40000000 0x017FFE20 0x00000000 0x41820014 0x01C704B4 0x42002042 0xC04D0000 0x017FFD90
GPR[] 0x00000001 0x00625C04 0x07C00008 0x07C00008 0x42002044 0x1004A33C 0x01C647A0 0x017FFC2C
GPR[] 0x01BDCA4C 0x01BDCA6C 0x01BF66C4 0x01BDCA78 0x08000000 0x01BDCA10 0xFFFFFFFF 0x07C53FC8
GPR[] 0x01800000 0x00590ACC 0x07C548A8 0x00000000 0x00000000 0x004062C8 0x0040E134 0x00000000
ibat0U 0x00001FFF ibat0L 0x00000012
ibat1U 0xF0001FFF ibat1L 0xF0000012
ibat2U 0x00000000 ibat2L 0x00000000
ibat3U 0x00000000 ibat3L 0x00000000
dbat0U 0xF0001FFF dbat0L 0xF000002A
dbat1U 0x80001FFF dbat1L 0x8000002A
dbat2U 0x00001FFF dbat2L 0x00000012
dbat3U 0xC0001FFF dbat3L 0xC000002A
HID0 0x0000C000
deadend:

Quoted 1 line

Any hint about?

Did you try using vmalloc for the tracer logs ?

--
Gilles.

#7 lore raw
Quoted 2 lines · Giammarco Zacheo

I can confirm that with vmalloc'ed buffers it hangs anyhow.

The issue you face is typical from the internal mcount() call referring to unmapped memory in early boot code. Some routine there lacks a "notrace" specifier. Finding it will require some work.

Quoted 73 lines

Giammarco

On Fri, Oct 3, 2008 at 8:29 PM, Giammarco Zacheo <[email protected] <mailto:[email protected]>> wrote:

    I'm quite sure it was enabled. I will confirm it on Monday.

    Giammarco


    On Fri, Oct 3, 2008 at 8:19 PM, Gilles Chanteperdrix
    <[email protected]
    <mailto:[email protected]>> wrote:

        Giammarco Zacheo wrote:
        > I was wrong. I am able to compile the kernel, but it hangs
        very early,
        > giving this output:
        >
        > zImage starting: loaded at 0x00400000 (sp: 0x017ffe50)
        > Allocating 0x590acc bytes for kernel ...
        > OF version = 'EFIKA5K2,1.3'
        > gunzipping (0x01800000 <- 0x00407000:0x00619b3b)...done
        0x4cd39c bytes
        >
        > Linux/PowerPC load: root=/dev/nfs rw
        nfsroot=192.168.10.122:/opt/eldk/ppc_6xx
        > ip=dhcp console=ttyPSC0
        > Finalizing device tree... using OF tree (promptr=01003ed8)
        > cpu_exception:
        > SRR0 0x0180B338 SRR1  0x00043030 MSR  0x00003030
        > LR   0x01C704B4 CTR   0x01800000 CR   0x42002042   XER 0x0
        > DAR  0x00000000 DSISR 0x00000000 Type 2
        > GPR[] 0x40000000 0x017FFE20 0x00000000 0x41820014 0x01C704B4
        0x42002042
        > 0xC04D0000 0x017FFD90
        > GPR[] 0x00000001 0x00625C04 0x07C00008 0x07C00008 0x42002044
        0x1004A33C
        > 0x01C647A0 0x017FFC2C
        > GPR[] 0x01BDCA4C 0x01BDCA6C 0x01BF66C4 0x01BDCA78 0x08000000
        0x01BDCA10
        > 0xFFFFFFFF 0x07C53FC8
        > GPR[] 0x01800000 0x00590ACC 0x07C548A8 0x00000000 0x00000000
        0x004062C8
        > 0x0040E134 0x00000000
        > ibat0U 0x00001FFF ibat0L 0x00000012
        > ibat1U 0xF0001FFF ibat1L 0xF0000012
        > ibat2U 0x00000000 ibat2L 0x00000000
        > ibat3U 0x00000000 ibat3L 0x00000000
        > dbat0U 0xF0001FFF dbat0L 0xF000002A
        > dbat1U 0x80001FFF dbat1L 0x8000002A
        > dbat2U 0x00001FFF dbat2L 0x00000012
        > dbat3U 0xC0001FFF dbat3L 0xC000002A
        > HID0 0x0000C000
        > deadend:
        >
        > Any hint about?

        Did you try using vmalloc for the tracer logs ?


        --
                                                   Gilles.

------------------------------------------------------------------------

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.
#8 lore raw

Thank you. There's no hurry actually, just reporting the bug.

If there's something I can do to help...

Giammarco

Quoted 86 lines · Philippe Gerum
Quoted 2 lines · Giammarco Zacheo

I can confirm that with vmalloc'ed buffers it hangs anyhow.

The issue you face is typical from the internal mcount() call referring to unmapped memory in early boot code. Some routine there lacks a "notrace" specifier. Finding it will require some work.

Quoted 67 lines

Giammarco

On Fri, Oct 3, 2008 at 8:29 PM, Giammarco Zacheo <[email protected] <mailto:[email protected]>> wrote:

    I'm quite sure it was enabled. I will confirm it on Monday.

    Giammarco


    On Fri, Oct 3, 2008 at 8:19 PM, Gilles Chanteperdrix
    <[email protected]
    <mailto:[email protected]>> wrote:

        Giammarco Zacheo wrote:
        > I was wrong. I am able to compile the kernel, but it hangs
        very early,
        > giving this output:
        >
        > zImage starting: loaded at 0x00400000 (sp: 0x017ffe50)
        > Allocating 0x590acc bytes for kernel ...
        > OF version = 'EFIKA5K2,1.3'
        > gunzipping (0x01800000 <- 0x00407000:0x00619b3b)...done
        0x4cd39c bytes
        >
        > Linux/PowerPC load: root=/dev/nfs rw
        nfsroot=192.168.10.122:/opt/eldk/ppc_6xx
        > ip=dhcp console=ttyPSC0
        > Finalizing device tree... using OF tree (promptr=01003ed8)
        > cpu_exception:
        > SRR0 0x0180B338 SRR1  0x00043030 MSR  0x00003030
        > LR   0x01C704B4 CTR   0x01800000 CR   0x42002042   XER 0x0
        > DAR  0x00000000 DSISR 0x00000000 Type 2
        > GPR[] 0x40000000 0x017FFE20 0x00000000 0x41820014 0x01C704B4
        0x42002042
        > 0xC04D0000 0x017FFD90
        > GPR[] 0x00000001 0x00625C04 0x07C00008 0x07C00008 0x42002044
        0x1004A33C
        > 0x01C647A0 0x017FFC2C
        > GPR[] 0x01BDCA4C 0x01BDCA6C 0x01BF66C4 0x01BDCA78 0x08000000
        0x01BDCA10
        > 0xFFFFFFFF 0x07C53FC8
        > GPR[] 0x01800000 0x00590ACC 0x07C548A8 0x00000000 0x00000000
        0x004062C8
        > 0x0040E134 0x00000000
        > ibat0U 0x00001FFF ibat0L 0x00000012
        > ibat1U 0xF0001FFF ibat1L 0xF0000012
        > ibat2U 0x00000000 ibat2L 0x00000000
        > ibat3U 0x00000000 ibat3L 0x00000000
        > dbat0U 0xF0001FFF dbat0L 0xF000002A
        > dbat1U 0x80001FFF dbat1L 0x8000002A
        > dbat2U 0x00001FFF dbat2L 0x00000012
        > dbat3U 0xC0001FFF dbat3L 0xC000002A
        > HID0 0x0000C000
        > deadend:
        >
        > Any hint about?

        Did you try using vmalloc for the tracer logs ?


        --
                                                   Gilles.
Quoted 6 lines

------------------------------------------------------------------------

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

--
Philippe.

#9 lore raw
Quoted 4 lines · Giammarco Zacheo

Thank you. There's no hurry actually, just reporting the bug.

If there's something I can do to help...

I have no efika board at hand, but just booted a plain lite5200 IceCube successfully, with all tracing options enabled. This is a DENX-originated kernel (tagged "DENX-v2.6.26-stable") from the usual place.

Looking again to the trace output you got, I wonder now if the device tree file you are using is ok. Could you confirm that your board boots with the I-pipe support fully disabled?

Signature · 1 line
Philippe.
#10 lore raw
Quoted 6 lines · Philippe Gerum
Quoted 4 lines · Giammarco Zacheo

Thank you. There's no hurry actually, just reporting the bug.

If there's something I can do to help...

Quoted 8 lines

I have no efika board at hand, but just booted a plain lite5200 IceCube successfully, with all tracing options enabled. This is a DENX-originated kernel (tagged "DENX-v2.6.26-stable") from the usual place.

Looking again to the trace output you got, I wonder now if the device tree file you are using is ok. Could you confirm that your board boots with the I-pipe support fully disabled?

And if so, does it still boot with the I-pipe support enabled and the I-pipe latency tracing option disabled?

Signature · 1 line
Philippe.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw
Quoted 5 lines · Giammarco Zacheo

It boots either with I-pipe support enabled and disabled.

I can also boot with latency tracing enabled, if 'Instrument function entries' is not enabled.

Ok, so back to square #1. It's indeed a problem with mcount() referring to unmapped memory at early init time. The difference must be in the Efika setup code, since an Icecube boots fine with the function entry tracing knob on.

Quoted 33 lines

Giammarco

On Tue, Oct 7, 2008 at 1:45 PM, Philippe Gerum <[email protected] <mailto:[email protected]>> wrote:

Philippe Gerum wrote:
> Giammarco Zacheo wrote:
>> Thank you. There's no hurry actually, just reporting the bug. >>
>> If there's something I can do to help...
>>
>
> I have no efika board at hand, but just booted a plain lite5200 IceCube
> successfully, with all tracing options enabled. This is a DENX-originated kernel
> (tagged "DENX-v2.6.26-stable") from the usual place.
>
> Looking again to the trace output you got, I wonder now if the device tree file
> you are using is ok. Could you confirm that your board boots with the I-pipe
> support fully disabled?
>

And if so, does it still boot with the I-pipe support enabled and the I-pipe
latency tracing option disabled?

--
Philippe.

Signature · 1 line
Philippe.