diff mbox

[U-Boot,1/7] dm: at91: Correct text base for snapper9260

Message ID 1412619262-23903-2-git-send-email-sjg@chromium.org
State Superseded, archived
Delegated to: Andreas Bießmann
Headers show

Commit Message

Simon Glass Oct. 6, 2014, 6:14 p.m. UTC
The value should be 0x23f00000. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/configs/snapper9260.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Bießmann Oct. 23, 2014, 5:07 a.m. UTC | #1
Dear Simon,

On 06.10.14 20:14, Simon Glass wrote:
> The value should be 0x23f00000. Fix it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org> ---
> 
> include/configs/snapper9260.h | 2 +- 1 file changed, 1 
> insertion(+), 1 deletion(-)
> 
> diff --git a/include/configs/snapper9260.h 
> b/include/configs/snapper9260.h index 1ebee71..adb09c2 100644 --- 
> a/include/configs/snapper9260.h +++ b/include/configs/snapper9260.h
> @@ -15,7 +15,7 @@ #include <asm/hardware.h> #include
> <linux/sizes.h>
> 
> -#define CONFIG_SYS_TEXT_BASE		0x20000000 +#define 
> CONFIG_SYS_TEXT_BASE		0x23f00000

I wonder why this is required. It depends on the first stage loader
snapper9260 uses and I guess the first value is the right one used in
the factory programmed loader.
Nevertheless other at91 boards use 0x21f00000 due to relocation issues
on boards with less RAM. It seems the snapper9260 has just 64MiB of
RAM, this means just 1MiB of space for relocated u-boot, malloc arena,
... This was exactly the reason for other at91 boards to switch to
0x21f00000 as base address.

Best regards

Andreas Bießmann
Andreas Bießmann Oct. 23, 2014, 5:10 a.m. UTC | #2
It also seems the maintainer of snapper9260 is not reachable. Simon, do
you own such a board?

Best regards

Andreas Bießmann

On 23.10.14 07:07, Andreas Bießmann wrote:
> Dear Simon,
> 
> On 06.10.14 20:14, Simon Glass wrote:
>> The value should be 0x23f00000. Fix it.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org> ---
>>
>> include/configs/snapper9260.h | 2 +- 1 file changed, 1 
>> insertion(+), 1 deletion(-)
>>
>> diff --git a/include/configs/snapper9260.h 
>> b/include/configs/snapper9260.h index 1ebee71..adb09c2 100644 --- 
>> a/include/configs/snapper9260.h +++ b/include/configs/snapper9260.h
>> @@ -15,7 +15,7 @@ #include <asm/hardware.h> #include
>> <linux/sizes.h>
>>
>> -#define CONFIG_SYS_TEXT_BASE		0x20000000 +#define 
>> CONFIG_SYS_TEXT_BASE		0x23f00000
> 
> I wonder why this is required. It depends on the first stage loader
> snapper9260 uses and I guess the first value is the right one used in
> the factory programmed loader.
> Nevertheless other at91 boards use 0x21f00000 due to relocation issues
> on boards with less RAM. It seems the snapper9260 has just 64MiB of
> RAM, this means just 1MiB of space for relocated u-boot, malloc arena,
> ... This was exactly the reason for other at91 boards to switch to
> 0x21f00000 as base address.
> 
> Best regards
> 
> Andreas Bießmann
>
Simon Glass Oct. 23, 2014, 5:12 a.m. UTC | #3
Hi,

On Oct 22, 2014 11:10 PM, "Andreas Bießmann" <andreas.devel@googlemail.com>
wrote:
>
> It also seems the maintainer of snapper9260 is not reachable. Simon, do
> you own such a board?

Yes I have one. The base address is to make the maximum amount of room for
loading the kernel, etc.

Regards,
Simon

>
> Best regards
>
> Andreas Bießmann
>
> On 23.10.14 07:07, Andreas Bießmann wrote:
> > Dear Simon,
> >
> > On 06.10.14 20:14, Simon Glass wrote:
> >> The value should be 0x23f00000. Fix it.
> >>
> >> Signed-off-by: Simon Glass <sjg@chromium.org> ---
> >>
> >> include/configs/snapper9260.h | 2 +- 1 file changed, 1
> >> insertion(+), 1 deletion(-)
> >>
> >> diff --git a/include/configs/snapper9260.h
> >> b/include/configs/snapper9260.h index 1ebee71..adb09c2 100644 ---
> >> a/include/configs/snapper9260.h +++ b/include/configs/snapper9260.h
> >> @@ -15,7 +15,7 @@ #include <asm/hardware.h> #include
> >> <linux/sizes.h>
> >>
> >> -#define CONFIG_SYS_TEXT_BASE                0x20000000 +#define
> >> CONFIG_SYS_TEXT_BASE         0x23f00000
> >
> > I wonder why this is required. It depends on the first stage loader
> > snapper9260 uses and I guess the first value is the right one used in
> > the factory programmed loader.
> > Nevertheless other at91 boards use 0x21f00000 due to relocation issues
> > on boards with less RAM. It seems the snapper9260 has just 64MiB of
> > RAM, this means just 1MiB of space for relocated u-boot, malloc arena,
> > ... This was exactly the reason for other at91 boards to switch to
> > 0x21f00000 as base address.
> >
> > Best regards
> >
> > Andreas Bießmann
> >
Andreas Bießmann Oct. 23, 2014, 5:21 a.m. UTC | #4
Hi,

On 23.10.14 07:12, Simon Glass wrote:
> Hi,
> 
> On Oct 22, 2014 11:10 PM, "Andreas Bießmann"
> <andreas.devel@googlemail.com <mailto:andreas.devel@googlemail.com>> wrote:
>>
>> It also seems the maintainer of snapper9260 is not reachable. Simon, do
>> you own such a board?
> 
> Yes I have one.

so would you take maintainer-ship?

> The base address is to make the maximum amount of room
> for loading the kernel, etc.

Well, the base address is just used for the temporary copy of u-boot
inside RAM. After copy from media to RAM we will relocate to a runtime
defined address. This address depends on some variable parameters which
may also be defined at runtime. We had the problem that in some cases
the calculated relocation address collates with running u-boot in RAM.
The chance to hit this issue is high when you just have room of 1 MiB
(which must hold two copies of u-boot!)

Best regards

Andreas Bießmann
Simon Glass Oct. 23, 2014, 8:10 p.m. UTC | #5
Hi Andreas,

On 22 October 2014 23:21, Andreas Bießmann <andreas.devel@googlemail.com> wrote:
> Hi,
>
> On 23.10.14 07:12, Simon Glass wrote:
>> Hi,
>>
>> On Oct 22, 2014 11:10 PM, "Andreas Bießmann"
>> <andreas.devel@googlemail.com <mailto:andreas.devel@googlemail.com>> wrote:
>>>
>>> It also seems the maintainer of snapper9260 is not reachable. Simon, do
>>> you own such a board?
>>
>> Yes I have one.
>
> so would you take maintainer-ship?

OK.

>
>> The base address is to make the maximum amount of room
>> for loading the kernel, etc.
>
> Well, the base address is just used for the temporary copy of u-boot
> inside RAM. After copy from media to RAM we will relocate to a runtime
> defined address. This address depends on some variable parameters which
> may also be defined at runtime. We had the problem that in some cases
> the calculated relocation address collates with running u-boot in RAM.
> The chance to hit this issue is high when you just have room of 1 MiB
> (which must hold two copies of u-boot!)

Ah yes of course :-) I'm not sure about the pre-boot but will see if I
can change it.

Regards,
Simon
diff mbox

Patch

diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 1ebee71..adb09c2 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -15,7 +15,7 @@ 
 #include <asm/hardware.h>
 #include <linux/sizes.h>
 
-#define CONFIG_SYS_TEXT_BASE		0x20000000
+#define CONFIG_SYS_TEXT_BASE		0x23f00000
 
 /* ARM asynchronous clock */
 #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000 /* External Crystal, in Hz */