From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prabhakar Kushwaha Date: Thu, 3 Apr 2014 09:32:22 +0530 Subject: [U-Boot] [PATCH 01/2] powerpc/mpc85xx:Avoid fix address of bootpg section In-Reply-To: <1396260094-2328-1-git-send-email-prabhakar@freescale.com> References: <1396260094-2328-1-git-send-email-prabhakar@freescale.com> Message-ID: <533CDD4E.4080900@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi All, I just want to share my concern with respect to this patch. This patch removed hard-coded value for 0x80000 and use CONFIG_SYS_MONITOR_LEN. There were many Freescale boards config which don't have correct CONFIG_SYS_MONITOR_LEN(due to size increase from 512KB to 768KB). I fixed them in subsequent patch. This linker file is being used by many other powerpc boards/platforms. Because of hard-coded value of 0x80000 in linker file, there boards are booting till now. but after this patch, there is a possibility there boards may not boot because of wrong value defined for CONFIG_SYS_MONITOR_LEN by board maintainers. I will request powerpc board maintainers to check config file for correct value of CONFIG_SYS_MONITOR_LEN. Regards, Prabhakar On 3/31/2014 3:31 PM, Prabhakar Kushwaha wrote: > It is not necessary for bootpg to be present at text + 512KB. > With increase of u-boot size (768KB), bootpg section's address > cannot be fixed. > > Signed-off-by: Prabhakar Kushwaha > --- > arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | 8 +++++++- > arch/powerpc/cpu/mpc85xx/u-boot.lds | 6 +++++- > 2 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds > index df3b0f9..d77a6dc 100644 > --- a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds > +++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds > @@ -4,6 +4,12 @@ > * SPDX-License-Identifier: GPL-2.0+ > */ > > +#include "config.h" /* CONFIG_BOARDDIR */ > + > +#ifndef CONFIG_SYS_MONITOR_LEN > +#define CONFIG_SYS_MONITOR_LEN 0x80000 > +#endif > + > OUTPUT_ARCH(powerpc) > /* Do we need any of these for elf? > __DYNAMIC = 0; */ > @@ -76,7 +82,7 @@ SECTIONS > KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg)) > } :text = 0xffff > > - . = ADDR(.text) + 0x80000; > + . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN; > > __bss_start = .; > .bss (NOLOAD) : > diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds > index 2af4c80..99473dd 100644 > --- a/arch/powerpc/cpu/mpc85xx/u-boot.lds > +++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds > @@ -12,6 +12,10 @@ > #define RESET_VECTOR_ADDRESS 0xfffffffc > #endif > > +#ifndef CONFIG_SYS_MONITOR_LEN > +#define CONFIG_SYS_MONITOR_LEN 0x80000 > +#endif > + > OUTPUT_ARCH(powerpc) > > PHDRS > @@ -84,7 +88,7 @@ SECTIONS > { > KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg)) > } :text = 0xffff > - . = ADDR(.text) + 0x80000; > + . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN; > #else > .bootpg RESET_VECTOR_ADDRESS - 0xffc : > {