diff options
Diffstat (limited to 'bsps/m68k')
21 files changed, 20 insertions, 118 deletions
diff --git a/bsps/m68k/gen68340/start/linkcmds b/bsps/m68k/gen68340/start/linkcmds index 99eeb3bf70..3621474fe8 100644 --- a/bsps/m68k/gen68340/start/linkcmds +++ b/bsps/m68k/gen68340/start/linkcmds @@ -21,7 +21,6 @@ RamBase = DEFINED(RamBase) ? RamBase : 0x10000000; RamSize = DEFINED(RamSize) ? RamSize : 4M; HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; /* * Declare on-board memory. @@ -186,10 +185,6 @@ SECTIONS { *(COMMON) . = ALIGN (16); PROVIDE (end = .); - - . += _StackSize; - . = ALIGN (16); - _stack_init = .; _clear_end = .; } >ram diff --git a/bsps/m68k/gen68340/start/start.S b/bsps/m68k/gen68340/start/start.S index 794c6d75b6..85b9aa86fa 100644 --- a/bsps/m68k/gen68340/start/start.S +++ b/bsps/m68k/gen68340/start/start.S @@ -850,7 +850,7 @@ ZEROLOOPTEST: cmpl a1,a0 | Done? bcs.s ZEROLOOP | No, skip - movel #_stack_init,a7 | set master stack pointer + movel #_Configuration_Interrupt_stack_area_end,a7 | set master stack pointer movel d0,a7@- | command line jsr SYM(boot_card) | Call C main diff --git a/bsps/m68k/gen68360/start/linkcmds b/bsps/m68k/gen68360/start/linkcmds index f3d6712988..f2858137d7 100644 --- a/bsps/m68k/gen68360/start/linkcmds +++ b/bsps/m68k/gen68360/start/linkcmds @@ -16,7 +16,6 @@ RamBase = DEFINED(RamBase) ? RamBase : 0x0; RamSize = DEFINED(RamSize) ? RamSize : 64M; HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; /* * Declare on-board memory. @@ -150,10 +149,6 @@ SECTIONS { *(COMMON) . = ALIGN (16); PROVIDE (end = .); - - . += _StackSize; - . = ALIGN (16); - _stack_init = .; _clear_end = .; } >ram diff --git a/bsps/m68k/gen68360/start/linkcmds.bootp b/bsps/m68k/gen68360/start/linkcmds.bootp index b97c66f3a1..a05573cb2c 100644 --- a/bsps/m68k/gen68360/start/linkcmds.bootp +++ b/bsps/m68k/gen68360/start/linkcmds.bootp @@ -20,7 +20,6 @@ RamBase = DEFINED(RamBase) ? RamBase : 0x0; RamSize = DEFINED(RamSize) ? RamSize : 64M; HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; /* * Declare on-board memory. @@ -152,10 +151,6 @@ SECTIONS { *(COMMON) . = ALIGN (16); PROVIDE (end = .); - - . += _StackSize; - . = ALIGN (16); - _stack_init = .; _clear_end = .; } >myram diff --git a/bsps/m68k/gen68360/start/linkcmds.prom b/bsps/m68k/gen68360/start/linkcmds.prom index 6513ccd544..0e68300de7 100644 --- a/bsps/m68k/gen68360/start/linkcmds.prom +++ b/bsps/m68k/gen68360/start/linkcmds.prom @@ -20,7 +20,6 @@ RamBase = DEFINED(RamBase) ? RamBase : 0x0; RamSize = DEFINED(RamSize) ? RamSize : 64M; HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; /* * Declare on-board memory. @@ -150,10 +149,6 @@ SECTIONS { *(COMMON) . = ALIGN (16); PROVIDE (end = .); - - . += _StackSize; - . = ALIGN (16); - _stack_init = .; _clear_end = .; } >ram diff --git a/bsps/m68k/gen68360/start/start.S b/bsps/m68k/gen68360/start/start.S index 8511960e16..7549f08af8 100644 --- a/bsps/m68k/gen68360/start/start.S +++ b/bsps/m68k/gen68360/start/start.S @@ -390,7 +390,7 @@ ZEROLOOPTEST: cmpl a1,a0 | Done? bcs.s ZEROLOOP | No, skip - movel #_stack_init,a7 | set master stack pointer + movel #_Configuration_Interrupt_stack_area_end,a7 | set master stack pointer movel d0,a7@- | command line jsr boot_card | Call C main diff --git a/bsps/m68k/genmcf548x/start/linkcmds.COBRA5475 b/bsps/m68k/genmcf548x/start/linkcmds.COBRA5475 index 52bca8d018..1e817d01ee 100644 --- a/bsps/m68k/genmcf548x/start/linkcmds.COBRA5475 +++ b/bsps/m68k/genmcf548x/start/linkcmds.COBRA5475 @@ -62,8 +62,6 @@ _CoreSramSize1 = DEFINED(_CoreSramSize1) ? _CoreSramSize1 : (4 * 1024); _BootFlashBase = DEFINED(_BootFlashBase) ? _BootFlashBase : 0xFC000000; _BootFlashSize = DEFINED(_BootFlashSize) ? _BootFlashSize : (32 * 1024*1024); -bsp_initstack_size = DEFINED(StackSize) ? StackSize : 0x800; /* 2 kB */ - _VBR = DEFINED(_VBR) ? _VBR : _SdramBase; __MBAR = DEFINED(__MBAR) ? __MBAR : 0xFE000000; diff --git a/bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine b/bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine index be746af7ff..ee873c4681 100644 --- a/bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine +++ b/bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine @@ -63,8 +63,6 @@ _BootFlashSize = DEFINED(_BootFlashSize) ? _BootFlashSize : (2 * 1024*1024); _CodeFlashBase = DEFINED(_CodeFlashBase) ? _CodeFlashBase : 0xE0000000; _CodeFlashSize = DEFINED(_CodeFlashSize) ? _CodeFlashSize : (16 * 1024*1024); -bsp_initstack_size = DEFINED(StackSize) ? StackSize : 0x800; /* 2 kB */ - _VBR = DEFINED(_VBR) ? _VBR : _SdramBase; __MBAR = DEFINED(__MBAR) ? __MBAR : 0x10000000; diff --git a/bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine.flash b/bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine.flash index 4db960f111..30df1e4bd7 100644 --- a/bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine.flash +++ b/bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine.flash @@ -63,8 +63,6 @@ _BootFlashSize = DEFINED(_BootFlashSize) ? _BootFlashSize : (2 * 1024 * 1024); _CodeFlashBase = DEFINED(_CodeFlashBase) ? _CodeFlashBase : 0xE0000000; _CodeFlashSize = DEFINED(_CodeFlashSize) ? _CodeFlashSize : (16 * 1024 * 1024); -bsp_initstack_size = DEFINED(StackSize) ? StackSize : 0x800; /* 2 kB */ - _VBR = DEFINED(_VBR) ? _VBR : _SdramBase; __MBAR = DEFINED(__MBAR) ? __MBAR : 0x10000000; diff --git a/bsps/m68k/genmcf548x/start/start.S b/bsps/m68k/genmcf548x/start/start.S index d4d1d9b273..1bc09a0118 100644 --- a/bsps/m68k/genmcf548x/start/start.S +++ b/bsps/m68k/genmcf548x/start/start.S @@ -75,7 +75,7 @@ .section ".vectors","ax" /* begin of vectors section */ PUBLIC (InterruptVectorTable) SYM(InterruptVectorTable): -INITSP: .long bsp_initstack_end /* Initial SP */ +INITSP: .long _Configuration_Interrupt_stack_area_end /* Initial SP */ INITPC: .long start /* Initial PC */ vector002: .long asm_default_interrupt /* Access Error */ vector003: .long asm_default_interrupt /* Address Error */ @@ -411,7 +411,7 @@ SYM(start_init): jsr mcf548x_init /* Initialize mcf548x peripherals */ - move.l #bsp_initstack_end,sp /* relocate sp */ + move.l #_Configuration_Interrupt_stack_area_end,sp /* relocate sp */ clrl d0 /* clear d0 */ movel d0,a7@- /* command line == 0 */ diff --git a/bsps/m68k/mcf52235/start/linkcmds b/bsps/m68k/mcf52235/start/linkcmds index 3e912a210f..0c4d15fe08 100644 --- a/bsps/m68k/mcf52235/start/linkcmds +++ b/bsps/m68k/mcf52235/start/linkcmds @@ -16,7 +16,6 @@ RamBase = DEFINED(RamBase) ? RamBase : 0x20000000; RamSize = DEFINED(RamSize) ? RamSize : 32K; HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x400; _FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000; _VBR = 0x20000000; @@ -171,16 +170,6 @@ SECTIONS PROVIDE (_clear_end = .); } >sram - .stack : - { - /* - * Starting Stack - */ - . += _StackSize; - . = ALIGN (16); - PROVIDE(_StackInit = .); - } >sram - .rtemsstack (NOLOAD) : { *(SORT(.rtemsstack.*)) PROVIDE(WorkAreaBase = .); diff --git a/bsps/m68k/mcf52235/start/start.S b/bsps/m68k/mcf52235/start/start.S index e1d837cab5..ecb2c5c980 100644 --- a/bsps/m68k/mcf52235/start/start.S +++ b/bsps/m68k/mcf52235/start/start.S @@ -16,14 +16,12 @@ #include <rtems/asm.h> -.extern _StackInit - BEGIN_CODE PUBLIC (_INTERRUPT_VECTOR) SYM(_INTERRUPT_VECTOR): - .long _StackInit /* 00 Initial 'SSP' */ + .long _Configuration_Interrupt_stack_area_end /* 00 Initial 'SSP' */ .long SYM(start) /* 01 Initial PC */ .long SYM(_uhoh) /* 02 Access Error */ .long SYM(_uhoh) /* 03 Address Error */ @@ -357,7 +355,7 @@ SYM(start): movec d0, %rambar /* Locate Stack Pointer */ - move.l #_StackInit, sp + move.l #_Configuration_Interrupt_stack_area_end, sp /* Initialize FLASHBAR */ move.l #_FlashBase, d0 @@ -369,7 +367,7 @@ SYM(start): _continue_startup: /* Locate Stack Pointer */ - move.l #_StackInit, sp + move.l #_Configuration_Interrupt_stack_area_end, sp /* Save off intial D0 and D1 to RAM */ move.l d6, SYM(_d0_reset) diff --git a/bsps/m68k/mcf5225x/start/linkcmds b/bsps/m68k/mcf5225x/start/linkcmds index a2ad1ec047..563aede8eb 100644 --- a/bsps/m68k/mcf5225x/start/linkcmds +++ b/bsps/m68k/mcf5225x/start/linkcmds @@ -16,7 +16,6 @@ RamBase = DEFINED(RamBase) ? RamBase : 0x20000000; RamSize = DEFINED(RamSize) ? RamSize : 64K; HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x400; _FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000; _VBR = 0x20000000; @@ -171,16 +170,6 @@ SECTIONS PROVIDE (_clear_end = .); } >sram - .stack : - { - /* - * Starting Stack - */ - . += _StackSize; - . = ALIGN (16); - PROVIDE(_StackInit = .); - } >sram - .rtemsstack (NOLOAD) : { *(SORT(.rtemsstack.*)) PROVIDE(WorkAreaBase = .); diff --git a/bsps/m68k/mcf5225x/start/start.S b/bsps/m68k/mcf5225x/start/start.S index abc7bb99cc..19d9038431 100644 --- a/bsps/m68k/mcf5225x/start/start.S +++ b/bsps/m68k/mcf5225x/start/start.S @@ -16,14 +16,12 @@ #include <rtems/asm.h> -.extern _StackInit - BEGIN_CODE PUBLIC (_INTERRUPT_VECTOR) SYM(_INTERRUPT_VECTOR): - .long _StackInit /* 00 Initial 'SSP' */ + .long _Configuration_Interrupt_stack_area_end /* 00 Initial 'SSP' */ .long SYM(start) /* 01 Initial PC */ .long SYM(_uhoh) /* 02 Access Error */ .long SYM(_uhoh) /* 03 Address Error */ @@ -361,7 +359,7 @@ SYM(start): movec d7, %rambar /* Locate Stack Pointer */ - move.l #_StackInit, sp + move.l #_Configuration_Interrupt_stack_area_end, sp /* Initialize FLASHBAR */ move.l #_FlashBase, d7 @@ -373,7 +371,7 @@ SYM(start): _continue_startup: /* Locate Stack Pointer */ -// move.l #_StackInit, sp //is done automatically by the CPU +// move.l #_Configuration_Interrupt_stack_area_end, sp //is done automatically by the CPU /* * Remainder of the startup code is handled by C code diff --git a/bsps/m68k/mcf5329/start/linkcmds b/bsps/m68k/mcf5329/start/linkcmds index bed8dfe0fe..78fc50c22a 100644 --- a/bsps/m68k/mcf5329/start/linkcmds +++ b/bsps/m68k/mcf5329/start/linkcmds @@ -23,7 +23,6 @@ _BootFlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000; _BootFlashSize = DEFINED(_FlashBase) ? _FlashBase : 2M; HeapSize = DEFINED(HeapSize) ? HeapSize : 0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x400; _VBR = 0x40000000; @@ -178,23 +177,12 @@ SECTIONS *(COMMON) . = ALIGN (16); PROVIDE (_end = .); - _clear_end = .; + WorkAreaBase = .; } > dram .rtemsstack (NOLOAD) : { *(SORT(.rtemsstack.*)) - WorkAreaBase = .; - } > dram - - .start_stack : - { - /* - * Starting Stack - */ - . += _StackSize; - . = ALIGN (16); - PROVIDE(_StackInit = .); } > core_sram /* Stabs debugging sections. */ diff --git a/bsps/m68k/mcf5329/start/linkcmdsflash b/bsps/m68k/mcf5329/start/linkcmdsflash index 88a6f96ff0..adfb3bacfb 100644 --- a/bsps/m68k/mcf5329/start/linkcmdsflash +++ b/bsps/m68k/mcf5329/start/linkcmdsflash @@ -23,7 +23,6 @@ _BootFlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000; _BootFlashSize = DEFINED(_FlashBase) ? _FlashBase : 2M; HeapSize = DEFINED(HeapSize) ? HeapSize : 0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x400; _VBR = 0x40000000; @@ -174,23 +173,12 @@ SECTIONS *(COMMON) . = ALIGN (16); PROVIDE (_end = .); - _clear_end = .; + WorkAreaBase = .; } > dram .rtemsstack (NOLOAD) : { *(SORT(.rtemsstack.*)) - WorkAreaBase = .; - } > dram - - .start_stack : - { - /* - * Starting Stack - */ - . += _StackSize; - . = ALIGN (16); - PROVIDE(_StackInit = .); } > core_sram /* Stabs debugging sections. */ diff --git a/bsps/m68k/mcf5329/start/start.S b/bsps/m68k/mcf5329/start/start.S index 6063fdac74..659c617272 100644 --- a/bsps/m68k/mcf5329/start/start.S +++ b/bsps/m68k/mcf5329/start/start.S @@ -16,14 +16,12 @@ #include <rtems/asm.h> -.extern _StackInit - BEGIN_CODE PUBLIC (_INTERRUPT_VECTOR) SYM(_INTERRUPT_VECTOR): - .long _StackInit /* 00 Initial 'SSP' */ + .long _Configuration_Interrupt_stack_area_end /* 00 Initial 'SSP' */ .long SYM(start) /* 01 Initial PC */ .long SYM(_uhoh) /* 02 Access Error */ .long SYM(_uhoh) /* 03 Address Error */ @@ -346,7 +344,7 @@ SYM(start): move.l d7, SYM(_d1_reset) /* Locate Stack Pointer */ - move.l #_StackInit,sp + move.l #_Configuration_Interrupt_stack_area_end,sp /* * Remainder of the startup code is handled by C code diff --git a/bsps/m68k/mrm332/start/linkcmds b/bsps/m68k/mrm332/start/linkcmds index f86e80dd02..125538c50c 100644 --- a/bsps/m68k/mrm332/start/linkcmds +++ b/bsps/m68k/mrm332/start/linkcmds @@ -32,7 +32,6 @@ __DYNAMIC = 0; * | heap space | * | _ENDHEAP | * | stack space | - * | __stack | top of stack * +--------------------+ <- high memory */ @@ -52,7 +51,6 @@ MEMORY _copy_data_from_rom = 1; HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; -_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000; /* @@ -194,9 +192,6 @@ SECTIONS *(COMMON) . = ALIGN (16); PROVIDE (end = .); - . += _StackSize; - . = ALIGN (16); - _stack_init = .; _clear_end = .; } > ram .rtemsstack (NOLOAD) : { diff --git a/bsps/m68k/mrm332/start/start.S b/bsps/m68k/mrm332/start/start.S index 5e2bbebc8e..300b74fc78 100644 --- a/bsps/m68k/mrm332/start/start.S +++ b/bsps/m68k/mrm332/start/start.S @@ -37,10 +37,10 @@ BEGIN_CODE movel #0x0,d0 /* Use the initial vectors until we get going */ movecl d0,vbr - movel #end, d0 /* Next 3 instructions set stack pointer */ - addl #_StackSize,d0 /* sp = end + _StackSize from linker script */ - movel d0,sp - movel d0,a6 + /* Set stack pointer */ + movel #_Configuration_Interrupt_stack_area_end,d0 + movel d0,sp + movel d0,a6 /* include in ram_init.S */ /* diff --git a/bsps/m68k/shared/start/linkcmds.base b/bsps/m68k/shared/start/linkcmds.base index ee1d6ea4e2..fc726b4419 100644 --- a/bsps/m68k/shared/start/linkcmds.base +++ b/bsps/m68k/shared/start/linkcmds.base @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008-2013 embedded brains GmbH. All rights reserved. + * Copyright (c) 2008, 2018 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -19,8 +19,6 @@ OUTPUT_ARCH(m68k) ENTRY(start) STARTUP(start.o) -bsp_initstack_size = DEFINED (bsp_initstack_size) ? bsp_initstack_size : 2048; - MEMORY { UNEXPECTED_SECTIONS : ORIGIN = 0xffffffff, LENGTH = 0 } @@ -226,12 +224,6 @@ SECTIONS { } > REGION_DATA AT > REGION_DATA bsp_vector1_size = bsp_vector1_end - bsp_vector1_begin; - .initstack : ALIGN_WITH_INPUT { - bsp_initstack_begin = .; - . = . + bsp_initstack_size; - bsp_initstack_end = .; - } > REGION_DATA AT > REGION_DATA - .data : ALIGN_WITH_INPUT { bsp_section_data_begin = .; *(.data .data.* .gnu.linkonce.d.*) diff --git a/bsps/m68k/shared/start/start.S b/bsps/m68k/shared/start/start.S index b3a3c8b664..9c40cbc3da 100644 --- a/bsps/m68k/shared/start/start.S +++ b/bsps/m68k/shared/start/start.S @@ -74,7 +74,7 @@ loop: movel #0,a1@+ | to zero out uninitialized cmpal a0,a1 jlt loop | loop until _end reached - movel # SYM (_stack_init),d0 | d0 = stop of stack + movel # SYM (_Configuration_Interrupt_stack_area_end),d0 | d0 = stop of stack movw #0x3700,sr | SUPV MODE,INTERRUPTS OFF!!! movel d0,a7 | set master stack pointer movel d0,a6 | set base pointer @@ -135,13 +135,6 @@ SYM (initial_usp): SYM (initial_sr): .space 2 - .align 16 - PUBLIC (starting_stack) -SYM (starting_stack): - .space 0x1000 - PUBLIC (_stack_init) -SYM (_stack_init): - END_DATA #endif END |