[U-Boot] [PATCH 03/26] ARM: cp15: setup mmu and enable dcache

Wolfgang Denk wd at denx.de
Mon Sep 13 11:39:54 CEST 2010


Dear "V, Aneesh",

In message <FF55437E1F14DA4BAEB721A458B6701706C58880FB at dbde02.ent.ti.com> you wrote:
> 
> > Initially I had a "done" bit to only set up page tables
> > at the beginning. However, since the aligmnent requirement
> > was for the whole object file, this extra integer tool 16kB
> > in BSS, so I chose to remove it.
> 
> This is rather strange. I thought the linker would have done better. 
> However, I could overcome this problem by making 'done' a non-zero
> initialized variable. Can't you try that?

"non-zero initialized variable" means you moved the storage location
from the bss into the data segment.

The same can be done by using something like

	int done __attribute__ ((section (".data"))) = 0;

This is a better approach because 1) a non-zero value will be easily
misinterpreted as "already done", and 2) this clearly documents what
is going on and why.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I must follow the people.  Am I not their leader? - Benjamin Disraeli


More information about the U-Boot mailing list