summaryrefslogtreecommitdiffstats
path: root/bsps/m68k
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-19 09:09:51 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-27 08:58:16 +0200
commit511dc4b2bee78ce0714e83838644429a29d325b1 (patch)
tree228b552c0917f74c29a298ff2e4df488368914f1 /bsps/m68k
parentbsps: Support .rtemsstack.* linker input sections (diff)
downloadrtems-511dc4b2bee78ce0714e83838644429a29d325b1.tar.bz2
Rework initialization and interrupt stack support
Statically initialize the interrupt stack area (_Configuration_Interrupt_stack_area_begin, _Configuration_Interrupt_stack_area_end, and _Configuration_Interrupt_stack_size) via <rtems/confdefs.h>. Place the interrupt stack area in a special section ".rtemsstack.interrupt". Let BSPs define the optimal placement of this section in their linker command files (e.g. in a fast on-chip memory). This change makes makes the CPU_HAS_SOFTWARE_INTERRUPT_STACK and CPU_HAS_HARDWARE_INTERRUPT_STACK CPU port defines superfluous, since the low level initialization code has all information available via global symbols. This change makes the CPU_ALLOCATE_INTERRUPT_STACK CPU port define superfluous, since the interrupt stacks are allocated by confdefs.h for all architectures. There is no need for BSP-specific linker command file magic (except the section placement), see previous ARM linker command file as a bad example. Remove _CPU_Install_interrupt_stack(). Initialize the hardware interrupt stack in _CPU_Initialize() if necessary (e.g. m68k_install_interrupt_stack()). The optional _CPU_Interrupt_stack_setup() is still useful to customize the registration of the interrupt stack area in the per-CPU information. The initialization stack can reuse the interrupt stack, since * interrupts are disabled during the sequential system initialization, and * the boot_card() function does not return. This stack resuse saves memory. Changes per architecture: arm: * Mostly replace the linker symbol based configuration of stacks with the standard <rtems/confdefs.h> configuration via CONFIGURE_INTERRUPT_STACK_SIZE. The size of the FIQ, ABT and UND mode stack is still defined via linker symbols. These modes are rarely used in applications and the default values provided by the BSP should be sufficient in most cases. * Remove the bsp_processor_count linker symbol hack used for the SMP support. This is possible since the interrupt stack area is now allocated by the linker and not allocated from the heap. This makes some configure.ac stuff obsolete. Remove the now superfluous BSP variants altcycv_devkit_smp and realview_pbx_a9_qemu_smp. bfin: * Remove unused magic linker command file allocation of initialization stack. Maybe a previous linker command file copy and paste problem? In the start.S the initialization stack is set to a hard coded value. lm32, m32c, mips, nios2, riscv, sh, v850: * Remove magic linker command file allocation of initialization stack. Reuse interrupt stack for initialization stack. m68k: * Remove magic linker command file allocation of initialization stack. Reuse interrupt stack for initialization stack. powerpc: * Remove magic linker command file allocation of initialization stack. Reuse interrupt stack for initialization stack. * Used dedicated memory region (REGION_RTEMSSTACK) for the interrupt stack on BSPs using the shared linkcmds.base (replacement for REGION_RWEXTRA). sparc: * Remove the hard coded initialization stack. Use the interrupt stack for the initialization stack on the boot processor. This saves 16KiB of RAM. Update #3459.
Diffstat (limited to 'bsps/m68k')
-rw-r--r--bsps/m68k/gen68340/start/linkcmds5
-rw-r--r--bsps/m68k/gen68340/start/start.S2
-rw-r--r--bsps/m68k/gen68360/start/linkcmds5
-rw-r--r--bsps/m68k/gen68360/start/linkcmds.bootp5
-rw-r--r--bsps/m68k/gen68360/start/linkcmds.prom5
-rw-r--r--bsps/m68k/gen68360/start/start.S2
-rw-r--r--bsps/m68k/genmcf548x/start/linkcmds.COBRA54752
-rw-r--r--bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine2
-rw-r--r--bsps/m68k/genmcf548x/start/linkcmds.m5484FireEngine.flash2
-rw-r--r--bsps/m68k/genmcf548x/start/start.S4
-rw-r--r--bsps/m68k/mcf52235/start/linkcmds11
-rw-r--r--bsps/m68k/mcf52235/start/start.S8
-rw-r--r--bsps/m68k/mcf5225x/start/linkcmds11
-rw-r--r--bsps/m68k/mcf5225x/start/start.S8
-rw-r--r--bsps/m68k/mcf5329/start/linkcmds14
-rw-r--r--bsps/m68k/mcf5329/start/linkcmdsflash14
-rw-r--r--bsps/m68k/mcf5329/start/start.S6
-rw-r--r--bsps/m68k/mrm332/start/linkcmds5
-rw-r--r--bsps/m68k/mrm332/start/start.S8
-rw-r--r--bsps/m68k/shared/start/linkcmds.base10
-rw-r--r--bsps/m68k/shared/start/start.S9
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