public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx6sabre_common: Allow booting a FSL 3.10 kernel
@ 2013-11-25 15:54 Fabio Estevam
  2013-11-25 16:21 ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2013-11-25 15:54 UTC (permalink / raw)
  To: u-boot

Currently the booting of a 3.10 kernel fails, as explained by Jason Liu [1]:

"Let me explain it:
since we defined the fdt_high=0xffffffff at include/configs/mx6qsabre_common.h,
which means we disable the fdt re-allocation, which you can see when boot up:

## Flattened Device Tree blob at 11000000
   Booting using the fdt blob at 0x11000000
   Using Device Tree in place at 11000000, end 1800e37e

The FDT blob will be placed at DDR physical addr: 0x11000000. When Linux kernel
Boot up, it will decompress the compressed kernel image and place the 
decompressed kernel image at the low end of the DDR memory and start running 
from it. If the decompressed kernel image is bigger for example than 16M, it may
over written the fdt blob which u-boot loaded to the DDR memory @0x11000000 with
fdt_addr=0x11000000.

o expand the fdt_addr from 0x11000000 to 0x18000000, which can avoid the 
override, since we will not likely have one kernel image larger than 128MB.

The other solution is to enable the FDT blob re-allocation by remove the
fdt_high=0xffffffff"

Use the second approach to enable the boot of a FSL 3.10 kernel.

[1] http://marc.info/?l=u-boot&m=138519609402384&w=2

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 include/configs/mx6sabre_common.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index 79d1f34..14db1c1 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -86,8 +86,6 @@
 	"boot_fdt=try\0" \
 	"ip_dyn=yes\0" \
 	"console=" CONFIG_CONSOLE_DEV "\0" \
-	"fdt_high=0xffffffff\0"	  \
-	"initrd_high=0xffffffff\0" \
 	"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
 	"mmcpart=1\0" \
 	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] mx6sabre_common: Allow booting a FSL 3.10 kernel
  2013-11-25 15:54 [U-Boot] [PATCH] mx6sabre_common: Allow booting a FSL 3.10 kernel Fabio Estevam
@ 2013-11-25 16:21 ` Otavio Salvador
  2013-11-25 16:28   ` Fabio Estevam
  2013-11-26  7:59   ` Stefano Babic
  0 siblings, 2 replies; 6+ messages in thread
From: Otavio Salvador @ 2013-11-25 16:21 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 25, 2013 at 1:54 PM, Fabio Estevam
<fabio.estevam@freescale.com> wrote:
> Currently the booting of a 3.10 kernel fails, as explained by Jason Liu [1]:
>
> "Let me explain it:
> since we defined the fdt_high=0xffffffff at include/configs/mx6qsabre_common.h,
> which means we disable the fdt re-allocation, which you can see when boot up:
>
> ## Flattened Device Tree blob at 11000000
>    Booting using the fdt blob at 0x11000000
>    Using Device Tree in place at 11000000, end 1800e37e
>
> The FDT blob will be placed at DDR physical addr: 0x11000000. When Linux kernel
> Boot up, it will decompress the compressed kernel image and place the
> decompressed kernel image at the low end of the DDR memory and start running
> from it. If the decompressed kernel image is bigger for example than 16M, it may
> over written the fdt blob which u-boot loaded to the DDR memory @0x11000000 with
> fdt_addr=0x11000000.
>
> o expand the fdt_addr from 0x11000000 to 0x18000000, which can avoid the
> override, since we will not likely have one kernel image larger than 128MB.
>
> The other solution is to enable the FDT blob re-allocation by remove the
> fdt_high=0xffffffff"
>
> Use the second approach to enable the boot of a FSL 3.10 kernel.
>
> [1] http://marc.info/?l=u-boot&m=138519609402384&w=2
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

My patch changed the load address for the device tree blog, as
explained by Liu, it avoids an extra copy which may impact in boot
speed.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] mx6sabre_common: Allow booting a FSL 3.10 kernel
  2013-11-25 16:21 ` Otavio Salvador
@ 2013-11-25 16:28   ` Fabio Estevam
  2013-11-25 16:34     ` Otavio Salvador
  2013-11-26  7:59   ` Stefano Babic
  1 sibling, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2013-11-25 16:28 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 25, 2013 at 2:21 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:

> My patch changed the load address for the device tree blog, as
> explained by Liu, it avoids an extra copy which may impact in boot
> speed.

IMHO we should do a specific Falcon config if we are concerned with boot speed.

I still prefer to remove fdt_high. We don't have fdt_high on
mx23evk/mx28evk/mx53loco/mx51evk, etc.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] mx6sabre_common: Allow booting a FSL 3.10 kernel
  2013-11-25 16:28   ` Fabio Estevam
@ 2013-11-25 16:34     ` Otavio Salvador
  2013-11-25 16:42       ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2013-11-25 16:34 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 25, 2013 at 2:28 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Nov 25, 2013 at 2:21 PM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>
>> My patch changed the load address for the device tree blog, as
>> explained by Liu, it avoids an extra copy which may impact in boot
>> speed.
>
> IMHO we should do a specific Falcon config if we are concerned with boot speed.
>
> I still prefer to remove fdt_high. We don't have fdt_high on
> mx23evk/mx28evk/mx53loco/mx51evk, etc.

I will send a single patch for all boards as requested by Stefano.
Does it work for you?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] mx6sabre_common: Allow booting a FSL 3.10 kernel
  2013-11-25 16:34     ` Otavio Salvador
@ 2013-11-25 16:42       ` Fabio Estevam
  0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2013-11-25 16:42 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 25, 2013 at 2:34 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Mon, Nov 25, 2013 at 2:28 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> On Mon, Nov 25, 2013 at 2:21 PM, Otavio Salvador
>> <otavio@ossystems.com.br> wrote:
>>
>>> My patch changed the load address for the device tree blog, as
>>> explained by Liu, it avoids an extra copy which may impact in boot
>>> speed.
>>
>> IMHO we should do a specific Falcon config if we are concerned with boot speed.
>>
>> I still prefer to remove fdt_high. We don't have fdt_high on
>> mx23evk/mx28evk/mx53loco/mx51evk, etc.
>
> I will send a single patch for all boards as requested by Stefano.
> Does it work for you?

I prefer to load dtb into a RAM position that comes prior to the
kernel, as we do currently.

I agree that it is not likely we will have a kernel larger than 128MB,
but we could have a kernel + ramfs larger than 128MB and the overlap
will still happen with your patch.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] mx6sabre_common: Allow booting a FSL 3.10 kernel
  2013-11-25 16:21 ` Otavio Salvador
  2013-11-25 16:28   ` Fabio Estevam
@ 2013-11-26  7:59   ` Stefano Babic
  1 sibling, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2013-11-26  7:59 UTC (permalink / raw)
  To: u-boot

Hi Otavio, hi Fabio,

On 25/11/2013 17:21, Otavio Salvador wrote:
> On Mon, Nov 25, 2013 at 1:54 PM, Fabio Estevam
> <fabio.estevam@freescale.com> wrote:
>> Currently the booting of a 3.10 kernel fails, as explained by Jason Liu [1]:
>>
>> "Let me explain it:
>> since we defined the fdt_high=0xffffffff at include/configs/mx6qsabre_common.h,
>> which means we disable the fdt re-allocation, which you can see when boot up:
>>
>> ## Flattened Device Tree blob at 11000000
>>    Booting using the fdt blob at 0x11000000
>>    Using Device Tree in place at 11000000, end 1800e37e
>>
>> The FDT blob will be placed at DDR physical addr: 0x11000000. When Linux kernel
>> Boot up, it will decompress the compressed kernel image and place the
>> decompressed kernel image at the low end of the DDR memory and start running
>> from it. If the decompressed kernel image is bigger for example than 16M, it may
>> over written the fdt blob which u-boot loaded to the DDR memory @0x11000000 with
>> fdt_addr=0x11000000.
>>
>> o expand the fdt_addr from 0x11000000 to 0x18000000, which can avoid the
>> override, since we will not likely have one kernel image larger than 128MB.
>>
>> The other solution is to enable the FDT blob re-allocation by remove the
>> fdt_high=0xffffffff"
>>
>> Use the second approach to enable the boot of a FSL 3.10 kernel.
>>
>> [1] http://marc.info/?l=u-boot&m=138519609402384&w=2
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> 
> My patch changed the load address for the device tree blog, as
> explained by Liu, it avoids an extra copy which may impact in boot
> speed.

Maybe I am missing something. If I have well understood, the additional
copy is for the DT only. That means 20-30 KB, I suppose. Which is the
improvement in boot time if we let that the FDT is copied one more time
? Is this time maybe negligible (I suppose yes, but I have no real data) ?

Avoiding the additional copy is a sort of optimization, that anybody, if
wanted, can do changing the running environment. The default environment
should ensure that the kernel boots in any conditions.

IMHO it is better to remove fdt_addr at all as proposed by Fabio, and
let the system doing the job - excepted we can say we have a *real* big
improvement dropping the FDT relocation.

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-26  7:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 15:54 [U-Boot] [PATCH] mx6sabre_common: Allow booting a FSL 3.10 kernel Fabio Estevam
2013-11-25 16:21 ` Otavio Salvador
2013-11-25 16:28   ` Fabio Estevam
2013-11-25 16:34     ` Otavio Salvador
2013-11-25 16:42       ` Fabio Estevam
2013-11-26  7:59   ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox