diff options
Diffstat (limited to 'arch/arm')
35 files changed, 82 insertions, 42 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 24b9d7c802..a0c89b7971 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 endif endif +# Support generic board on ARM +__HAVE_ARCH_GENERIC_BOARD := y + PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__ # Choose between ARM/Thumb instruction sets diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S index a067b8a186..eba23248d5 100644 --- a/arch/arm/cpu/arm1136/start.S +++ b/arch/arm/cpu/arm1136/start.S @@ -106,7 +106,7 @@ _image_copy_end_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/arm1136/u-boot-spl.lds b/arch/arm/cpu/arm1136/u-boot-spl.lds index a0462ab97a..b09b4ebfaf 100644 --- a/arch/arm/cpu/arm1136/u-boot-spl.lds +++ b/arch/arm/cpu/arm1136/u-boot-spl.lds @@ -57,6 +57,6 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sdram } diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 40df4b1614..3c291fbe42 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -121,7 +121,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S index 771d3869c1..43bd6edd28 100644 --- a/arch/arm/cpu/arm720t/start.S +++ b/arch/arm/cpu/arm720t/start.S @@ -103,7 +103,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/arm920t/ep93xx/u-boot.lds b/arch/arm/cpu/arm920t/ep93xx/u-boot.lds index c19285d210..e483820f3f 100644 --- a/arch/arm/cpu/arm920t/ep93xx/u-boot.lds +++ b/arch/arm/cpu/arm920t/ep93xx/u-boot.lds @@ -57,7 +57,7 @@ SECTIONS . = ALIGN(4); __bss_start = .; .bss : { *(.bss) } - __bss_end__ = .; + __bss_end = .; _end = .; } diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S index 511d21d334..2864d128c7 100644 --- a/arch/arm/cpu/arm920t/start.S +++ b/arch/arm/cpu/arm920t/start.S @@ -87,7 +87,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/arm925t/start.S b/arch/arm/cpu/arm925t/start.S index e8d6d71c17..827fee2492 100644 --- a/arch/arm/cpu/arm925t/start.S +++ b/arch/arm/cpu/arm925t/start.S @@ -93,7 +93,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c index 714fa92846..ca8a412626 100644 --- a/arch/arm/cpu/arm926ejs/davinci/spl.c +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c @@ -64,7 +64,7 @@ void board_init_f(ulong dummy) #endif /* Third, we clear the BSS. */ - memset(__bss_start, 0, __bss_end__ - __bss_start); + memset(__bss_start, 0, __bss_end - __bss_start); /* Finally, setup gd and move to the next step. */ gd = &gdata; diff --git a/arch/arm/cpu/arm926ejs/mxs/start.S b/arch/arm/cpu/arm926ejs/mxs/start.S index 7ccd337174..373e6d8d7c 100644 --- a/arch/arm/cpu/arm926ejs/mxs/start.S +++ b/arch/arm/cpu/arm926ejs/mxs/start.S @@ -133,7 +133,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds b/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds index 0f3222c76a..67b204e447 100644 --- a/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds +++ b/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds @@ -67,7 +67,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } _end = .; diff --git a/arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds b/arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds index 0af3e0a231..7405917595 100644 --- a/arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds +++ b/arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds @@ -67,7 +67,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } _end = .; diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 66a8b654bd..f5d15828d3 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -142,7 +142,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: @@ -151,7 +151,7 @@ _end_ofs: #ifdef CONFIG_NAND_U_BOOT .globl _end _end: - .word __bss_end__ + .word __bss_end #endif #ifdef CONFIG_USE_IRQ diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S index a7a98a4e58..9dec35b557 100644 --- a/arch/arm/cpu/arm946es/start.S +++ b/arch/arm/cpu/arm946es/start.S @@ -103,7 +103,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/arm_intcm/start.S b/arch/arm/cpu/arm_intcm/start.S index c189849fa8..04d08458f3 100644 --- a/arch/arm/cpu/arm_intcm/start.S +++ b/arch/arm/cpu/arm_intcm/start.S @@ -99,7 +99,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds b/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds index 69f6d48dab..b6a929ff7e 100644 --- a/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds +++ b/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds @@ -62,6 +62,6 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sdram } diff --git a/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds b/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds index 88f40698b6..efae381bdb 100644 --- a/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds +++ b/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds @@ -58,6 +58,6 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sdram } diff --git a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds index 7cd409cca2..79cc93cb57 100644 --- a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds +++ b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds @@ -46,7 +46,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sdram . = ALIGN(8); diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 30f02d3943..fa5fad1b0c 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -96,7 +96,7 @@ _image_copy_end_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S index efb5a400cf..b7259645e5 100644 --- a/arch/arm/cpu/ixp/start.S +++ b/arch/arm/cpu/ixp/start.S @@ -112,7 +112,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/ixp/u-boot.lds b/arch/arm/cpu/ixp/u-boot.lds index 5e66dd142c..8345b55032 100644 --- a/arch/arm/cpu/ixp/u-boot.lds +++ b/arch/arm/cpu/ixp/u-boot.lds @@ -74,10 +74,10 @@ SECTIONS .bss __bss_start (OVERLAY) : { *(.bss*) . = ALIGN(4); - ___bssend___ = .; + __bss_end = .; } - .bss_end ___bssend___ (OVERLAY) : { - KEEP(*(.__bss_end__)); + .bss_end __bss_end (OVERLAY) : { + KEEP(*(__bss_end)); } /DISCARD/ : { *(.dynstr*) } diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S index e71803eb2e..456a7836da 100644 --- a/arch/arm/cpu/pxa/start.S +++ b/arch/arm/cpu/pxa/start.S @@ -120,7 +120,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/s3c44b0/start.S b/arch/arm/cpu/s3c44b0/start.S index 4528c91983..c096177086 100644 --- a/arch/arm/cpu/s3c44b0/start.S +++ b/arch/arm/cpu/s3c44b0/start.S @@ -78,7 +78,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/sa1100/start.S b/arch/arm/cpu/sa1100/start.S index 3144299afe..4bf6f5fe97 100644 --- a/arch/arm/cpu/sa1100/start.S +++ b/arch/arm/cpu/sa1100/start.S @@ -88,7 +88,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs: diff --git a/arch/arm/cpu/u-boot-spl.lds b/arch/arm/cpu/u-boot-spl.lds index 8321afb959..3c0d99ca36 100644 --- a/arch/arm/cpu/u-boot-spl.lds +++ b/arch/arm/cpu/u-boot-spl.lds @@ -78,7 +78,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } /DISCARD/ : { *(.dynstr*) } @@ -89,5 +89,5 @@ SECTIONS } #if defined(CONFIG_SPL_TEXT_BASE) && defined(CONFIG_SPL_MAX_SIZE) -ASSERT(__bss_end__ < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image too big"); +ASSERT(__bss_end < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image too big"); #endif diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index d4ad3529b2..3a1083d9a9 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -88,10 +88,11 @@ SECTIONS .bss __bss_start (OVERLAY) : { *(.bss*) . = ALIGN(4); - ___bssend___ = .; + __bss_end = .; } - .bss_end ___bssend___ (OVERLAY) : { - KEEP(*(.__bss_end__)); + + .bss_end __bss_end (OVERLAY) : { + KEEP(*(__bss_end)); } /DISCARD/ : { *(.dynstr*) } @@ -102,5 +103,5 @@ SECTIONS } #if defined(CONFIG_SPL_TEXT_BASE) && defined(CONFIG_SPL_MAX_SIZE) -ASSERT(__bss_end__ < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image too big"); +ASSERT(__bss_end < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image too big"); #endif diff --git a/arch/arm/include/asm/sections.h b/arch/arm/include/asm/sections.h new file mode 100644 index 0000000000..c042cb604b --- /dev/null +++ b/arch/arm/include/asm/sections.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2012 The Chromium OS Authors. + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __ASM_ARM_SECTIONS_H +#define __ASM_ARM_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif diff --git a/arch/arm/include/asm/spl.h b/arch/arm/include/asm/spl.h index 62011aaada..2b7218edad 100644 --- a/arch/arm/include/asm/spl.h +++ b/arch/arm/include/asm/spl.h @@ -27,7 +27,7 @@ #include <asm/arch/spl.h> /* Linker symbols. */ -extern char __bss_start[], __bss_end__[]; +extern char __bss_start[], __bss_end[]; extern gd_t gdata; diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h index 9f3cae5ece..f16861ad2f 100644 --- a/arch/arm/include/asm/u-boot-arm.h +++ b/arch/arm/include/asm/u-boot-arm.h @@ -30,12 +30,8 @@ #define _U_BOOT_ARM_H_ 1 /* for the following variables, see start.S */ -extern ulong _bss_start_ofs; /* BSS start relative to _start */ -extern ulong _bss_end_ofs; /* BSS end relative to _start */ -extern ulong _end_ofs; /* end of image relative to _start */ extern ulong IRQ_STACK_START; /* top of IRQ stack */ extern ulong FIQ_STACK_START; /* top of FIQ stack */ -extern ulong _TEXT_BASE; /* code start */ extern ulong _datarel_start_ofs; extern ulong _datarelrolocal_start_ofs; extern ulong _datarellocal_start_ofs; diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h index 2ba98bca7d..a33fefa6d4 100644 --- a/arch/arm/include/asm/u-boot.h +++ b/arch/arm/include/asm/u-boot.h @@ -36,6 +36,12 @@ #ifndef _U_BOOT_H_ #define _U_BOOT_H_ 1 +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else + +#ifndef __ASSEMBLY__ typedef struct bd_info { unsigned int bi_baudrate; /* serial console baudrate */ ulong bi_arch_number; /* unique id for this board */ @@ -49,6 +55,9 @@ typedef struct bd_info { ulong size; } bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif + +#endif /* !CONFIG_SYS_GENERIC_BOARD */ /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_ARM diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 11c267451a..6ae161a51d 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -39,8 +39,11 @@ GLCOBJS += div0.o SOBJS-y += crt0.o ifndef CONFIG_SPL_BUILD -COBJS-y += bss.o +ifndef CONFIG_SYS_GENERIC_BOARD COBJS-y += board.o +endif +COBJS-y += bss.o + COBJS-y += bootm.o COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 162e2cc863..0521178ac3 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -53,6 +53,7 @@ #include <fdtdec.h> #include <post.h> #include <logbuff.h> +#include <asm/sections.h> #ifdef CONFIG_BITBANGMII #include <miiphy.h> diff --git a/arch/arm/lib/bss.c b/arch/arm/lib/bss.c index 7c0b1545ea..99eda59137 100644 --- a/arch/arm/lib/bss.c +++ b/arch/arm/lib/bss.c @@ -36,4 +36,4 @@ */ char __bss_start[0] __attribute__((used, section(".__bss_start"))); -char __bss_end__[0] __attribute__((used, section(".__bss_end__"))); +char __bss_end[0] __attribute__((used, section(".__bss_end"))); diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index 4f60958b1d..37d9927d2c 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -85,7 +85,7 @@ */ .globl __bss_start -.globl __bss_end__ +.globl __bss_end /* * entry point of crt0 sequence @@ -141,7 +141,7 @@ here: bl c_runtime_cpu_setup /* we still call old routine here */ ldr r0, =__bss_start /* this is auto-relocated! */ - ldr r1, =__bss_end__ /* this is auto-relocated! */ + ldr r1, =__bss_end /* this is auto-relocated! */ mov r2, #0x00000000 /* prepare zero to clear BSS */ diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index f568f619cb..301f082ea3 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -45,7 +45,7 @@ void __weak board_init_f(ulong dummy) asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK)); /* Clear the BSS. */ - memset(__bss_start, 0, __bss_end__ - __bss_start); + memset(__bss_start, 0, __bss_end - __bss_start); /* Set global data pointer. */ gd = &gdata; |