diff options
author | Wolfgang Denk <wd@denx.de> | 2010-10-26 14:34:52 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-10-26 21:05:30 +0200 |
commit | 25ddd1fb0a2281b182529afbc8fda5de2dc16d96 (patch) | |
tree | b1d57d9d1324fb6b8fddf7ebc976dbe822468649 /arch | |
parent | 16a354f920f3959ed847bd917bdfbc7eba48cf1e (diff) | |
download | u-boot-imx-25ddd1fb0a2281b182529afbc8fda5de2dc16d96.zip u-boot-imx-25ddd1fb0a2281b182529afbc8fda5de2dc16d96.tar.gz u-boot-imx-25ddd1fb0a2281b182529afbc8fda5de2dc16d96.tar.bz2 |
Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value
CONFIG_SYS_GBL_DATA_SIZE has always been just a bad workarond for not
being able to use "sizeof(struct global_data)" in assembler files.
Recent experience has shown that manual synchronization is not
reliable enough. This patch renames CONFIG_SYS_GBL_DATA_SIZE into
GENERATED_GBL_DATA_SIZE which gets automatically generated by the
asm-offsets tool. In the result, all definitions of this value can be
deleted from the board config files. We have to make sure that all
files that reference such data include the new <asm-offsets.h> file.
No other changes have been done yet, but it is obvious that similar
changes / simplifications can be done for other, related macro
definitions as well.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
59 files changed, 110 insertions, 82 deletions
diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S index 1d4637d..07d0c85 100644 --- a/arch/arm/cpu/arm1136/start.S +++ b/arch/arm/cpu/arm1136/start.S @@ -28,6 +28,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <version.h> .globl _start @@ -380,7 +381,7 @@ stack_setup: sub sp, r0, #128 /* leave 32 words for abort-stack */ #else sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -510,7 +511,7 @@ cpu_init_crit: #else adr r2, _start sub r2, r2, #(CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #endif ldmia r2, {r2 - r3} @ get values for "aborted" pc and cpsr (into parm regs) add r0, sp, #S_FRAME_SIZE @ grab pointer to old stack @@ -547,7 +548,7 @@ cpu_init_crit: #else adr r13, _start @ setup our mode stack (enter in banked mode) sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) @ move past malloc pool - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ move to reserved a couple spots for abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ move to reserved a couple spots for abort stack #endif str lr, [r13] @ save caller lr in position 0 of saved stack @@ -569,7 +570,7 @@ cpu_init_crit: #else ldr r0, _armboot_start @ get data regions start sub r0, r0, #(CONFIG_SYS_MALLOC_LEN) @ move past malloc pool - sub r0, r0, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ move past gbl and a couple spots for abort stack + sub r0, r0, #(GENERATED_GBL_DATA_SIZE+8) @ move past gbl and a couple spots for abort stack #endif str lr, [r0] @ save caller lr in position 0 of saved stack mrs r0, spsr @ get the spsr diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 24e5bf4..c13cceb 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -30,6 +30,7 @@ * Base codes by scsuh (sc.suh) */ +#include <asm-offsets.h> #include <config.h> #include <version.h> #ifdef CONFIG_ENABLE_MMU @@ -546,7 +547,7 @@ skip_hw_init: stack_setup: ldr r0, =CONFIG_SYS_UBOOT_BASE /* base of copy in DRAM */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ sub sp, r0, #12 /* leave 3 words for abort-stack */ bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ @@ -663,7 +664,7 @@ phy_last_jump: ldr r2, _armboot_start sub r2, r2, #(CONFIG_SYS_MALLOC_LEN) /* set base 2 words into abort stack */ - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) #else ldr r2, IRQ_STACK_START_IN #endif @@ -687,7 +688,7 @@ phy_last_jump: /* move past malloc pool */ sub r13, r13, #(CONFIG_SYS_MALLOC_LEN) /* move to reserved a couple spots for abort stack */ - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE + 8) + sub r13, r13, #(GENERATED_GBL_DATA_SIZE + 8) #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif @@ -721,7 +722,7 @@ phy_last_jump: /* move past malloc pool */ sub r0, r0, #(CONFIG_SYS_MALLOC_LEN) /* move past gbl and a couple spots for abort stack */ - sub r0, r0, #(CONFIG_SYS_GBL_DATA_SIZE + 8) + sub r0, r0, #(GENERATED_GBL_DATA_SIZE + 8) #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S index d93911f..06aa3a2 100644 --- a/arch/arm/cpu/arm720t/start.S +++ b/arch/arm/cpu/arm720t/start.S @@ -23,7 +23,7 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <version.h> #include <asm/hardware.h> @@ -327,7 +327,7 @@ copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -609,7 +609,7 @@ lock_loop: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -646,7 +646,7 @@ lock_loop: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S index 343a760..84f7546 100644 --- a/arch/arm/cpu/arm920t/start.S +++ b/arch/arm/cpu/arm920t/start.S @@ -24,6 +24,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <common.h> #include <config.h> @@ -414,7 +415,7 @@ copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -529,7 +530,7 @@ cpu_init_crit: sub r2, r2, #(CONFIG_STACKSIZE) sub r2, r2, #(CONFIG_SYS_MALLOC_LEN) /* set base 2 words into abort stack */ - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) #else ldr r2, IRQ_STACK_START_IN #endif @@ -569,7 +570,7 @@ cpu_init_crit: sub r13, r13, #(CONFIG_STACKSIZE) sub r13, r13, #(CONFIG_SYS_MALLOC_LEN) /* reserve a couple spots in abort stack */ - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/arm925t/start.S b/arch/arm/cpu/arm925t/start.S index cf18a01..f45ad89 100644 --- a/arch/arm/cpu/arm925t/start.S +++ b/arch/arm/cpu/arm925t/start.S @@ -30,7 +30,7 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <version.h> @@ -385,7 +385,7 @@ copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -492,7 +492,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -529,7 +529,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN #endif diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index e1c1508..69e1a33 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -31,7 +31,7 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <common.h> #include <version.h> @@ -349,7 +349,7 @@ stack_setup: sub sp, r0, #128 /* leave 32 words for abort-stack */ #ifndef CONFIG_PRELOADER sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -475,7 +475,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) adr r2, _start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -513,7 +513,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) adr r13, _start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S index 077886f..25b573b 100644 --- a/arch/arm/cpu/arm946es/start.S +++ b/arch/arm/cpu/arm946es/start.S @@ -30,7 +30,7 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <version.h> @@ -316,7 +316,7 @@ copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -427,7 +427,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -465,7 +465,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/arm_intcm/start.S b/arch/arm/cpu/arm_intcm/start.S index 07356cb..3e9d5e8 100644 --- a/arch/arm/cpu/arm_intcm/start.S +++ b/arch/arm/cpu/arm_intcm/start.S @@ -30,7 +30,7 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <version.h> @@ -312,7 +312,7 @@ copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -403,7 +403,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -441,7 +441,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index ef6c32d..b9eb0c9 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -29,6 +29,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <version.h> @@ -357,7 +358,7 @@ copy_loop: @ copy 32 bytes at a time stack_setup: ldr r0, _TEXT_BASE @ upper 128 KiB: relocated uboot sub r0, r0, #CONFIG_SYS_MALLOC_LEN @ malloc area - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE @ bdinfo + sub r0, r0, #GENERATED_GBL_DATA_SIZE @ bdinfo #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ + CONFIG_STACKSIZE_FIQ) #endif @@ -464,7 +465,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE + 8) @ set base 2 words into abort + sub r2, r2, #(GENERATED_GBL_DATA_SIZE + 8) @ set base 2 words into abort #else ldr r2, IRQ_STACK_START_IN @ set base 2 words into abort @ stack @@ -507,7 +508,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack (enter sub r13, r13, #(CONFIG_SYS_MALLOC_LEN) @ move past malloc pool - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE + 8) @ move to reserved a couple + sub r13, r13, #(GENERATED_GBL_DATA_SIZE + 8) @ move to reserved a couple #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack (enter @ in banked mode) @@ -535,7 +536,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r0, _armboot_start @ get data regions start sub r0, r0, #(CONFIG_SYS_MALLOC_LEN) @ move past malloc pool - sub r0, r0, #(CONFIG_SYS_GBL_DATA_SIZE + 8) @ move past gbl and a couple + sub r0, r0, #(GENERATED_GBL_DATA_SIZE + 8) @ move past gbl and a couple #else ldr r0, IRQ_STACK_START_IN @ get data regions start @ spots for abort stack diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S index 836c33b..2931ccd 100644 --- a/arch/arm/cpu/ixp/start.S +++ b/arch/arm/cpu/ixp/start.S @@ -27,6 +27,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <version.h> #include <asm/arch/ixp425.h> @@ -555,7 +556,7 @@ copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -620,7 +621,7 @@ _start_armboot: .word start_armboot #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -661,7 +662,7 @@ _start_armboot: .word start_armboot #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/lh7a40x/start.S b/arch/arm/cpu/lh7a40x/start.S index d944860..703baf8 100644 --- a/arch/arm/cpu/lh7a40x/start.S +++ b/arch/arm/cpu/lh7a40x/start.S @@ -24,11 +24,10 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <version.h> - /* ************************************************************************* * @@ -349,7 +348,7 @@ copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -464,7 +463,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -501,7 +500,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S index 3c5bd84..b8065b7 100644 --- a/arch/arm/cpu/pxa/start.S +++ b/arch/arm/cpu/pxa/start.S @@ -29,6 +29,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <version.h> #include <asm/arch/pxa-regs.h> @@ -419,7 +420,7 @@ reset: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -460,7 +461,7 @@ reset: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/cpu/s3c44b0/start.S b/arch/arm/cpu/s3c44b0/start.S index 20091b2..77f3735 100644 --- a/arch/arm/cpu/s3c44b0/start.S +++ b/arch/arm/cpu/s3c44b0/start.S @@ -27,11 +27,10 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <version.h> - /* * Jump vector table */ @@ -331,7 +330,7 @@ vector_copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif diff --git a/arch/arm/cpu/sa1100/start.S b/arch/arm/cpu/sa1100/start.S index 8eabb66..5635e0a 100644 --- a/arch/arm/cpu/sa1100/start.S +++ b/arch/arm/cpu/sa1100/start.S @@ -25,11 +25,10 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <version.h> - /* ************************************************************************* * @@ -301,7 +300,7 @@ copy_loop: stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ - sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #GENERATED_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -445,7 +444,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(GENERATED_GBL_DATA_SIZE+8) @ set base 2 words into abort stack #else ldr r2, IRQ_STACK_START_IN #endif @@ -482,7 +481,7 @@ cpu_init_crit: #if defined(CONFIG_SYS_ARM_WITHOUT_RELOC) ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE+CONFIG_SYS_MALLOC_LEN) - sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(GENERATED_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack #else ldr r13, IRQ_STACK_START_IN @ setup our mode stack #endif diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 6dae432..5438ebc 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -30,7 +30,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ typedef struct global_data { diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index 9a21e7b..90aa04b 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -50,7 +50,7 @@ int interrupt_init (void) IRQ_STACK_START = gd->irq_sp - 4; IRQ_STACK_START_IN = gd->irq_sp + 8; #else - IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_GBL_DATA_SIZE - 4; + IRQ_STACK_START = _armboot_start - CONFIG_SYS_MALLOC_LEN - GENERATED_GBL_DATA_SIZE - 4; #endif FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ; diff --git a/arch/avr32/cpu/start.S b/arch/avr32/cpu/start.S index 06bf4c6..97140e9 100644 --- a/arch/avr32/cpu/start.S +++ b/arch/avr32/cpu/start.S @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <asm/ptrace.h> #include <asm/sysreg.h> diff --git a/arch/avr32/include/asm/global_data.h b/arch/avr32/include/asm/global_data.h index 5a7aed9..4ef8fc5 100644 --- a/arch/avr32/include/asm/global_data.h +++ b/arch/avr32/include/asm/global_data.h @@ -29,7 +29,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ typedef struct global_data { diff --git a/arch/blackfin/include/asm/config.h b/arch/blackfin/include/asm/config.h index 215e0f2..34ca68c 100644 --- a/arch/blackfin/include/asm/config.h +++ b/arch/blackfin/include/asm/config.h @@ -101,11 +101,8 @@ #ifndef CONFIG_SYS_MALLOC_BASE # define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN) #endif -#ifndef CONFIG_SYS_GBL_DATA_SIZE -# define CONFIG_SYS_GBL_DATA_SIZE (128) -#endif #ifndef CONFIG_SYS_GBL_DATA_ADDR -# define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - CONFIG_SYS_GBL_DATA_SIZE) +# define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - GENERATED_GBL_DATA_SIZE) #endif #ifndef CONFIG_STACKBASE # define CONFIG_STACKBASE (CONFIG_SYS_GBL_DATA_ADDR - 4) diff --git a/arch/blackfin/include/asm/global_data.h b/arch/blackfin/include/asm/global_data.h index d5514b0..eba5e93 100644 --- a/arch/blackfin/include/asm/global_data.h +++ b/arch/blackfin/include/asm/global_data.h @@ -37,7 +37,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ typedef struct global_data { bd_t *bd; diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index fcfd174..8eca7d6 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -237,12 +237,12 @@ void board_init_f(ulong bootflag) #endif #ifdef DEBUG - if (CONFIG_SYS_GBL_DATA_SIZE < sizeof(*gd)) + if (GENERATED_GBL_DATA_SIZE < sizeof(*gd)) hang(); #endif serial_early_puts("Init global data\n"); gd = (gd_t *) (CONFIG_SYS_GBL_DATA_ADDR); - memset((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE); + memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE); /* Board data initialization */ addr = (CONFIG_SYS_GBL_DATA_ADDR + sizeof(gd_t)); diff --git a/arch/i386/include/asm/global_data.h b/arch/i386/include/asm/global_data.h index 5971123..e3f8a25 100644 --- a/arch/i386/include/asm/global_data.h +++ b/arch/i386/include/asm/global_data.h @@ -30,7 +30,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ #ifndef __ASSEMBLY__ diff --git a/arch/m68k/cpu/mcf5227x/start.S b/arch/m68k/cpu/mcf5227x/start.S index ac71096..d09d492 100644 --- a/arch/m68k/cpu/mcf5227x/start.S +++ b/arch/m68k/cpu/mcf5227x/start.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <timestamp.h> #include "version.h" diff --git a/arch/m68k/cpu/mcf523x/start.S b/arch/m68k/cpu/mcf523x/start.S index 20b50e7..a726b59 100644 --- a/arch/m68k/cpu/mcf523x/start.S +++ b/arch/m68k/cpu/mcf523x/start.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <timestamp.h> #include "version.h" diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S index d1f3d83..f0cfa6f 100644 --- a/arch/m68k/cpu/mcf52x2/start.S +++ b/arch/m68k/cpu/mcf52x2/start.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <timestamp.h> #include "version.h" diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S index a80b0a9..53ac471 100644 --- a/arch/m68k/cpu/mcf532x/start.S +++ b/arch/m68k/cpu/mcf532x/start.S @@ -24,6 +24,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <timestamp.h> #include "version.h" diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S index 8b69d1f..5255f37 100644 --- a/arch/m68k/cpu/mcf5445x/start.S +++ b/arch/m68k/cpu/mcf5445x/start.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <timestamp.h> #include "version.h" diff --git a/arch/m68k/cpu/mcf547x_8x/start.S b/arch/m68k/cpu/mcf547x_8x/start.S index 8411862..e30923f 100644 --- a/arch/m68k/cpu/mcf547x_8x/start.S +++ b/arch/m68k/cpu/mcf547x_8x/start.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <timestamp.h> #include "version.h" diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h index 3a36f82..fc486fd 100644 --- a/arch/m68k/include/asm/global_data.h +++ b/arch/m68k/include/asm/global_data.h @@ -30,7 +30,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ typedef struct global_data { diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index 98c248f..d44903b 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -24,6 +24,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> .text diff --git a/arch/microblaze/include/asm/global_data.h b/arch/microblaze/include/asm/global_data.h index 03444ef..557ad27 100644 --- a/arch/microblaze/include/asm/global_data.h +++ b/arch/microblaze/include/asm/global_data.h @@ -31,7 +31,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ typedef struct global_data { diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 84267cd..eeef579 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -96,7 +96,7 @@ void board_init (void) ulong flash_size = 0; #endif asm ("nop"); /* FIXME gd is not initialize - wait */ - memset ((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE); + memset ((void *)gd, 0, GENERATED_GBL_DATA_SIZE); gd->bd = (bd_t *) (gd + 1); /* At end of global data */ gd->baudrate = CONFIG_BAUDRATE; bd = gd->bd; diff --git a/arch/mips/cpu/cache.S b/arch/mips/cpu/cache.S index ff4f11c..4b30c89 100644 --- a/arch/mips/cpu/cache.S +++ b/arch/mips/cpu/cache.S @@ -22,6 +22,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <asm/asm.h> #include <asm/regdef.h> diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S index 57db589..d6bcef6 100644 --- a/arch/mips/cpu/start.S +++ b/arch/mips/cpu/start.S @@ -22,6 +22,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <asm/regdef.h> #include <asm/mipsregs.h> diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h index bf1bfc3..271a290 100644 --- a/arch/mips/include/asm/global_data.h +++ b/arch/mips/include/asm/global_data.h @@ -33,7 +33,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ typedef struct global_data { diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S index 76d3b52..9b0f52d 100644 --- a/arch/nios2/cpu/start.S +++ b/arch/nios2/cpu/start.S @@ -21,7 +21,7 @@ * MA 02111-1307 USA */ - +#include <asm-offsets.h> #include <config.h> #include <timestamp.h> #include <version.h> diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c index f83e691..f6c6bc1 100644 --- a/arch/nios2/lib/board.c +++ b/arch/nios2/lib/board.c @@ -95,7 +95,7 @@ void board_init (void) /* compiler optimization barrier needed for GCC >= 3.4 */ __asm__ __volatile__("": : :"memory"); - memset( gd, 0, CONFIG_SYS_GBL_DATA_SIZE ); + memset( gd, 0, GENERATED_GBL_DATA_SIZE ); gd->bd = (bd_t *)(gd+1); /* At end of global data */ gd->baudrate = CONFIG_BAUDRATE; diff --git a/arch/powerpc/cpu/74xx_7xx/start.S b/arch/powerpc/cpu/74xx_7xx/start.S index b4121df..280781e 100644 --- a/arch/powerpc/cpu/74xx_7xx/start.S +++ b/arch/powerpc/cpu/74xx_7xx/start.S @@ -32,6 +32,7 @@ * board_init lies at a quite high address and when the cpu has * jumped there, everything is ok. */ +#include <asm-offsets.h> #include <config.h> #include <74xx_7xx.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc512x/start.S b/arch/powerpc/cpu/mpc512x/start.S index 2265c8c..fe35190 100644 --- a/arch/powerpc/cpu/mpc512x/start.S +++ b/arch/powerpc/cpu/mpc512x/start.S @@ -29,6 +29,7 @@ * U-Boot - Startup Code for MPC512x based Embedded Boards */ +#include <asm-offsets.h> #include <config.h> #include <timestamp.h> #include <version.h> diff --git a/arch/powerpc/cpu/mpc5xx/start.S b/arch/powerpc/cpu/mpc5xx/start.S index da42557..63449c3 100644 --- a/arch/powerpc/cpu/mpc5xx/start.S +++ b/arch/powerpc/cpu/mpc5xx/start.S @@ -30,6 +30,7 @@ * */ +#include <asm-offsets.h> #include <config.h> #include <mpc5xx.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc5xxx/start.S b/arch/powerpc/cpu/mpc5xxx/start.S index 92858fc..ad54677 100644 --- a/arch/powerpc/cpu/mpc5xxx/start.S +++ b/arch/powerpc/cpu/mpc5xxx/start.S @@ -25,6 +25,7 @@ /* * U-Boot - Startup Code for MPC5xxx CPUs */ +#include <asm-offsets.h> #include <config.h> #include <mpc5xxx.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc8220/start.S b/arch/powerpc/cpu/mpc8220/start.S index b5c160b..b029e84 100644 --- a/arch/powerpc/cpu/mpc8220/start.S +++ b/arch/powerpc/cpu/mpc8220/start.S @@ -25,6 +25,7 @@ /* * U-Boot - Startup Code for MPC8220 CPUs */ +#include <asm-offsets.h> #include <config.h> #include <mpc8220.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc824x/start.S b/arch/powerpc/cpu/mpc824x/start.S index d10231e..616de58 100644 --- a/arch/powerpc/cpu/mpc824x/start.S +++ b/arch/powerpc/cpu/mpc824x/start.S @@ -37,6 +37,7 @@ * board_init will change CS0 to be positioned at the correct * address and (s)dram will be positioned at address 0 */ +#include <asm-offsets.h> #include <config.h> #include <mpc824x.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc8260/start.S b/arch/powerpc/cpu/mpc8260/start.S index 55c64ea..521a639 100644 --- a/arch/powerpc/cpu/mpc8260/start.S +++ b/arch/powerpc/cpu/mpc8260/start.S @@ -25,6 +25,7 @@ /* * U-Boot - Startup Code for MPC8260 PowerPC based Embedded Boards */ +#include <asm-offsets.h> #include <config.h> #include <mpc8260.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S index 403fda4..a35697d 100644 --- a/arch/powerpc/cpu/mpc83xx/start.S +++ b/arch/powerpc/cpu/mpc83xx/start.S @@ -27,6 +27,7 @@ * U-Boot - Startup Code for MPC83xx PowerPC based Embedded Boards */ +#include <asm-offsets.h> #include <config.h> #include <mpc83xx.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc85xx/release.S b/arch/powerpc/cpu/mpc85xx/release.S index 53cefaf..56a853e 100644 --- a/arch/powerpc/cpu/mpc85xx/release.S +++ b/arch/powerpc/cpu/mpc85xx/release.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <mpc85xx.h> #include <version.h> diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S index 7e5e6b1..291557d 100644 --- a/arch/powerpc/cpu/mpc85xx/start.S +++ b/arch/powerpc/cpu/mpc85xx/start.S @@ -28,6 +28,7 @@ * */ +#include <asm-offsets.h> #include <config.h> #include <mpc85xx.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc86xx/start.S b/arch/powerpc/cpu/mpc86xx/start.S index 36004b7..6127115 100644 --- a/arch/powerpc/cpu/mpc86xx/start.S +++ b/arch/powerpc/cpu/mpc86xx/start.S @@ -30,6 +30,7 @@ * board_init lies at a quite high address and when the cpu has * jumped there, everything is ok. */ +#include <asm-offsets.h> #include <config.h> #include <mpc86xx.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S index 4a8c5d9..9d022bf 100644 --- a/arch/powerpc/cpu/mpc8xx/start.S +++ b/arch/powerpc/cpu/mpc8xx/start.S @@ -37,6 +37,7 @@ * board_init will change CS0 to be positioned at the correct * address and (s)dram will be positioned at address 0 */ +#include <asm-offsets.h> #include <config.h> #include <mpc8xx.h> #include <timestamp.h> diff --git a/arch/powerpc/cpu/ppc4xx/start.S b/arch/powerpc/cpu/ppc4xx/start.S index 140bfc9..363becc 100644 --- a/arch/powerpc/cpu/ppc4xx/start.S +++ b/arch/powerpc/cpu/ppc4xx/start.S @@ -63,6 +63,7 @@ * board_init will change CS0 to be positioned at the correct * address and (s)dram will be positioned at address 0 */ +#include <asm-offsets.h> #include <config.h> #include <asm/ppc4xx.h> #include <timestamp.h> @@ -1399,7 +1400,7 @@ relocate_code: /* Flush initial global data range */ mr r3, r4 - addi r4, r4, CONFIG_SYS_GBL_DATA_SIZE@l + addi r4, r4, GENERATED_GBL_DATA_SIZE@l bl flush_dcache_range #if defined(CONFIG_SYS_INIT_DCACHE_CS) diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 2a323e1..2e218de 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -34,7 +34,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ typedef struct global_data { diff --git a/arch/sh/cpu/sh2/start.S b/arch/sh/cpu/sh2/start.S index 0ab867d..77043f6 100644 --- a/arch/sh/cpu/sh2/start.S +++ b/arch/sh/cpu/sh2/start.S @@ -18,6 +18,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <version.h> @@ -73,6 +74,6 @@ loop: ._reloc_dst_end: .long reloc_dst_end ._bss_start: .long bss_start ._bss_end: .long bss_end -._gd_init: .long (_start - CONFIG_SYS_GBL_DATA_SIZE) -._stack_init: .long (_start - CONFIG_SYS_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) +._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE) +._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) ._sh_generic_init: .long sh_generic_init diff --git a/arch/sh/cpu/sh3/start.S b/arch/sh/cpu/sh3/start.S index c0f8326..9dd2303 100644 --- a/arch/sh/cpu/sh3/start.S +++ b/arch/sh/cpu/sh3/start.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <version.h> @@ -72,6 +73,6 @@ loop: ._reloc_dst_end: .long reloc_dst_end ._bss_start: .long bss_start ._bss_end: .long bss_end -._gd_init: .long (_start - CONFIG_SYS_GBL_DATA_SIZE) -._stack_init: .long (_start - CONFIG_SYS_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) +._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE) +._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) ._sh_generic_init: .long sh_generic_init diff --git a/arch/sh/cpu/sh4/start.S b/arch/sh/cpu/sh4/start.S index 711ae66..4b5f606 100644 --- a/arch/sh/cpu/sh4/start.S +++ b/arch/sh/cpu/sh4/start.S @@ -18,6 +18,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <version.h> @@ -69,6 +70,6 @@ loop: ._reloc_dst_end: .long reloc_dst_end ._bss_start: .long bss_start ._bss_end: .long bss_end -._gd_init: .long (_start - CONFIG_SYS_GBL_DATA_SIZE) -._stack_init: .long (_start - CONFIG_SYS_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) +._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE) +._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) ._sh_generic_init: .long sh_generic_init diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c index a302fc2..fe53ab4 100644 --- a/arch/sh/lib/board.c +++ b/arch/sh/lib/board.c @@ -89,7 +89,7 @@ static int sh_pci_init(void) static int sh_mem_env_init(void) { - mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_GBL_DATA_SIZE - + mem_malloc_init(CONFIG_SYS_TEXT_BASE - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN - 16); env_relocate(); jumptable_init(); @@ -144,7 +144,7 @@ void sh_generic_init(void) bd_t *bd; init_fnc_t **init_fnc_ptr; - memset(gd, 0, CONFIG_SYS_GBL_DATA_SIZE); + memset(gd, 0, GENERATED_GBL_DATA_SIZE); gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */ diff --git a/arch/sparc/cpu/leon2/start.S b/arch/sparc/cpu/leon2/start.S index dd58262..f22fb7e 100644 --- a/arch/sparc/cpu/leon2/start.S +++ b/arch/sparc/cpu/leon2/start.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <asm/asmmacro.h> #include <asm/winmacro.h> diff --git a/arch/sparc/cpu/leon3/start.S b/arch/sparc/cpu/leon3/start.S index 5c0808a..56ae88d 100644 --- a/arch/sparc/cpu/leon3/start.S +++ b/arch/sparc/cpu/leon3/start.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <asm-offsets.h> #include <config.h> #include <asm/asmmacro.h> #include <asm/winmacro.h> diff --git a/arch/sparc/include/asm/global_data.h b/arch/sparc/include/asm/global_data.h index 7c1ac0d..9b14674 100644 --- a/arch/sparc/include/asm/global_data.h +++ b/arch/sparc/include/asm/global_data.h @@ -36,7 +36,7 @@ * global variables during system initialization (until we have set * up the memory controller so that we can use RAM). * - * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t) + * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) */ typedef struct global_data { diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c index 09bcdb0..4a6041f 100644 --- a/arch/sparc/lib/board.c +++ b/arch/sparc/lib/board.c @@ -244,7 +244,7 @@ void board_init_f(ulong bootflag) printf("CONFIG_SYS_PROM_OFFSET: 0x%lx (%d)\n", CONFIG_SYS_PROM_OFFSET, CONFIG_SYS_PROM_SIZE); printf("CONFIG_SYS_GBL_DATA_OFFSET: 0x%lx (%d)\n", CONFIG_SYS_GBL_DATA_OFFSET, - CONFIG_SYS_GBL_DATA_SIZE); + GENERATED_GBL_DATA_SIZE); #endif #ifdef CONFIG_POST |