Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Why AT91 Bootstrap loads app (u-boot) to 0x23F00000 ??
PostPosted: Wed Mar 11, 2009 7:12 pm 
Offline

Joined: Wed Mar 11, 2009 7:06 pm
Posts: 7
Using: AT91SAM9260-EK, AT91Bootstrap, U-Boot, Linux Kernel all from Dataflash. Not using NAND.

Question: The default for AT91Bootstrap is to load U-Boot to 0x23F00000 in RAM. Why? Why not load at 0x20000000? Must be some reasoning behind this value.

Want to load Linux and the rootfs from dataflash, using initrd and rootfs=/dev/ram. Trying to map out RAM usage for maximum space.
Would love to hear from anyone having done this. What settings/addresses worked well for you?

THANKS!


Top
 Profile  
 
 Post subject: Re: Why AT91 Bootstrap loads app (u-boot) to 0x23F00000 ??
PostPosted: Thu Mar 12, 2009 6:00 pm 
Offline

Joined: Tue Oct 30, 2007 3:39 pm
Posts: 54
Hello,

The aim of the bootstrap is to load U-Boot from Dataflash to SDRAM (and not RAM). Then U-Boot is executed out of SDRAM.
0x23F00000 is the default value configured in the bootstrap for all devices, because it the default address of U-Boot.
So the next question is: why U-Boot is mapped by default to 0x23F00000? According to the linux guys it is historic and completely arbitrary. Actually it is to ensure that you have free space between 0x20000000 and 0x23F0000.
Anyway you can modify this value in the at91sam9260ek.h file (see the board/at91sam9260ek/dataflash directory - IMG_ADDRESS). As you said it is more logical to set it to 0x20000000.


Top
 Profile  
 
 Post subject: Re: Why AT91 Bootstrap loads app (u-boot) to 0x23F00000 ??
PostPosted: Thu Mar 12, 2009 6:26 pm 
Offline

Joined: Wed Mar 11, 2009 7:06 pm
Posts: 7
> SDRAM (and not RAM).

Of course you are correct. I am far too casual about the distinction. :-)

> completely arbitrary

Well, at least I will not be scratching my head trying to figure out what I was missing.

THANKS!


Top
 Profile  
 
 Post subject: Re: Why AT91 Bootstrap loads app (u-boot) to 0x23F00000 ??
PostPosted: Thu Mar 12, 2009 8:44 pm 
Offline

Joined: Wed Mar 11, 2009 7:06 pm
Posts: 7
I tried changing the Bootloader to load U-Boot to 0x2000 0000. It doesn't work. After some digging around I think I might know why.

U-Boot relocates itself in memory. The config.mk file in the AT91SAM9260EK directory defines TEXT_BASE = 0x20000000. I think that u-boot is trying to move itself there after loading. But, since my bootloader has already put the original copy from flash at that address it crashes itself.

That begs the question, what does it really matter where it goes on initial load? Apparently it doesn't since it is going to move itself anyway. I think I will simply revert to the original "arbitrary" address....

Can anyone confirm that my understanding is correct, that U-Boot relocates on that AT91SAM9260?

Thanks!
Carl


Top
 Profile  
 
 Post subject: Re: Why AT91 Bootstrap loads app (u-boot) to 0x23F00000 ??
PostPosted: Fri Mar 20, 2009 5:19 pm 
Offline

Joined: Tue Oct 30, 2007 3:39 pm
Posts: 54
You should ask it in the Linux category of the forum.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: