Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Kirkwood hang on boot; possibly uninitialised bss



On Tuesday 22 May 2012 13:42:49 Kate F wrote:
[...]
> So here I presume consinit_called isn't having its static storage
> initialised to 0, as I would expect. nm marvell_machdep.o says
> consinit_called does indeed live in the data segment:
> 
>   000004a4 T consinit
>   00000000 d consinit_called.9898
> 
> And gcc's marvell_machdep.s corresponds:
> 
>       .data
>       .align  2
>       .set    .LANCHOR0,. + 0
>       .type   consinit_called.9898, %object
>       .size   consinit_called.9898, 4
>   consinit_called.9898:
>       .space  4
> 
> So I believe the data segment is not being initialised correctly.

The data section should be read as is from the boot file into memory. As it's 
a .space and not .zero then it's probably getting filled by the linker with 
whatever the linker thinks the fill is for the data output section. You could 
check the kernel directly.

> Unfortunately this is where I fall short; I have no idea where to look
> next, or what to do about it.
> 
> Any suggestions, please?
> 
> 
> Incidentally, gcc is compiling with -fno-zero-initialized-in-bss which
> I presume is correct, because (I think) the bss initialisation is done
> by the kernel during load. Is that right?

bss is initialised after initarm here

http://nxr.netbsd.org/xref/src/sys/arch/arm/arm32/locore.S#67

Nick


Home | Main Index | Thread Index | Old Index