[U-Boot] 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:
include/autoconf.mk include/autoconf.mk.dep include/spl-autoconf.mk include/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,
In message 52DF18B3.1080904@coloradoengineeringinc.com 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 :-)
Can it be updated to e6500?
Yes - if you add support for 64 bit configurations in general, and for powerpc64 in particular.
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

Hi Wolfgang,
Thanks for your reply. My responses are inline below.
On 1/22/2014 2:06 AM, Wolfgang Denk wrote:
Dear Danny Gale,
In message 52DF18B3.1080904@coloradoengineeringinc.com 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 :-)
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?
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

On Thu, 2014-01-23 at 11:13 -0700, Danny Gale wrote:
Hi Wolfgang,
Thanks for your reply. My responses are inline below.
On 1/22/2014 2:06 AM, Wolfgang Denk wrote:
Dear Danny Gale,
In message 52DF18B3.1080904@coloradoengineeringinc.com 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 :-)
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.
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,
In message 52E15BAD.1020400@coloradoengineeringinc.com you wrote:
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.
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

On Fri, 2014-01-24 at 14:45 +0100, Wolfgang Denk wrote:
Dear Danny,
In message 52E15BAD.1020400@coloradoengineeringinc.com you wrote:
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

On Fri, Jan 24, 2014 at 7:45 AM, Wolfgang Denk wd@denx.de wrote:
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.

On 01/25/2014 07:46 AM, Timur Tabi wrote:
On Fri, Jan 24, 2014 at 7:45 AM, Wolfgang Denk wd@denx.de wrote:
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
participants (5)
-
Danny Gale
-
Scott Wood
-
Timur Tabi
-
Wolfgang Denk
-
York Sun