public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/10 v5] powerpc/mpc85xx: support application without resetvec segment in the linker script
@ 2013-06-20  8:04 ying.zhang at freescale.com
  2013-06-20  8:04 ` [U-Boot] [PATCH 02/10 v5] powerpc/mpc85xx: modify the functionality clear_bss and aligning the end address of the BSS ying.zhang at freescale.com
                   ` (9 more replies)
  0 siblings, 10 replies; 32+ messages in thread
From: ying.zhang at freescale.com @ 2013-06-20  8:04 UTC (permalink / raw)
  To: u-boot

From: Ying Zhang <b40530@freescale.com>

For SD/SPI 2-stage bootloader, the On-Chip Rom code loads the SPL into L2 SRAM,
then jump to it to begin execution. After that, the SPL loads the final uboot
image into DDR, then jump to it to begin execution. The segment .resetvec in
the SPL and in final U-boot is useless.

So, add new symbols CONFIG_SYS_MPC85XX_NO_RESETVEC for this application.
If CONFIG_SYS_MPC85XX_NO_RESETVEC is set, the segment .resetvec is excluded
and the segment .bootpg is placed in the previous 4K of the segment .text.

Signed-off-by: Ying Zhang <b40530@freescale.com>
---
Compared with the original version, Changed as below:
1. Split from "boot from SD card/SPI flash with SPL".
2. No change.
3. No change.
4. No change.

 README                                  |    5 +++++
 arch/powerpc/cpu/mpc85xx/u-boot-spl.lds |   19 +++++++++++++++----
 arch/powerpc/cpu/mpc85xx/u-boot.lds     |    8 ++++++++
 3 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/README b/README
index cd0336c..2a7e4c1 100644
--- a/README
+++ b/README
@@ -4074,6 +4074,11 @@ Low Level (hardware related) configuration options:
 		that is executed before the actual U-Boot. E.g. when
 		compiling a NAND SPL.
 
+- CONFIG_SYS_MPC85XX_NO_RESETVEC
+		Only for 85xx systems. If this variable is specified, the section
+		.resetvec is not kept and the section .bootpg is placed in the
+		previous 4k of the .text section.
+
 - CONFIG_ARCH_MAP_SYSMEM
 		Generally U-Boot (and in particular the md command) uses
 		effective address. It is therefore not necessary to regard
diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
index f2b7bff..c613e58 100644
--- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
+++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
@@ -1,8 +1,5 @@
 /*
- * (C) Copyright 2006
- * Wolfgang Denk, DENX Software Engineering, wd at denx.de
- *
- * Copyright 2009 Freescale Semiconductor, Inc.
+ * Copyright 2013 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -26,6 +23,13 @@
 #include "config.h"	/* CONFIG_BOARDDIR */
 
 OUTPUT_ARCH(powerpc)
+#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
+PHDRS
+{
+	text PT_LOAD;
+	bss PT_LOAD;
+}
+#endif
 SECTIONS
 {
 	. = CONFIG_SPL_TEXT_BASE;
@@ -68,10 +72,17 @@ SECTIONS
 #else
 #error unknown NAND controller
 #endif
+#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
+	.bootpg ADDR(.text) - 0x1000 :
+	{
+		KEEP(*(.bootpg))
+	} :text = 0xffff
+#else
 	.resetvec ADDR(.text) + RESET_VECTOR_OFFSET : {
 		KEEP(*(.resetvec))
 	} = 0xffff
 
+#endif
 	/*
 	 * Make sure that the bss segment isn't linked at 0x0, otherwise its
 	 * address won't be updated during relocation fixups.
diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds
index 0503dce..2643563 100644
--- a/arch/powerpc/cpu/mpc85xx/u-boot.lds
+++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds
@@ -95,6 +95,13 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;
 
+#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
+  .bootpg ADDR(.text) - 0x1000 :
+  {
+    KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
+  } :text = 0xffff
+  . = ADDR(.text) + 0x80000;
+#else
   .bootpg RESET_VECTOR_ADDRESS - 0xffc :
   {
     arch/powerpc/cpu/mpc85xx/start.o	(.bootpg)
@@ -117,6 +124,7 @@ SECTIONS
 #if (RESET_VECTOR_ADDRESS == 0xfffffffc)
   . |= 0x10;
 #endif
+#endif
 
   __bss_start = .;
   .bss (NOLOAD)       :
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 32+ messages in thread
* [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import
@ 2013-06-21  7:14 Zhang Ying-B40530
  0 siblings, 0 replies; 32+ messages in thread
From: Zhang Ying-B40530 @ 2013-06-21  7:14 UTC (permalink / raw)
  To: u-boot

>

> The functionality env_import will be used in the SPL. They

> had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it

> into the SPL.

>

> Signed-off-by: Ying Zhang <b40530 at freescale.com<mailto:b40530@freescale.com>>

> ---

> Compared with the original version, Changed as below:

> 1. Split from "boot from SD card/SPI flash with SPL".

> 2. Split from "spl: Make CONFIG_SPL_BUILD contain more functionality"

> 3. No change.

> 4. No change.

>

>  common/env_common.c |    2 --

>  1 files changed, 0 insertions(+), 2 deletions(-)



This affects all boards, all architectures?  How well has this been

tested?

[Zhang Ying]

We could not verify all the boards.



This ifndef was introduced by Ilya Yanok in

commit 7ac2fe2da21d292aeaf3af74e5c80de9ce9dab56.



So, we have already asked Ilya:

What are the consequences of removing this?

Is there some other symbol we can use here?



We have not received any response.

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

end of thread, other threads:[~2013-08-20 17:06 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20  8:04 [U-Boot] [PATCH 01/10 v5] powerpc/mpc85xx: support application without resetvec segment in the linker script ying.zhang at freescale.com
2013-06-20  8:04 ` [U-Boot] [PATCH 02/10 v5] powerpc/mpc85xx: modify the functionality clear_bss and aligning the end address of the BSS ying.zhang at freescale.com
2013-06-20  8:04 ` [U-Boot] [PATCH 03/10 v5] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL ying.zhang at freescale.com
2013-06-27 22:03   ` Tom Rini
2013-06-27 22:19     ` Andy Fleming
2013-06-20  8:04 ` [U-Boot] [PATCH 04/10 v5] Makefile: move the common makefile line to public area ying.zhang at freescale.com
2013-06-27 22:02   ` Tom Rini
2013-06-20  8:04 ` [U-Boot] [PATCH 05/10 v5] powerpc: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and enabled some functionality for common SPL ying.zhang at freescale.com
2013-06-20  8:04 ` [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import ying.zhang at freescale.com
2013-06-21  5:37   ` Wolfgang Denk
     [not found]     ` <B3A295C5BD5B13458B2F5C6AFAD91046723AB8@039-SN2MPN1-021.039d.mgd.msft.net>
2013-06-26 16:12       ` Scott Wood
2013-06-26 17:34         ` Tom Rini
2013-06-27  2:35           ` Zhang Ying-B40530
2013-06-27 12:17             ` Tom Rini
2013-06-27 20:16               ` Scott Wood
2013-06-27 21:56                 ` Tom Rini
2013-07-09  9:59                   ` Zhang Ying-B40530
2013-08-14  2:31                   ` Zhang Ying-B40530
2013-08-14 13:48                     ` Tom Rini
2013-08-14 15:42                       ` York Sun
2013-08-15  2:25                         ` Zhang Ying-B40530
2013-08-15  2:42                           ` sun york-R58495
2013-08-15  2:48                             ` Zhang Ying-B40530
2013-08-20 17:06                               ` York Sun
2013-06-20  8:04 ` [U-Boot] [PATCH 07/10 v5] powerpc/p1022ds: boot from SD Card with SPL ying.zhang at freescale.com
2013-06-20  8:04 ` [U-Boot] [PATCH 08/10 v5] powerpc/p1022ds: boot from spi flash " ying.zhang at freescale.com
2013-06-20  8:04 ` [U-Boot] [PATCH 09/10 v5] nand: tpl : introduce the TPL based on the SPL ying.zhang at freescale.com
2013-06-20  8:04 ` [U-Boot] [PATCH 10/10 v5] powerpc: p1022ds: support TPL on the P1022DS ying.zhang at freescale.com
2013-06-21  5:36 ` [U-Boot] [PATCH 01/10 v5] powerpc/mpc85xx: support application without resetvec segment in the linker script Wolfgang Denk
2013-06-27 22:01   ` Tom Rini
2013-06-27 22:16     ` Andy Fleming
  -- strict thread matches above, loose matches on Subject: below --
2013-06-21  7:14 [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import Zhang Ying-B40530

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