variable type issues in LMB code
Hello Andy & Becky & Kumar,
there is a general problem of variable types with the LMB code; at the moment, it uses some "u64" (and in lib_ppc/bootm.c actually a mix of "u64" and "uint64_t") declarations where I think we should use phys_addr_t resp. phys_size_t types instead. At the moment, this results in lots of compiler messages:
warning: cast from pointer to integer of different size
Could you please have a look and try and clean up?
Thanks in advance.
Best regards,
Wolfgang Denk
Signature · 6 lines
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 "There are three principal ways to lose money: wine, women, and engi- neers. While the first two are more pleasant, the third is by far the more certain." - Baron Rothschild, ca. 1800
Quoted 8 lines · Wolfgang Denk
Hello Andy & Becky & Kumar,
there is a general problem of variable types with the LMB code; at the moment, it uses some "u64" (and in
lib_ppc/bootm.cactually a mix of "u64" and "uint64_t") declarations where I think we should usephys_addr_tresp.phys_size_ttypes instead. At the moment, this results in lots of compiler messages:
Quoted 5 lines
warning: cast from pointer to integer of different size
Could you please have a look and try and clean up?
Thanks in advance.
I see the following when I build for 8641HPCN on the latest tree:
bootm.c: In function ?do_bootm_linux?:
bootm.c:208: warning: cast from pointer to integer of different size bootm.c:215: warning: cast from pointer to integer of different size
It looks like these errors were introduced in the following 2 commits:
commit 41c5eaa7253ed82bbae1eda5667755872c615164
Author: Andy Fleming <[email protected]> Date: Mon Jun 16 13:58:56 2008 -0500
Resize device tree to allow space for board changes and the
chosen node
commit 63796c4e61b207d2e635729d41b7a7f7d188b03c
Author: Andy Fleming <[email protected]> Date: Mon Jun 16 13:58:54 2008 -0500
Add lmb_free
Andy, please fix the build warnings, and change lmb_free to use phys_size_t/phys_addr_t as appropriate - let me know if you have questions about this.
Wolfgang, please let me know if there are other errors you're seeing on some other build config that I haven't addressed here, and I'll look into those.
FYI, one possible source of confusion here for folks who are used to the linux version of the lmb: when the lmb became generic instead of ppc-only, the linux folks decided to always use u64 for types in the lmb code. This made some sense since ppc was the only platform using the lmb that used a smaller data type, and the other platforms lacked the concept of phys_addr_t. We've done "the right thing" in u-boot and used phys_size/addr_t since most of the platforms are 32-bit, and using u64 unconditionally is a waste.
Cheers,
B
Dear Becky,
Quoted 6 lines · in message <[email protected]> you wrote:
I see the following when I build for 8641HPCN on the latest tree:
bootm.c: In function ?do_bootm_linux?:
bootm.c:208: warning: cast from pointer to integer of different size bootm.c:215: warning: cast from pointer to integer of different size
That's what I see, too.
Quoted 3 lines
Wolfgang, please let me know if there are other errors you're seeing on some other build config that I haven't addressed here, and I'll look into those.
That's all, it seems.
Quoted 8 lines
FYI, one possible source of confusion here for folks who are used to the linux version of the lmb: when the lmb became generic instead of ppc-only, the linux folks decided to always use u64 for types in the lmb code. This made some sense since ppc was the only platform using > the lmb that used a smaller data type, and the other platforms lacked > the concept of
phys_addr_t. We've done "the right thing" in u-boot and used phys_size/addr_t since most of the platforms are 32-bit, and > using u64 unconditionally is a waste.
Thanks, and also for the explanation.
Best regards,
Wolfgang Denk
Signature · 4 lines
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 The universe is all a spin-off of the Big Bang.
Quoted 5 lines · Wolfgang Denk
Dear Becky,
in message <[email protected]> you
Quoted 1 line · wrote:
Quoted 7 lines
Quoted 5 lines
I see the following when I build for 8641HPCN on the latest tree:
bootm.c: In function ?do_bootm_linux?:
bootm.c:208: warning: cast from pointer to integer of different size bootm.c:215: warning: cast from pointer to integer of different sizeThat's what I see, too.
I just posted a patch to fix these warnings.
- k