* [U-Boot] IXP425 TEXT_BASE
@ 2009-08-04 11:59 Teh Kok How
2009-08-04 13:14 ` Darius Augulis
0 siblings, 1 reply; 8+ messages in thread
From: Teh Kok How @ 2009-08-04 11:59 UTC (permalink / raw)
To: u-boot
Hi;
I am trying to bring up u-boot-2009-08-rc1 on IXP425 board. May
I know what's the reason that the TEXT_BASE is 0x00f80000 instead of 0 or
0x50000000?
Thanks.
Regards,
KH
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] IXP425 TEXT_BASE
2009-08-04 11:59 [U-Boot] IXP425 TEXT_BASE Teh Kok How
@ 2009-08-04 13:14 ` Darius Augulis
2009-08-04 13:49 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Darius Augulis @ 2009-08-04 13:14 UTC (permalink / raw)
To: u-boot
On 08/04/2009 02:59 PM, Teh Kok How wrote:
> Hi;
>
> I am trying to bring up u-boot-2009-08-rc1 on IXP425 board. May
> I know what's the reason that the TEXT_BASE is 0x00f80000 instead of 0 or
> 0x50000000?
>
> Thanks.
>
Hi Teh,
usually TEXT_BASE is offset, which size depends on your requirements for
stack size and memory size for malloc. If your DRAM base is 0x0 and
TEXT_BASE is 0xf80000, you will have almost 16Mb for stack and malloc
and your u-boot code will be linked and loaded to 0xf80000 address.
16Mb is probably too much, or your DRAM base is not 0x0.
It's only my experience with porting u-boot to Gemini arch, and I may be
wrong.
regards,
Darius A.
>
>
> Regards,
>
> KH
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] IXP425 TEXT_BASE
2009-08-04 13:14 ` Darius Augulis
@ 2009-08-04 13:49 ` Wolfgang Denk
2009-08-04 14:34 ` Darius Augulis
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2009-08-04 13:49 UTC (permalink / raw)
To: u-boot
Dear Darius Augulis,
In message <4A78342C.5090307@gmail.com> you wrote:
>
> usually TEXT_BASE is offset, which size depends on your requirements for
No. TEXT_BASE is an absolute address.
> stack size and memory size for malloc. If your DRAM base is 0x0 and
> TEXT_BASE is 0xf80000, you will have almost 16Mb for stack and malloc
> and your u-boot code will be linked and loaded to 0xf80000 address.
> 16Mb is probably too much, or your DRAM base is not 0x0.
On architectures like ARM (where the implementation is based on a
broken concept of the system memory map) TEXT_BASE should always be
chosen to be as high as possible to put the ("relocated") U-Boot code
as close as possible to the very end of available RAM. For systems
with several RAM size options you have to set this according to the
smallest possible RAM size, of course (which is a major PITA).
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
Vulcans worship peace above all.
-- McCoy, "Return to Tomorrow", stardate 4768.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] IXP425 TEXT_BASE
2009-08-04 13:49 ` Wolfgang Denk
@ 2009-08-04 14:34 ` Darius Augulis
2009-08-04 15:57 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Darius Augulis @ 2009-08-04 14:34 UTC (permalink / raw)
To: u-boot
On 08/04/2009 04:49 PM, Wolfgang Denk wrote:
> Dear Darius Augulis,
>
> In message<4A78342C.5090307@gmail.com> you wrote:
>> usually TEXT_BASE is offset, which size depends on your requirements for
>
> No. TEXT_BASE is an absolute address.
yes, but depends on the physical RAM base and size.
>
>> stack size and memory size for malloc. If your DRAM base is 0x0 and
>> TEXT_BASE is 0xf80000, you will have almost 16Mb for stack and malloc
>> and your u-boot code will be linked and loaded to 0xf80000 address.
>> 16Mb is probably too much, or your DRAM base is not 0x0.
>
> On architectures like ARM (where the implementation is based on a
> broken concept of the system memory map) TEXT_BASE should always be
> chosen to be as high as possible to put the ("relocated") U-Boot code
> as close as possible to the very end of available RAM. For systems
> with several RAM size options you have to set this according to the
> smallest possible RAM size, of course (which is a major PITA).
could you please explain more? why to the end of RAM?
for example I have 16MB RAM, base is 0x10000000. TEXT_BASE = 0x10400000.
Why is better to set this to 0x10F00000 ? To have more stack and malloc
memory? But U-boot will never exceed such limit? Please explain where I
am wrong. Thanks!
Darius A.
>
>
> Best regards,
>
> Wolfgang Denk
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] IXP425 TEXT_BASE
2009-08-04 14:34 ` Darius Augulis
@ 2009-08-04 15:57 ` Wolfgang Denk
2009-08-05 3:22 ` Teh Kok How
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2009-08-04 15:57 UTC (permalink / raw)
To: u-boot
Dear Darius Augulis,
In message <4A784702.40806@gmail.com> you wrote:
>
> > No. TEXT_BASE is an absolute address.
>
> yes, but depends on the physical RAM base and size.
Only on ARM (and other architectures that copied it's broken
implementation). TEXT_BASE is an absolute address (in the boot flash)
on PowerPC.
> could you please explain more? why to the end of RAM?
YOu want to have a maximum of contiguous RAM available to load Linux
kernel, ramdisk images etc.
> for example I have 16MB RAM, base is 0x10000000. TEXT_BASE = 0x10400000.
> Why is better to set this to 0x10F00000 ? To have more stack and malloc
> memory? But U-boot will never exceed such limit? Please explain where I
> am wrong. Thanks!
With RAM from 0x10000000...0x10ffffff you should probably put
TEXT_BASE at 0x10f80000 which then would leave you some 15 MB of
contiguous RAM for your use.
With your setup you jusy have some 3+ MB below U-Boot and some 11+ MB
above it. It makes not much sense to have U-Boot sitting right in the
middle of precious RAM like this.
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
The idea of male and female are universal constants.
-- Kirk, "Metamorphosis", stardate 3219.8
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] IXP425 TEXT_BASE
2009-08-04 15:57 ` Wolfgang Denk
@ 2009-08-05 3:22 ` Teh Kok How
2009-08-05 6:38 ` Teh Kok How
2009-08-05 7:48 ` Wolfgang Denk
0 siblings, 2 replies; 8+ messages in thread
From: Teh Kok How @ 2009-08-05 3:22 UTC (permalink / raw)
To: u-boot
Hi;
I understand Wolfgang's argument but setting the TEXT_BASE to this
arbitrary high address (DRAM_end - U-boot_size(_end - _start)) does not make
sense. I am new to ARM arch but in PowerPC and MIPS, the TEXT_BASE is always
set to the reset vector and in ARM, the reset vector is at 0 or 0xFFFF0000.
I have tried both values but still failed to boot u-boot on the board....:-(
Regards,
Teh
-----Original Message-----
From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On
Behalf Of Wolfgang Denk
Sent: Tuesday, August 04, 2009 11:57 PM
To: Darius Augulis
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] IXP425 TEXT_BASE
Dear Darius Augulis,
In message <4A784702.40806@gmail.com> you wrote:
>
> > No. TEXT_BASE is an absolute address.
>
> yes, but depends on the physical RAM base and size.
Only on ARM (and other architectures that copied it's broken
implementation). TEXT_BASE is an absolute address (in the boot flash)
on PowerPC.
> could you please explain more? why to the end of RAM?
YOu want to have a maximum of contiguous RAM available to load Linux
kernel, ramdisk images etc.
> for example I have 16MB RAM, base is 0x10000000. TEXT_BASE = 0x10400000.
> Why is better to set this to 0x10F00000 ? To have more stack and malloc
> memory? But U-boot will never exceed such limit? Please explain where I
> am wrong. Thanks!
With RAM from 0x10000000...0x10ffffff you should probably put
TEXT_BASE at 0x10f80000 which then would leave you some 15 MB of
contiguous RAM for your use.
With your setup you jusy have some 3+ MB below U-Boot and some 11+ MB
above it. It makes not much sense to have U-Boot sitting right in the
middle of precious RAM like this.
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
The idea of male and female are universal constants.
-- Kirk, "Metamorphosis", stardate 3219.8
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] IXP425 TEXT_BASE
2009-08-05 3:22 ` Teh Kok How
@ 2009-08-05 6:38 ` Teh Kok How
2009-08-05 7:48 ` Wolfgang Denk
1 sibling, 0 replies; 8+ messages in thread
From: Teh Kok How @ 2009-08-05 6:38 UTC (permalink / raw)
To: u-boot
Hmmm...I can answer myself now. The flash programmer programs the content
from TEXT_BASE to end of the u-boot image into flash start location
0x5000_0000. When u-boot boots, it relocates itself from flash to DRAM
location @TEXT_BASE. I still haven't managed to bring up the board. Guess
there are some GPIO pins which I have not initialized properly.
-----Original Message-----
From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On
Behalf Of Teh Kok How
Sent: Wednesday, August 05, 2009 11:22 AM
To: 'Wolfgang Denk'; 'Darius Augulis'
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] IXP425 TEXT_BASE
Hi;
I understand Wolfgang's argument but setting the TEXT_BASE to this
arbitrary high address (DRAM_end - U-boot_size(_end - _start)) does not make
sense. I am new to ARM arch but in PowerPC and MIPS, the TEXT_BASE is always
set to the reset vector and in ARM, the reset vector is at 0 or 0xFFFF0000.
I have tried both values but still failed to boot u-boot on the board....:-(
Regards,
Teh
-----Original Message-----
From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On
Behalf Of Wolfgang Denk
Sent: Tuesday, August 04, 2009 11:57 PM
To: Darius Augulis
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] IXP425 TEXT_BASE
Dear Darius Augulis,
In message <4A784702.40806@gmail.com> you wrote:
>
> > No. TEXT_BASE is an absolute address.
>
> yes, but depends on the physical RAM base and size.
Only on ARM (and other architectures that copied it's broken
implementation). TEXT_BASE is an absolute address (in the boot flash)
on PowerPC.
> could you please explain more? why to the end of RAM?
YOu want to have a maximum of contiguous RAM available to load Linux
kernel, ramdisk images etc.
> for example I have 16MB RAM, base is 0x10000000. TEXT_BASE = 0x10400000.
> Why is better to set this to 0x10F00000 ? To have more stack and malloc
> memory? But U-boot will never exceed such limit? Please explain where I
> am wrong. Thanks!
With RAM from 0x10000000...0x10ffffff you should probably put
TEXT_BASE at 0x10f80000 which then would leave you some 15 MB of
contiguous RAM for your use.
With your setup you jusy have some 3+ MB below U-Boot and some 11+ MB
above it. It makes not much sense to have U-Boot sitting right in the
middle of precious RAM like this.
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
The idea of male and female are universal constants.
-- Kirk, "Metamorphosis", stardate 3219.8
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] IXP425 TEXT_BASE
2009-08-05 3:22 ` Teh Kok How
2009-08-05 6:38 ` Teh Kok How
@ 2009-08-05 7:48 ` Wolfgang Denk
1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-08-05 7:48 UTC (permalink / raw)
To: u-boot
Dear "Teh Kok How",
In message <006c01ca157b$e574acb0$1933000a@smartbridges.com> you wrote:
>
> I understand Wolfgang's argument but setting the TEXT_BASE to this
> arbitrary high address (DRAM_end - U-boot_size(_end - _start)) does not make
> sense. ...
Maybe it makes little (or even no sense) to you. But you should not
generalize such a statement.
> ... I am new to ARM arch but in PowerPC and MIPS, the TEXT_BASE is always
> set to the reset vector ...
This is plain wrong.
See for example:
"board/tqc/tqm8xx/config.mk":
TEXT_BASE = 0x40000000
These are low-booting MPC8xx systems, i. e. the reset vector
is 0x100.
"board/amcc/canyonlands/config.mk":
TEXT_BASE = 0xFFFA0000
This is a PPC460EX based system, i. e. the reset vector is
0xFFFFFFFC
> ... and in ARM, the reset vector is at 0 or 0xFFFF0000.
> I have tried both values but still failed to boot u-boot on the board....:-(
No big surprise since your changes are based on misunderstandings.
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
Fascinating is a word I use for the unexpected.
-- Spock, "The Squire of Gothos", stardate 2124.5
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-08-05 7:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 11:59 [U-Boot] IXP425 TEXT_BASE Teh Kok How
2009-08-04 13:14 ` Darius Augulis
2009-08-04 13:49 ` Wolfgang Denk
2009-08-04 14:34 ` Darius Augulis
2009-08-04 15:57 ` Wolfgang Denk
2009-08-05 3:22 ` Teh Kok How
2009-08-05 6:38 ` Teh Kok How
2009-08-05 7:48 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.