T4QDS e6500 core and U-Boot 64-bit
Hi All,
The T4240 on the T4QDS board is a PPC e6500 core (64 bit), but it is configured in U-Boot as an e500 core, which is 32 bit. Why is this? Can it be updated to e6500?
This leads directly into another question: can U-Boot be compiled and run 64-bit? So far, I have been unable to make it work with a 64-bit compiler. I'm running into these errors:
cc1: error: -mcall not supported in this configuration
cc1: error: -mrelocatable not supported in this configuration
cc1: error: -meabi not supported in this configuration
Specifying CFLAGS="-meabi -mrelocatable -mcall-sysv" will get through make T4240QDS_config without errors, but the above errors show up when making the following targets:
Quoted 4 lines
include/autoconf.mkinclude/autoconf.mk.depinclude/spl-autoconf.mkinclude/tpl-autoconf.mk
The build then fails, with a call to cross-gcc which does not include the specified CFLAGS. Is this a bug in the Makefile, that CFLAGS is not being passed to the call to cross-gcc?
Thanks,
Danny
Dear Danny Gale,
Quoted 3 lines · In message <[email protected]> you wrote:
The T4240 on the T4QDS board is a PPC e6500 core (64 bit), but it is configured in U-Boot as an e500 core, which is 32 bit. Why is this?
Becuase it simply works :-)
Quoted 1 line
Can it be updated to e6500?
Yes - if you add support for 64 bit configurations in general, and for powerpc64 in particular.
Quoted 3 lines
This leads directly into another question: can U-Boot be compiled and run 64-bit? So far, I have been unable to make it work with a 64-bit compiler. I'm running into these errors:
Not out of the box.
What is your actual reason for wanting to run a 64 bit boot loader?
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 1st Old Man: Gee, its windy today. 2nd Old Man: No it's not... it's Thursday. 3rd Old Man: Yeh, me too. Let's go for a beer.
Hi Wolfgang,
Thanks for your reply. My responses are inline below.
Quoted 10 lines · Wolfgang Denk
Dear Danny Gale,
Quoted 2 lines · In message <[email protected]> you wrote:
The T4240 on the T4QDS board is a PPC e6500 core (64 bit), but it is configured in U-Boot as an e500 core, which is 32 bit. Why is this?
Becuase it simply works :-)
Quoted 1 line
Can it be updated to e6500?
Yes - if you add support for 64 bit configurations in general, and for powerpc64 in particular.
I don't even have a sense for what would be involved here. How fundamentally would the U-Boot code need to change?
Quoted 7 lines
Quoted 3 lines
This leads directly into another question: can U-Boot be compiled and run 64-bit? So far, I have been unable to make it work with a 64-bit compiler. I'm running into these errors:
Not out of the box.
What is your actual reason for wanting to run a 64 bit boot loader?
My reason for wanting to run 64-bit is that this system has 12 GB of RAM. Will 32-bit U-Boot be able to access and test more than 4 GB of RAM?
Thanks again,
Danny
Quoted 10 lines · Danny Gale
Hi Wolfgang,
Thanks for your reply. My responses are inline below.
Quoted 5 lines · Wolfgang Denk
Dear Danny Gale,
Quoted 2 lines · In message <[email protected]> you wrote:
The T4240 on the T4QDS board is a PPC e6500 core (64 bit), but it is configured in U-Boot as an e500 core, which is 32 bit. Why is this?
Quoted 7 lines
Quoted 5 lines
Becuase it simply works :-)
Quoted 1 line
Can it be updated to e6500?
Yes - if you add support for 64 bit configurations in general, and for powerpc64 in particular.
I don't even have a sense for what would be involved here. How fundamentally would the U-Boot code need to change?
The common U-Boot code should be more or less OK -- the armv8 target runs as 64-bit, and sandbox can as well. The PPC code is another matter, though. You'd need to hack up or replace a bunch of asm code at the least.
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
This leads directly into another question: can U-Boot be compiled and run 64-bit? So far, I have been unable to make it work with a 64-bit compiler. I'm running into these errors:
Not out of the box.
What is your actual reason for wanting to run a 64 bit boot loader?
My reason for wanting to run 64-bit is that this system has 12 GB of RAM. Will 32-bit U-Boot be able to access and test more than 4 GB of RAM?
32-bit U-Boot can detect (or otherwise know about) and tell the OS about large amounts of RAM, but it can only directly access 2 GiB.
-Scott
Dear Danny,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Yes - if you add support for 64 bit configurations in general, and for powerpc64 in particular.
I don't even have a sense for what would be involved here. How fundamentally would the U-Boot code need to change?
It's probably heavy. There is a ton of places where we assume we can put an address in a "long" data type, etc.
Quoted 2 lines
My reason for wanting to run 64-bit is that this system has 12 GB of RAM. Will 32-bit U-Boot be able to access and test more than 4 GB of RAM?
No. For the "access" part: usually this i not really needed. U-Boot is a boot loader, intended to load and start an OS. for this, a 32 bit address space should be more than sufficient. For the "test" part, it is probably much easier to add a customized memory test (or fix just the existing memory test such that it can be built for a 64 bit mode) and use this, then trying to run all of U-Boot in 64 bit mode.
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 "No matter where you go, there you are..." - Buckaroo Banzai
Quoted 11 lines · Wolfgang Denk
Dear Danny,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Yes - if you add support for 64 bit configurations in general, and for powerpc64 in particular.
I don't even have a sense for what would be involved here. How fundamentally would the U-Boot code need to change?
It's probably heavy. There is a ton of places where we assume we can put an address in a "long" data type, etc.
That's not a problem on 64-bit. It's putting a pointer in an "int" that breaks.
-Scott
Quoted 6 lines · Wolfgang Denk
For the "test"
part, it is probably much easier to add a customized memory test (or fix just the existing memory test such that it can be built for a 64 bit mode) and use this, then trying to run all of U-Boot in 64 bit mode.
There already is PowerPC memory test code in U-Boot that supports more than 2GB. It uses sliding TLB windows. If it doesn't already support 12GB, then it should be easy to add that support.
Quoted 11 lines · Timur Tabi
Quoted 6 lines · Wolfgang Denk
For the "test"
part, it is probably much easier to add a customized memory test (or fix just the existing memory test such that it can be built for a 64 bit mode) and use this, then trying to run all of U-Boot in 64 bit mode.There already is PowerPC memory test code in U-Boot that supports more than 2GB. It uses sliding TLB windows. If it doesn't already support 12GB, then it should be easy to add that support.
If the target is to test memory, current u-boot supports 36-bit address to cover 64GB memory. As everybody explained, only 2GB is "visible" at a time. But actually all memory are read to use (by Linux or other OS). The POST memory test slides the 2GB window to cover all DDR. It will remap back the window, as you would see the message on the console.
York