mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
PATCH 1/5 mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
--- include/configs/mx6sabre_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/mx6sabre_common.h +1 -1
@@ -104,7 +104,7 @@"script=boot.scr\0" \"uimage=uImage\0" \"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \"console=" CONFIG_CONSOLE_DEV "\0" \
Signature · 1 line
1.8.4.rc3
PATCH 2/5 wandboard: Change FDT loading address to avoid overlaping
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
--- include/configs/wandboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/wandboard.h +1 -1
@@ -121,7 +121,7 @@"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Signature · 1 line
1.8.4.rc3
PATCH 3/5 udoo: Change FDT loading address to avoid overlaping
In reply to Otavio SalvadorThe new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
--- include/configs/udoo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/udoo.h +1 -1
@@ -77,7 +77,7 @@"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \"mmcdev=0\0" \
Signature · 1 line
1.8.4.rc3
PATCH 3/5 udoo: Change FDT loading address to avoid overlaping
Dear Otavio Salvador,
Quoted 3 lines · In message <[email protected]> you…
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
What exactly is "2013.04-3.10.9_1.0.0-alpha" ? It makes no sense to add any such references which are meaningless to the reader.
Best regards,
Wolfgang Denk
Signature · 5 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
Everyone, in some small sacred sanctuary of the self, is nuts.
- Leo RostenPATCH 3/5 udoo: Change FDT loading address to avoid overlaping
Quoted 9 lines · Wolfgang Denk
Dear Otavio Salvador,
Quoted 3 lines · In message <[email protected]> you…
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
What exactly is "2013.04-3.10.9_1.0.0-alpha" ? It makes no sense to add any such references which are meaningless to the reader.
Please look at the other patch where Fabio and I are discussing about this commit log. In fact it is not meaningless but current FSL fork of U-Boot 2013.04 for 3.10.9-1.0.0 BSP.
Signature · 3 lines
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
PATCH 3/5 udoo: Change FDT loading address to avoid overlaping
Dear Otavio Salvador,
Quoted 4 lines · In message <CAP9ODKpGwQMN0udK_V_o=Q759sDbn7YG1xnr2BpQyiKXXZYdWQ@mail.gmail.com>…
Please look at the other patch where Fabio and I are discussing about this commit log. In fact it is not meaningless but current FSL fork of U-Boot 2013.04 for 3.10.9-1.0.0 BSP.
It is meaningless to the reader of this commit message. A commit message may be read in a couple of years, and even people who don;t remember what you are discussing now on the mailing list should be able to understand it.
So please provide a desription that provides sufficient context so it can be understood.
Thanks.
Wolfgang Denk
Signature · 5 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
You Don't Have To Be 'Damned' To Work Here, But It Helps!!!
- Terry Pratchett, _Eric_PATCH 4/5 nitrogen6x: Change FDT loading address to avoid overlaping
In reply to Otavio SalvadorThe new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
--- include/configs/nitrogen6x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/nitrogen6x.h +1 -1
@@ -182,7 +182,7 @@"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \"fdt_file=imx6q-sabrelite.dtb\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \"mmcdev=0\0" \
Signature · 1 line
1.8.4.rc3
PATCH 4/5 nitrogen6x: Change FDT loading address to avoid overlaping
Dear Otavio Salvador,
Quoted 14 lines
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
Signed-off-by Otavio Salvador <[email protected]>--- include/configs/nitrogen6x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/configs/nitrogen6x.h +0
-0
include/configs/nitrogen6x.h line 188
Quoted 8 lines
include/configs/nitrogen6x.h +1
-1@@ -182,7 +182,7 @@"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \"fdt_file=imx6q-sabrelite.dtb\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \"mmcdev=0\0" \
Why is the FDT not relocated close to the end of DRAM as the other boards do it?
Best regards,
Marek Vasut
PATCH 4/5 nitrogen6x: Change FDT loading address to avoid overlaping
Quoted 7 lines · Marek Vasut
Dear Otavio Salvador,
Quoted 5 lines
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
Signed-off-by Otavio Salvador <[email protected]>
...
Quoted 1 line
Why is the FDT not relocated close to the end of DRAM as the other boards do it?
No idea.
Signature · 3 lines
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
PATCH 4/5 nitrogen6x: Change FDT loading address to avoid overlaping
Dear Otavio Salvador,
Quoted 7 lines · Marek Vasut
Quoted 6 lines
Dear Otavio Salvador,
Quoted 4 lines
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Otavio Salvador <[email protected]>...
Quoted 2 lines
Why is the FDT not relocated close to the end of DRAM as the other boards do it?
No idea.
Is this patch papering over some bug in the simplest possible way then?
btw. I mean this portion of the boot log, see the last line:
## Flattened Device Tree blob at 11000000
Booting using the fdt blob at 0x11000000 Loading Kernel Image ... OK
Using Device Tree in place at 11000000, end 1100b568
Best regards,
Marek Vasut
PATCH 5/5 cgtqmx6eval: Change FDT loading address to avoid overlaping
In reply to Otavio SalvadorThe new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
--- include/configs/cgtqmx6eval.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/cgtqmx6eval.h +1 -1
@@ -81,7 +81,7 @@"console=ttymxc1\0" \"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"mmcdev=1\0" \"mmcpart=1\0" \
Signature · 1 line
1.8.4.rc3
PATCH 1/5 mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
In reply to Otavio SalvadorHi Otavio,
Quoted 3 lines · Otavio Salvador
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
Care to explain in more details about the overlap?
Currently we use the following addresses:
- dtb: 0x11000000
- kernel: 0x12000000
Now you propose:
- kernel: 0x12000000
- dtb: 0x18000000
If the kernel is larger in FSL 3.10.9 kernel, how it can overlap with dtb, since in the original code the kernel goes after the dtb?
I have never used FSL 3.10.9 kernel, so I am curious about this fix.
Regards,
Fabio Estevam
PATCH 1/5 mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
Quoted 16 lines · Fabio Estevam
Hi Otavio,
Quoted 3 lines · Otavio Salvador
The new FSL 3.10.9_1.0.0-alpha kernel requires more memory space and with the previous loading address we had ovelap; change it for the same address used in 2013.04-3.10.9_1.0.0-alpha U-Boot.
Care to explain in more details about the overlap?
Currently we use the following addresses:
- dtb:
0x11000000
- kernel:0x12000000Now you propose:
Quoted 7 lines
- kernel:
0x12000000
- dtb:0x18000000If the kernel is larger in FSL 3.10.9 kernel, how it can overlap with dtb, since in the original code the kernel goes after the dtb?
I have never used FSL 3.10.9 kernel, so I am curious about this fix.
I am quoting the original commit change:
ENGR00268032 config/sabre_common: change the fdt_addr to a high address
current the fdt_addr is just 16MB offset from the ddr base address, which will cause the dtb will be overritten by linux kernel(include .bss section) if the linux kernel is bigger than 16MB, which cause setup_machine_fdt failed and thus kernel failed to boot.
This patch change the defaut fdt_addr to 128MB offset from the ddr base address, which should be enough for common user case. user can change it to other value according to their system needs.
I think I can rework the commit log and include this there.
Signature · 3 lines
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
PATCH 1/5 mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
Quoted 8 lines · Otavio Salvador
I am quoting the original commit change:
ENGR00268032 config/sabre_common: change the
fdt_addrto a high addresscurrent the
fdt_addris just 16MB offset from the ddr base address, which will cause the dtb will be overritten by linux kernel(include .bss section) if the linux kernel is bigger than 16MB, which causesetup_machine_fdtfailed and thus kernel failed to boot.
What is the size of the FSL 3.10 kernel?
I still do not understand the fix after reading the commit log you pointed to.
Adding Jason, in case he could help clarifying it.
Regards,
Fabio Estevam
A message that is not in the archive (sent off-list or not yet received): AD13664F485EE54694E29A7F9D5BE1AFB499F8@039-SN2MPN1-022.039d.mgd.msft.net
PATCH 1/5 mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
Quoted 31 lines · Hui Liu
Quoted 22 lines
-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Friday, November 01, 2013 10:19 PM
To: Otavio Salvador
Cc: U-Boot Mailing List; Estevam Fabio-R49496; Liu Hui-R64343
Subject: Re: [U-Boot] [PATCH 1/5] mx6sabre{auto, sd}: Change FDT loading address to avoid overlapingQuoted 6 lines · Otavio Salvador
I am quoting the original commit change:
ENGR00268032 config/sabre_common: change the
fdt_addrto a high
addresscurrent the
fdt_addris just 16MB offset from the ddr base address,which
Quoted 1 line
will cause the dtb will be overritten by linux kernel(include .bss
section)
Quoted 1 line
if the linux kernel is bigger than 16MB, which cause
setup_machine_fdtQuoted 8 lines
Quoted 1 line
failed and thus kernel failed to boot.
What is the size of the FSL 3.10 kernel?
I still do not understand the fix after reading the commit log you pointed to.
Adding Jason, in case he could help clarifying it.
Quoted 7 lines
This is due to that the dtb will be overridden by the Linux kernel if the dtb is just 16MB offset While Linux kernel is big enough. We have found this issue when Linux kernel image is bigger since the decompressed kernel will also start from the beginning of the DDR.
To enlarge the dtb offset is just one workaround for this kernel common issue.
The ideal solution is to fix it in Linux kernel but don't have much time to do it.
What is the final decision on this? I have the same change for many boards which are/will be supported by 3.10.
Signature · 3 lines
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
PATCH 1/5 mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
Hi Otavio, Jason, Fabio,
Quoted 4 lines · Otavio Salvador
What is the final decision on this? I have the same change for many boards which are/will be supported by 3.10.
You're right, we need a decision. As far as I read, there is no explanation why this change is required. As Fabio points out, dtb is loaded before the kernel and this should avoid an overlap. It will be very nice if Jason could better explain the issue, because I admit I have not understood why it happens.
Maybe is DTB loaded after the kernel on Freescale's U-Boot ?
This is clearly a work-around for a bug in Freescale's kernel 3.10, as we have no problems with other kernels. I booted mainline kernel 3.11/3.12 on a i.MX6 without this issue.
However, I could still merge the patch if we can at least have the following answers:
- why is there the overlap if the kernel is loaded after DTB (Fabio's question) ?
- add the explanation to the commit message (so V2 is required, this is also a Wolfgang's comment).
- of course, the patch should generate a problem with other kernels. It should not be, but a couple of tested-by will be nice.
As the patchset fixes the same issue, I would prefer if the patchset is squashed into a single patch because it fixes a single issue and we can have only one "extended" commit message with the whole explanation.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/5 mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
Quoted 31 lines · Stefano Babic
Hi Otavio, Jason, Fabio,
Quoted 4 lines · Otavio Salvador
What is the final decision on this? I have the same change for many boards which are/will be supported by 3.10.
You're right, we need a decision. As far as I read, there is no explanation why this change is required. As Fabio points out, dtb is loaded before the kernel and this should avoid an overlap. It will be very nice if Jason could better explain the issue, because I admit I have not understood why it happens.
Maybe is DTB loaded after the kernel on Freescale's U-Boot ?
This is clearly a work-around for a bug in Freescale's kernel 3.10, as we have no problems with other kernels. I booted mainline kernel 3.11/3.12 on a i.MX6 without this issue.
However, I could still merge the patch if we can at least have the following answers:
- why is there the overlap if the kernel is loaded after DTB (Fabio's question) ?
- add the explanation to the commit message (so V2 is required, this is also a Wolfgang's comment).
- of course, the patch should generate a problem with other kernels. It should not be, but a couple of tested-by will be nice.
Quoted 3 lines
As the patchset fixes the same issue, I would prefer if the patchset is squashed into a single patch because it fixes a single issue and we can have only one "extended" commit message with the whole explanation.
Ok; once we get Jason's feedback I rework the patch and send.
Signature · 3 lines
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
PATCH 1/5 mx6sabre{auto, sd}: Change FDT loading address to avoid overlaping
In reply to Stefano BabicQuoted 29 lines
-----Original Message-----
From: Stefano Babic [mailto:sbabic at denx.de]
Sent: Thursday, November 21, 2013 5:01 PM
To: Otavio Salvador; Liu Hui-R64343
Cc: U-Boot Mailing List; Estevam Fabio-R49496
Subject: Re: [U-Boot] [PATCH 1/5] mx6sabre{auto, sd}: Change FDT loading address to avoid overlapingHi Otavio, Jason, Fabio,
Quoted 4 lines · Otavio Salvador
What is the final decision on this? I have the same change for many boards which are/will be supported by 3.10.
You're right, we need a decision. As far as I read, there is no explanation why this change is required. As Fabio points out, dtb is loaded before the kernel and this should avoid an overlap. It will be very nice if Jason could better explain the issue, because I admit I have not understood why it happens.
Maybe is DTB loaded after the kernel on Freescale's U-Boot ?
This is clearly a work-around for a bug in Freescale's kernel 3.10, as we have no problems with other kernels. I booted mainline kernel 3.11/3.12 on a i.MX6 without this issue.
Quoted 5 lines
However, I could still merge the patch if we can at least have the following answers:
- why is there the overlap if the kernel is loaded after DTB (Fabio's question) ?
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
To 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
I check the history and found the definition introduced by the following commit:
commit 7e9603e74ef95a0900771d63ba499b3e80300e55
Author: Dirk Behme <[email protected]> Date: Thu Jan 12 23:49:24 2012 +0000
i.mx6q: configs: Add fdt_high and initrd_high variables
To be able to load the device tree and initrd correctly, set the fdt_high and initrd_high environment variables.
Using 0xffffffff implies that the device tree and the initrd are initially copied to working addresses. This will avoid an additional copy.
Loading the device tree to 0x30000000 and the initrd to 0x3c000000 should work for both boards, the ARM2 and SabreLite.
Example (SabreLite):
fatload mmc 0:2 0x10000000 uImage
fatload mmc 0:2 0x3c000000 uInitrd
fatload mmc 0:2 0x30000000 board.dtb
bootm 0x10000000 0x3c000000 0x30000000
Note: This requires that the kernel has CONFIG_HIGHMEM enabled.
So, from the commit, if we enable the fdt reallocation, it will have some additional Copy thus impact the boot up time.
Quoted 4 lines
- add the explanation to the commit message (so V2 is required, this is also a Wolfgang's comment).
- of course, the patch should generate a problem with other kernels. It should not be, but a couple of tested-by will be nice.
Yes, agree.
Quoted 4 lines
As the patchset fixes the same issue, I would prefer if the patchset is squashed into a single patch because it fixes a single issue and we can have only one "extended" commit message with the whole explanation.
Ditto,
Quoted 10 lines
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
=====================================================================