Skip to contentSkip to conversation

T4QDS e6500 core and U-Boot 64-bit

U-Boot Danny Gale 5 participants 8 messages Jan 22, 2014 – Jan 25, 2014

lore
Share & tools
lore

Danny Gale

author
#0 lore raw

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.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

#1 lore raw

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.
author
#2 lore raw

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

#3 lore raw
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

#4 lore raw
In reply to Danny Gale

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
#5 lore raw
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

#6 lore raw
In reply to Wolfgang Denk
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.

#7 lore raw
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