Skip to content

Commit

Permalink
Rename TEXT_BASE into CONFIG_SYS_TEXT_BASE
Browse files Browse the repository at this point in the history
The change is currently needed to be able to remove the board
configuration scripting from the top level Makefile and replace it by
a simple, table driven script.

Moving this configuration setting into the "CONFIG_*" name space is
also desirable because it is needed if we ever should move forward to
a Kconfig driven configuration system.

Signed-off-by: Wolfgang Denk <[email protected]>
  • Loading branch information
wdenx committed Oct 18, 2010
1 parent d24f2d3 commit 14d0a02
Show file tree
Hide file tree
Showing 797 changed files with 1,493 additions and 1,435 deletions.
102 changes: 51 additions & 51 deletions Makefile

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -2248,7 +2248,7 @@ Configuration Settings:
- CONFIG_SYS_MONITOR_BASE:
Physical start address of boot monitor code (set by
make config files to be same as the text base address
(TEXT_BASE) used when linking) - same as
(CONFIG_SYS_TEXT_BASE) used when linking) - same as
CONFIG_SYS_FLASH_BASE when booting from flash.

- CONFIG_SYS_MONITOR_LEN:
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/arm1136/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ _end_vect:

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/cpu/arm1176/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ _end_vect:

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

/*
* Below variable is very important because we use MMU in U-Boot.
Expand Down Expand Up @@ -205,7 +205,7 @@ cpu_init_crit:

/* Prepare to disable the MMU */
adr r2, mmu_disable_phys
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - TEXT_BASE)
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_SYS_TEXT_BASE)
b mmu_disable

.align 5
Expand Down Expand Up @@ -444,7 +444,7 @@ cpu_init_crit:

/* Prepare to disable the MMU */
adr r2, mmu_disable_phys
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - TEXT_BASE)
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_SYS_TEXT_BASE)
b mmu_disable

.align 5
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/cpu/arm720t/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ _fiq: .word fiq

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down Expand Up @@ -298,11 +298,11 @@ relocate: /* relocate U-Boot to RAM */
cmp r0, r1 /* don't reloc during debug */
beq stack_setup

#if TEXT_BASE
#if CONFIG_SYS_TEXT_BASE
#ifndef CONFIG_LPC2292 /* already done in lowlevel_init */
ldr r2, =0x0 /* Relocate the exception vectors */
cmp r1, r2 /* and associated data to address */
ldmneia r0!, {r3-r10} /* 0x0. Do nothing if TEXT_BASE is */
ldmneia r0!, {r3-r10} /* 0x0. Do nothing if CONFIG_SYS_TEXT_BASE is */
stmneia r2!, {r3-r10} /* 0x0. Copy the first 15 words. */
ldmneia r0, {r3-r9}
stmneia r2, {r3-r9}
Expand Down Expand Up @@ -755,7 +755,7 @@ reset_cpu:
ldr r0, [r1, #+NETARM_MEM_CS0_BASE_ADDR]
ldr r1, =0xFFFFF000
and r0, r1, r0
ldr r1, =(relocate-TEXT_BASE)
ldr r1, =(relocate-CONFIG_SYS_TEXT_BASE)
add r0, r1, r0
ldr r4, =NETARM_GEN_MODULE_BASE
ldr r1, =NETARM_GEN_SW_SVC_RESETA
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/cpu/arm920t/at91/lowlevel_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
_MTEXT_BASE:
#undef START_FROM_MEM
#ifdef START_FROM_MEM
.word TEXT_BASE-PHYS_FLASH_1
.word CONFIG_SYS_TEXT_BASE-PHYS_FLASH_1
#else
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#endif

.globl lowlevel_init
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/cpu/arm920t/at91rm9200/lowlevel_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
_MTEXT_BASE:
#undef START_FROM_MEM
#ifdef START_FROM_MEM
.word TEXT_BASE-PHYS_FLASH_1
.word CONFIG_SYS_TEXT_BASE-PHYS_FLASH_1
#else
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#endif

.globl lowlevel_init
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/arm920t/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ _fiq: .word fiq

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/arm925t/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ _fiq: .word fiq

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/cpu/arm926ejs/at91/lowlevel_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#endif

_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

.globl lowlevel_init
.type lowlevel_init,function
Expand All @@ -54,7 +54,7 @@ POS1:
ldr r0, =POS1 /* r0 = POS1 compile */
ldr r2, _TEXT_BASE
sub r0, r0, r2 /* r0 = POS1-_TEXT_BASE (POS1 relative) */
sub r5, r5, r0 /* r0 = TEXT_BASE-1 */
sub r5, r5, r0 /* r0 = CONFIG_SYS_TEXT_BASE-1 */
sub r5, r5, #4 /* r1 = text base - current */

/* memory control configuration 1 */
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/arm926ejs/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ _fiq:

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/arm946es/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ _fiq:

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/arm_intcm/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ _fiq:

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE /* address of _start in the linked image */
.word CONFIG_SYS_TEXT_BASE /* address of _start in the linked image */

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/armv7/omap3/lowlevel_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <asm/arch/clocks_omap3.h>

_TEXT_BASE:
.word TEXT_BASE /* sdram load addr from config.mk */
.word CONFIG_SYS_TEXT_BASE /* sdram load addr from config.mk */

#if !defined(CONFIG_SYS_NAND_BOOT) && !defined(CONFIG_SYS_NAND_BOOT)
/**************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/armv7/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ _end_vect:

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/ixp/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ _fiq: .word fiq

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/lh7a40x/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ _fiq: .word fiq

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/pxa/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ _fiq: .word fiq

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/s3c44b0/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _start: b reset

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/sa1100/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ _fiq: .word fiq

.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE

#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
Expand Down
4 changes: 2 additions & 2 deletions arch/i386/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ void board_init_f (ulong gdp)
re_end = (Elf32_Rel *)(rel_dyn_end + ((gd_t *)gdp)->load_off);

do {
if (re_src->r_offset >= TEXT_BASE)
if (*(Elf32_Addr *)(re_src->r_offset - rel_offset) >= TEXT_BASE)
if (re_src->r_offset >= CONFIG_SYS_TEXT_BASE)
if (*(Elf32_Addr *)(re_src->r_offset - rel_offset) >= CONFIG_SYS_TEXT_BASE)
*(Elf32_Addr *)(re_src->r_offset - rel_offset) -= rel_offset;
} while (re_src++ < re_end);

Expand Down
10 changes: 5 additions & 5 deletions arch/m68k/cpu/mcf5227x/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
rte;

#if defined(CONFIG_CF_SBF)
#define ASM_DRAMINIT (asm_dram_init - TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_DRAMINIT (asm_dram_init - CONFIG_SYS_TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - CONFIG_SYS_TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#endif

.text
Expand Down Expand Up @@ -138,7 +138,7 @@ vector192_255:
asm_sbf_img_hdr:
.long 0x00000000 /* checksum, not yet implemented */
.long 0x00020000 /* image length */
.long TEXT_BASE /* image to be relocated at */
.long CONFIG_SYS_TEXT_BASE /* image to be relocated at */

asm_dram_init:
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0
Expand Down Expand Up @@ -330,7 +330,7 @@ asm_dspi_rd_loop2:
jsr asm_dspi_rd_status

/* jump to memory and execute */
move.l #(TEXT_BASE + 0x400), %a0
move.l #(CONFIG_SYS_TEXT_BASE + 0x400), %a0
move.l %a0, (%a1)
jmp (%a0)

Expand Down Expand Up @@ -364,7 +364,7 @@ _start:

/* Set vector base register at the beginning of the Flash */
#if defined(CONFIG_CF_SBF)
move.l #TEXT_BASE, %d0
move.l #CONFIG_SYS_TEXT_BASE, %d0
movec %d0, %VBR
#else
move.l #CONFIG_SYS_FLASH_BASE, %d0
Expand Down
14 changes: 7 additions & 7 deletions arch/m68k/cpu/mcf52x2/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
_vectors:

.long 0x00000000 /* Flash offset is 0 until we setup CS0 */
#if defined(CONFIG_M5282) && (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
.long _start - TEXT_BASE
#if defined(CONFIG_M5282) && (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
.long _start - CONFIG_SYS_TEXT_BASE
#else
.long _START
#endif
Expand Down Expand Up @@ -106,7 +106,7 @@ _vectors:

#if defined(CONFIG_SYS_INT_FLASH_BASE) && \
(defined(CONFIG_M5282) || defined(CONFIG_M5281))
#if (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
#if (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
.long 0x55AA55AA,0xAA55AA55 /* CFM Backdoorkey */
.long 0xFFFFFFFF /* all sectors protected */
.long 0x00000000 /* supervisor/User restriction */
Expand Down Expand Up @@ -150,7 +150,7 @@ _start:
movec %d0, %RAMBAR1

#if defined(CONFIG_M5282)
#if (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
#if (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
/* Setup code in SRAM to initialize FLASHBAR, if start from internal Flash */

move.l #(_flashbar_setup-CONFIG_SYS_INT_FLASH_BASE), %a0
Expand All @@ -174,15 +174,15 @@ _after_flashbar_copy:
/* Setup code to initialize FLASHBAR, if start from external Memory */
move.l #(CONFIG_SYS_INT_FLASH_BASE + CONFIG_SYS_INT_FLASH_ENABLE), %d0
movec %d0, %FLASHBAR
#endif /* (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) */
#endif /* (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) */

#endif
#endif
/* if we come from a pre-loader we have no exception table and
* therefore no VBR to set
*/
#if !defined(CONFIG_MONITOR_IS_IN_RAM)
#if defined(CONFIG_M5282) && (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
#if defined(CONFIG_M5282) && (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
move.l #CONFIG_SYS_INT_FLASH_BASE, %d0
#else
move.l #CONFIG_SYS_FLASH_BASE, %d0
Expand Down Expand Up @@ -297,7 +297,7 @@ clear_bss:
/* set parameters for board_init_r */
move.l %a0,-(%sp) /* dest_addr */
move.l %d0,-(%sp) /* gd */
#if defined(DEBUG) && (TEXT_BASE != CONFIG_SYS_INT_FLASH_BASE) && \
#if defined(DEBUG) && (CONFIG_SYS_TEXT_BASE != CONFIG_SYS_INT_FLASH_BASE) && \
defined(CONFIG_SYS_HALT_BEFOR_RAM_JUMP)
halt
#endif
Expand Down
8 changes: 4 additions & 4 deletions arch/m68k/cpu/mcf5445x/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
rte;

#if defined(CONFIG_CF_SBF)
#define ASM_DRAMINIT (asm_dram_init - TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_DRAMINIT (asm_dram_init - CONFIG_SYS_TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - CONFIG_SYS_TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#endif

.text
Expand Down Expand Up @@ -143,7 +143,7 @@ vector192_255:
asm_sbf_img_hdr:
.long 0x00000000 /* checksum, not yet implemented */
.long 0x00030000 /* image length */
.long TEXT_BASE /* image to be relocated at */
.long CONFIG_SYS_TEXT_BASE /* image to be relocated at */

asm_dram_init:
move.w #0x2700,%sr /* Mask off Interrupt */
Expand Down Expand Up @@ -358,7 +358,7 @@ asm_dspi_rd_loop2:
jsr asm_dspi_rd_status

/* jump to memory and execute */
move.l #(TEXT_BASE + 0x400), %a0
move.l #(CONFIG_SYS_TEXT_BASE + 0x400), %a0
jmp (%a0)

asm_dspi_wr_status:
Expand Down
4 changes: 2 additions & 2 deletions arch/microblaze/cpu/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ _start:
shi r7, r0, 0x2
shi r6, r0, 0x6
/*
* Copy U-Boot code to TEXT_BASE
* Copy U-Boot code to CONFIG_SYS_TEXT_BASE
* solve problem with sbrk_base
*/
#if (CONFIG_SYS_RESET_ADDRESS != TEXT_BASE)
#if (CONFIG_SYS_RESET_ADDRESS != CONFIG_SYS_TEXT_BASE)
addi r4, r0, __end
addi r5, r0, __text_start
rsub r4, r5, r4 /* size = __end - __text_start */
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void board_init (void)
puts ("SDRAM :\n");
printf ("\t\tIcache:%s\n", icache_status() ? "ON" : "OFF");
printf ("\t\tDcache:%s\n", dcache_status() ? "ON" : "OFF");
printf ("\tU-Boot Start:0x%08x\n", TEXT_BASE);
printf ("\tU-Boot Start:0x%08x\n", CONFIG_SYS_TEXT_BASE);

#if defined(CONFIG_CMD_FLASH)
puts ("FLASH: ");
Expand Down
Loading

0 comments on commit 14d0a02

Please sign in to comment.