[U-Boot] [PATCH v2 16/17] Move low level eNET board init into dedicated sections

2009-08-25 Thread Graeme Russ
This patch is in readiness for moving all u-boot code + data from Flash to
RAM. Low level init code is not needed after bootstrap and therefore does
not need to be copied. Moving this code into dedicated sections makes it
easier

Signed-off-by: Graeme Russ graeme.r...@gmail.com
---
Version 2
 - Modified slightly to account for dropping of patch 15 (no functional
   changes)

 board/eNET/eNET_start.S |3 +++
 board/eNET/u-boot.lds   |4 ++--
 board/sc520_cdp/sc520_cdp_asm.S |1 +
 board/sc520_cdp/u-boot.lds  |4 ++--
 board/sc520_spunk/sc520_spunk_asm.S |1 +
 board/sc520_spunk/u-boot.lds|4 ++--
 cpu/i386/sc520/sc520_asm.S  |2 +-
 cpu/i386/start.S|2 +-
 8 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/board/eNET/eNET_start.S b/board/eNET/eNET_start.S
index 1b07d62..1309ac7 100644
--- a/board/eNET/eNET_start.S
+++ b/board/eNET/eNET_start.S
@@ -23,6 +23,9 @@
 
 #include hardware.h
 
+.section .start32, ax
+
+
 /* board early intialization */
 .globl early_board_init
 early_board_init:
diff --git a/board/eNET/u-boot.lds b/board/eNET/u-boot.lds
index 4ea424d..284d2bd 100644
--- a/board/eNET/u-boot.lds
+++ b/board/eNET/u-boot.lds
@@ -78,8 +78,8 @@ SECTIONS
 * The fff0 offset of resetvec is important, however.
 */
 
-   . = 0xfe00;
-   .start32 : AT (0x3807fe00) { *(.start32); }
+   . = 0xee00;
+   .start32 : AT (0x3807ee00) { *(.start32); }
 
. = 0xf800;
.start16 : AT (0x3807f800) { *(.start16); }
diff --git a/board/sc520_cdp/sc520_cdp_asm.S b/board/sc520_cdp/sc520_cdp_asm.S
index 3a8a03f..904cfb9 100644
--- a/board/sc520_cdp/sc520_cdp_asm.S
+++ b/board/sc520_cdp/sc520_cdp_asm.S
@@ -25,6 +25,7 @@
  * We can then use the leds to display status information.
  */
 
+.section .start32, ax
 sc520_cdp_registers:
 /* sizeoffsetvalue */
 .word 1 ; .word 0x040 ; .long 0x00   /* SDRAM buffer control */
diff --git a/board/sc520_cdp/u-boot.lds b/board/sc520_cdp/u-boot.lds
index df437c7..d232dc1 100644
--- a/board/sc520_cdp/u-boot.lds
+++ b/board/sc520_cdp/u-boot.lds
@@ -79,8 +79,8 @@ SECTIONS
 */
 
 
-   . = 0xfe00;
-   .start32 : AT (0x387ffe00) { *(.start32); }
+   . = 0xee00;
+   .start32 : AT (0x3807ee00) { *(.start32); }
 
. = 0xff00;
.start16 : AT (0x387fff00) { *(.start16); }
diff --git a/board/sc520_spunk/sc520_spunk_asm.S 
b/board/sc520_spunk/sc520_spunk_asm.S
index eda7e91..020bd02 100644
--- a/board/sc520_spunk/sc520_spunk_asm.S
+++ b/board/sc520_spunk/sc520_spunk_asm.S
@@ -25,6 +25,7 @@
  * We can then use the leds to display status information.
  */
 
+.section .start32, ax
 sc520_cdp_registers:
 /* sizeoffsetvalue */
 .word 1 ; .word 0x040 ; .long 0x00   /* SDRAM buffer control */
diff --git a/board/sc520_spunk/u-boot.lds b/board/sc520_spunk/u-boot.lds
index efb570b..f6d1abf 100644
--- a/board/sc520_spunk/u-boot.lds
+++ b/board/sc520_spunk/u-boot.lds
@@ -80,8 +80,8 @@ SECTIONS
 */
 
 
-   . = 0xfe00;
-   .start32 : AT (0x387ffe00) { *(.start32); }
+   . = 0xee00;
+   .start32 : AT (0x3807ee00) { *(.start32); }
 
. = 0xff00;
.start16 : AT (0x387fff00) { *(.start16); }
diff --git a/cpu/i386/sc520/sc520_asm.S b/cpu/i386/sc520/sc520_asm.S
index 2042d9b..07e2acd 100644
--- a/cpu/i386/sc520/sc520_asm.S
+++ b/cpu/i386/sc520/sc520_asm.S
@@ -106,7 +106,7 @@
 
 #include config.h
 
-.section .text
+.section .start32, ax
 .equDRCCTL, 0x0fffef010   /* DRAM control register */
 .equDRCTMCTL,   0x0fffef012   /* DRAM timing control register */
 .equDRCCFG, 0x0fffef014   /* DRAM bank configuration register 
*/
diff --git a/cpu/i386/start.S b/cpu/i386/start.S
index 59089ef..bb4a5cf 100644
--- a/cpu/i386/start.S
+++ b/cpu/i386/start.S
@@ -27,7 +27,7 @@
 #include version.h
 
 
-.section .text
+.section .start32, ax
 .code32
 .globl _start
 .type _start, @function
-- 
1.6.4.1.174.g32f4c

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 16/17] Move low level eNET board init into dedicated sections

2009-08-25 Thread Wolfgang Denk
Dear Graeme Russ,

In message 1251195588-7799-1-git-send-email-graeme.r...@gmail.com you wrote:
 This patch is in readiness for moving all u-boot code + data from Flash to
 RAM. Low level init code is not needed after bootstrap and therefore does
 not need to be copied. Moving this code into dedicated sections makes it
 easier

But is this worth the effort? It makes the design more complicated.


Best regards,

Wolfgang Denk

--
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: w...@denx.de
In a business, marketroids, salespukes, and  lawyers  have  different
goals from those who actually do work and produce something. Usually,
is  is the former who triumph over the latter, due to the simple rule
that those who print the money make the rules.
 -- Tom Christiansen in 5jdcls$b0...@csnews.cs.colorado.edu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 16/17] Move low level eNET board init into dedicated sections

2009-08-25 Thread Graeme Russ
Wolfgang Denk wrote:
 Dear Graeme Russ,
 
 In message 1251195588-7799-1-git-send-email-graeme.r...@gmail.com you wrote:
 This patch is in readiness for moving all u-boot code + data from Flash to
 RAM. Low level init code is not needed after bootstrap and therefore does
 not need to be copied. Moving this code into dedicated sections makes it
 easier
 
 But is this worth the effort? It makes the design more complicated.
 

Actually I think the opposite is true - The low level asm code is all
placed at the bottom (or is it top?) end of the Boot Flash rather than
interleaved in the rest of the .text section. This is critical for the
real mode code as there is a tight limit on the jump lengths. This patch
makes it all the more consistent

 
 Best regards,
 
 Wolfgang Denk
 

Regards,

G
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot