summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sh
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-20 10:19:28 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-20 13:08:36 +0200
commitfbcd7c8fa65eb695e96a62ea1c1ac7a024fa9dfc (patch)
treea17e285cf22cd49cd42e8b3ad562febc3987d566 /c/src/lib/libbsp/sh
parentbsps: Move console drivers to bsps (diff)
downloadrtems-fbcd7c8fa65eb695e96a62ea1c1ac7a024fa9dfc.tar.bz2
bsps: Move start files to bsps
This patch is a part of the BSP source reorganization. Update #3285.
Diffstat (limited to 'c/src/lib/libbsp/sh')
-rw-r--r--c/src/lib/libbsp/sh/gensh1/Makefile.am2
-rw-r--r--c/src/lib/libbsp/sh/gensh1/start/start.S90
-rw-r--r--c/src/lib/libbsp/sh/gensh2/Makefile.am2
-rw-r--r--c/src/lib/libbsp/sh/gensh2/start/start.S192
-rw-r--r--c/src/lib/libbsp/sh/gensh2/start/start.ram196
-rw-r--r--c/src/lib/libbsp/sh/gensh2/start/start.rom91
-rw-r--r--c/src/lib/libbsp/sh/gensh4/Makefile.am2
-rw-r--r--c/src/lib/libbsp/sh/gensh4/start/start.S278
-rw-r--r--c/src/lib/libbsp/sh/shsim/Makefile.am2
-rw-r--r--c/src/lib/libbsp/sh/shsim/start/start.S94
10 files changed, 4 insertions, 945 deletions
diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.am b/c/src/lib/libbsp/sh/gensh1/Makefile.am
index f128180cbb..11a14693a0 100644
--- a/c/src/lib/libbsp/sh/gensh1/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/Makefile.am
@@ -7,7 +7,7 @@ dist_project_lib_DATA = startup/bsp_specs
-start.$(OBJEXT): start/start.S
+start.$(OBJEXT): ../../../../../../bsps/sh/gensh1/start/start.S
$(CPPASCOMPILE) -o $@ -c $<
project_lib_DATA = start.$(OBJEXT)
diff --git a/c/src/lib/libbsp/sh/gensh1/start/start.S b/c/src/lib/libbsp/sh/gensh1/start/start.S
deleted file mode 100644
index 66b1c4e091..0000000000
--- a/c/src/lib/libbsp/sh/gensh1/start/start.S
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * 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.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems/asm.h>
-
- BEGIN_CODE
- PUBLIC(start)
-SYM (start):
- ! install the stack pointer
- mov.l stack_k,r15
-
- ! zero out bss
- mov.l edata_k,r0
- mov.l end_k,r1
- mov #0,r2
-0:
- mov.l r2,@r0
- add #4,r0
- cmp/ge r0,r1
- bt 0b
-
- ! copy the vector table from rom to ram
- mov.l vects_k,r0 ! vectab
- mov #0,r1 ! address of boot vector table
- mov #0,r2 ! number of bytes copied
- mov.w vects_size,r3 ! size of entries in vectab
-1:
- mov.l @r1+,r4
- mov.l r4,@r0
- add #4,r0
- add #1,r2
- cmp/hi r3,r2
- bf 1b
-
- mov.l vects_k,r0 ! update vbr to point to vectab
- ldc r0,vbr
-
- ! call the mainline
- mov #0,r4 ! command line
- mov.l main_k,r0
- jsr @r0
-
- ! call exit
- mov r0,r4
- mov.l exit_k,r0
- jsr @r0
- or r0,r0
-
- END_CODE
-
- .align 2
-stack_k:
- .long SYM(stack)
-edata_k:
- .long SYM(edata)
-end_k:
- .long SYM(end)
-main_k:
- .long SYM(boot_card)
-exit_k:
- .long SYM(exit)
-
-vects_k:
- .long SYM(vectab)
-vects_size:
- .word 255
-
-#ifdef __ELF__
- .section .stack,"aw"
-#else
- .section .stack
-#endif
-SYM(stack):
- .long 0xdeaddead
diff --git a/c/src/lib/libbsp/sh/gensh2/Makefile.am b/c/src/lib/libbsp/sh/gensh2/Makefile.am
index 9a67271b6d..bcac43ec8a 100644
--- a/c/src/lib/libbsp/sh/gensh2/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/Makefile.am
@@ -7,7 +7,7 @@ dist_project_lib_DATA = startup/bsp_specs
-start.$(OBJEXT): start/start.S
+start.$(OBJEXT): ../../../../../../bsps/sh/gensh2/start/start.S
$(CPPASCOMPILE) -o $@ -c $<
project_lib_DATA = start.$(OBJEXT)
diff --git a/c/src/lib/libbsp/sh/gensh2/start/start.S b/c/src/lib/libbsp/sh/gensh2/start/start.S
deleted file mode 100644
index cba17af740..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/start/start.S
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * 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.
- *
- * Modified to reflect Hitachi EDK SH7045F:
- * John M. Mills (jmills@tga.com)
- * TGA Technologies, Inc.
- * 100 Pinnacle Way, Suite 140
- * Norcross, GA 30071 U.S.A.
- *
- *
- * This modified file may be copied and distributed in accordance
- * the above-referenced license. It is provided for critique and
- * developmental purposes without any warranty nor representation
- * by the authors or by TGA Technologies.
- *
- * COPYRIGHT (c) 1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems/asm.h>
-
- BEGIN_CODE
- PUBLIC(start)
-
-SYM (start):
- ! install the stack pointer
- mov.l stack_k,r15
-
-#ifdef START_HW_INIT /* from $RTEMS_BSP.cfg */
- ! Initialize minimal hardware
- mov.l hw_init_k, r0
- jsr @r0
- nop !dead slot
-#endif /* START_HW_INIT */
-
- ! zero out bss
- mov.l edata_k,r0
- mov.l end_k,r1
- mov #0,r2
-0:
- mov.l r2,@r0
- add #4,r0
- cmp/ge r0,r1
- bt 0b
-
- ! copy the vector table from rom to ram
- mov.l vects_k,r0 ! vectab
- mov #0,r1 ! address of boot vector table
- mov #0,r2 ! number of bytes copied
- mov.w vects_size,r3 ! size of entries in vectab
-1:
- mov.l @r1+,r4
- mov.l r4,@r0
- add #4,r0
- add #1,r2
- cmp/hi r3,r2
- bf 1b
-
-#ifndef STANDALONE_EVB
- ! overlay monitor vectors onto RTEMS table template
- ! code adapted from Hitachi EDK7045F User Manual: "Copyvect.s"
- mova vects_k,r0
- mov.l @r0, r1 ! Shadow vect tbl addr
- stc vbr, r2 ! Original vect tbl addr
- and #0, r0
- mov r0, r4 ! 0 in r4 and r0
-
-!trapa #32
- or #0x80, r0
- mov.l @(r0,r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!cpu addr err
- or #0x24, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!ill slot
- or #0x18, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!ill inst
- or #0x10, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!nmi
- or #0x2c, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!User brk
- or #0x30, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!sci0 err
- or #0x80, r0
- rotl r0
- rotl r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-!sci rx
- or #0x81, r0
- rotl r0
- rotl r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
-
- stc vbr,r3 ! capture copy of monitor vbr
- mov.l vbrtemp_k,r0
- mov.l r3, @r0
- mov.l vects_k,r0 ! point vbr to vectab
- ldc r0,vbr
-#endif /* ! STANDALONE_EVB */
-
- ! call the mainline
- mov #0,r4 ! command line
- mov.l main_k,r0
- jsr @r0
- nop
-
- ! call exit
- mov r0,r4
- mov.l exit_k,r0
- jsr @r0
- or r0,r0
-
- mov.l vbrtemp_k,r0 ! restore original vbr
- mov.l @r0,r3
- ldc r3, vbr
- trapa #13 ! UBR capture by monitor
- nop !debug dead-slot target
-
- END_CODE
-
- .align 2
-stack_k:
- .long SYM(stack)
-edata_k:
- .long SYM(edata)
-end_k:
- .long SYM(end)
-main_k:
- .long SYM(boot_card)
-exit_k:
- .long SYM(exit)
-#ifdef START_HW_INIT /* from $RTEMS_BSP.cfg */
-hw_init_k:
- .long SYM(early_hw_init)
-#endif /* START_HW_INIT */
-vbrtemp_k:
- .long SYM(vbrtemp)
-vects_k:
- .long SYM(vectab)
-vects_size:
- .word 255
-
-#ifdef __ELF__
- .section .stack,"aw"
-#else
- .section .stack
-#endif
-SYM(stack):
- .long 0xdeaddead
-
-#ifdef __ELF__
- .section .bss,"aw"
-#else
- .section .bss
-#endif
-SYM(vbrtemp):
- .long 0x0
diff --git a/c/src/lib/libbsp/sh/gensh2/start/start.ram b/c/src/lib/libbsp/sh/gensh2/start/start.ram
deleted file mode 100644
index 04e68238a6..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/start/start.ram
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * 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.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- *
- * Modified to reflect Hitachi EDK SH7045F:
- * John M. Mills (jmills@tga.com)
- * TGA Technologies, Inc.
- * 100 Pinnacle Way, Suite 140
- * Norcross, GA 30071 U.S.A.
- *
- *
- * This modified file may be copied and distributed in accordance
- * the above-referenced license. It is provided for critique and
- * developmental purposes without any warranty nor representation
- * by the authors or by TGA Technologies.
- */
-
-#include "asm.h"
-
- BEGIN_CODE
- PUBLIC(start)
-
-SYM (start):
- ! install the stack pointer
- mov.l stack_k,r15
-
-#ifdef START_HW_INIT /* from $RTEMS_BSP.cfg */
- ! Initialize minimal hardware
- mov.l hw_init_k, r0
- jsr @r0
- nop !debug dead-slot target
-#endif /* START_HW_INIT */
-
- ! zero out bss
- mov.l edata_k,r0
- mov.l end_k,r1
- mov #0,r2
-0:
- mov.l r2,@r0
- add #4,r0
- cmp/ge r0,r1
- bt 0b
- nop !debug dead-slot target
-
- ! copy the vector table from rom to ram
- mov.l vects_k,r0 ! vectab
- mov #0,r1 ! address of boot vector table
- mov #0,r2 ! number of bytes copied
- mov.w vects_size,r3 ! size of entries in vectab
-1:
- mov.l @r1+,r4
- mov.l r4,@r0
- add #4,r0
- add #1,r2
- cmp/hi r3,r2
- bf 1b
- nop !debug dead-slot target
-
- ! overlay monitor vectors onto RTEMS table template
- ! code adapted from Hitachi EDK7045F User Manual: "Copyvect.s"
- mova vects_k,r0
- mov.l @r0, r1 ! Shadow vect tbl addr
- stc vbr, r2 ! Original vect tbl addr
- and #0, r0
- mov r0, r4 ! 0 in r4 and r0
-
-!trapa #32
- or #0x80, r0
- mov.l @(r0,r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!cpu addr err
- or #0x24, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!ill slot
- or #0x18, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!ill inst
- or #0x10, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!nmi
- or #0x2c, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!User brk
- or #0x30, r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-
-!sci0 err
- or #0x80, r0
- rotl r0
- rotl r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
- mov r4, r0
-!sci rx
- or #0x81, r0
- rotl r0
- rotl r0
- mov.l @(r0, r2), r3
- mov.l r3, @(r0, r1)
-
- stc vbr,r3 ! capture copy of monitor vbr
- mov.l vbrtemp_k,r0
- mov.l r3, @r0
- mov.l vects_k,r0 ! point vbr to vectab
- ldc r0,vbr
-
- ! call the mainline
- mov #0,r4 ! argc
- mov #0,r5 ! argv - can place in dead slot
- mov.l main_k,r0
- jsr @r0
- nop !debug dead-slot target
-
- ! call exit
- mov r0,r4
- mov.l exit_k,r0
- or r0,r0
- jsr @r0
- nop !debug dead-slot target
-
- mov.l vbrtemp_k,r0 ! restore original vbr
- mov.l @r0,r3
- ldc r3, vbr
- trapa #13 ! UBR capture by monitor
- nop !debug dead-slot target
-
- END_CODE
-
- .align 2
-stack_k:
- .long SYM(stack)
-edata_k:
- .long SYM(edata)
-end_k:
- .long SYM(end)
-main_k:
- .long SYM(boot_card)
-exit_k:
- .long SYM(exit)
-#ifdef START_HW_INIT /* from $RTEMS_BSP.cfg */
-hw_init_k:
- .long SYM(hw_initialize)
-#endif /* START_HW_INIT */
-vbrtemp_k:
- .long SYM(vbrtemp)
-vects_k:
- .long SYM(vectab)
-vects_size:
- .word 255
-
-#ifdef __ELF__
- .section .stack,"aw"
-#else
- .section .stack
-#endif
-SYM(stack):
- .long 0xdeaddead
-
-#ifdef __ELF__
- .section .bss,"aw"
-#else
- .section .bss
-#endif
-SYM(vbrtemp):
- .long 0x0
-
diff --git a/c/src/lib/libbsp/sh/gensh2/start/start.rom b/c/src/lib/libbsp/sh/gensh2/start/start.rom
deleted file mode 100644
index 87fadd50f3..0000000000
--- a/c/src/lib/libbsp/sh/gensh2/start/start.rom
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * 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.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include "asm.h"
-
- BEGIN_CODE
- PUBLIC(start)
-SYM (start):
- ! install the stack pointer
- mov.l stack_k,r15
-
- ! zero out bss
- mov.l edata_k,r0
- mov.l end_k,r1
- mov #0,r2
-0:
- mov.l r2,@r0
- add #4,r0
- cmp/ge r0,r1
- bt 0b
-
- ! copy the vector table from rom to ram
- mov.l vects_k,r0 ! vectab
- mov #0,r1 ! address of boot vector table
- mov #0,r2 | number of bytes copied
- mov.w vects_size,r3 ! size of entries in vectab
-1:
- mov.l @r1+,r4
- mov.l r4,@r0
- add #4,r0
- add #1,r2
- cmp/hi r3,r2
- bf 1b
-
- mov.l vects_k,r0 ! update vbr to point to vectab
- ldc r0,vbr
-
- ! call the mainline
- mov #0,r4 ! argc
- mov.l main_k,r0
- jsr @r0
- mov #0,r5 ! argv
-
- ! call exit
- mov r0,r4
- mov.l exit_k,r0
- jsr @r0
- or r0,r0
-
- END_CODE
-
- .align 2
-stack_k:
- .long SYM(stack)
-edata_k:
- .long SYM(edata)
-end_k:
- .long SYM(end)
-main_k:
- .long SYM(boot_card)
-exit_k:
- .long SYM(exit)
-
-vects_k:
- .long SYM(vectab)
-vects_size:
- .word 255
-
-#ifdef __ELF__
- .section .stack,"aw"
-#else
- .section .stack
-#endif
-SYM(stack):
- .long 0xdeaddead
diff --git a/c/src/lib/libbsp/sh/gensh4/Makefile.am b/c/src/lib/libbsp/sh/gensh4/Makefile.am
index 92a9cdf6e7..97cea6de1a 100644
--- a/c/src/lib/libbsp/sh/gensh4/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh4/Makefile.am
@@ -6,7 +6,7 @@ include $(top_srcdir)/../../bsp.am
dist_project_lib_DATA = startup/bsp_specs
-start.$(OBJEXT): start/start.S
+start.$(OBJEXT): ../../../../../../bsps/sh/gensh4/start/start.S
$(CPPASCOMPILE) -o $@ -c $<
project_lib_DATA = start.$(OBJEXT)
diff --git a/c/src/lib/libbsp/sh/gensh4/start/start.S b/c/src/lib/libbsp/sh/gensh4/start/start.S
deleted file mode 100644
index a695daaf8a..0000000000
--- a/c/src/lib/libbsp/sh/gensh4/start/start.S
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * start.S -- Initialization code for SH7750 generic BSP
- *
- * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
- * Author: Victor V. Vengerov <vvv@oktet.ru>
- *
- * Based on work:
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * 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.
- *
- * Modified to reflect Hitachi EDK SH7045F:
- * John M. Mills (jmills@tga.com)
- * TGA Technologies, Inc.
- * 100 Pinnacle Way, Suite 140
- * Norcross, GA 30071 U.S.A.
- *
- *
- * This modified file may be copied and distributed in accordance
- * the above-referenced license. It is provided for critique and
- * developmental purposes without any warranty nor representation
- * by the authors or by TGA Technologies.
- *
- * COPYRIGHT (c) 1999-2001.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems/asm.h>
-#include "rtems/score/sh4_regs.h"
-#include "rtems/score/sh7750_regs.h"
-
- BEGIN_CODE
- PUBLIC(start)
-
-/*
- * Algorithm of the first part of the start():
- *
- * 1. Initialize stack
- * 2. Are we from reset or from gdb? Set value for boot_mode in r9.
- * 3. Initialize hardware if we are from reset. Cache is off.
- * 4. Copy data from flash to ram; set up boot mode and jump to real address.
- * 5. Zero out bss.
- * 6. Turn memory cach on.
- */
-
-SYM (start):
- ! install the stack pointer
- mov.l stack_k,r15
-
- mov.l initial_sr_k,r0
- ldc r0,ssr
- ldc r0,sr
-
- ! let us see if we are from gdb stub or from power-on reset
- bsr fake_func
- nop
-fake_func:
-
- sts pr, r0
- shlr8 r0
- mov.l reset_pc_value_shift_8_k, r1
- cmp/eq r0, r1
- movt r9 ! r9 == ! boot_mode
- neg r9, r9
- add #1, r9 ! r9 == boot_mode
-
- ! what is in boot_mode?
- cmp/pl r9 ! r9 > 0 -> T = 1
-
- ! if boot_mode != SH4_BOOT_MODE_FLASH
- bt hw_init_end
- nop
-
-#if START_HW_INIT /* from $RTEMS_BSP.cfg */
- ! Initialize minimal hardware
- ! to run hw_init we need to calculate its address
- ! as it is before data copying
- mov.l hw_init_k, r0
- mov.l copy_start_k, r1
- mov.l copy_end_k, r2
- cmp/ge r0, r1
- bt 0f
- cmp/ge r0, r2
- bf 0f
- ! if copy_start <= hw_init <= copy_end then
- neg r1, r1
- mov.l copy_start_in_rom_k, r3
- add r1,r0
- add r3, r0
-0:
- jsr @r0
- nop !delay slot
-#endif /* START_HW_INIT */
-hw_init_end:
-
-#if COPY_DATA_FROM_ROM
- ! copy data from rom to ram
- mov.l copy_start_k, r0
- mov.l copy_end_k, r1
- mov.l copy_start_in_rom_k, r2
-
- ! if copy_from == copy_to do not copy anything
- cmp/eq r0, r2
- bt real_address
- nop
-
-copy_data_cycle:
- cmp/ge r1, r0
- bt end_of_copy_data_cycle
- nop
- mov.l @r2+, r3
- mov.l r3, @r0
- add #4, r0
- bra copy_data_cycle
- nop
-
-end_of_copy_data_cycle:
-#endif
- ! go to 0x8....... adresses
- mov.l real_address_k, r0
- lds r0, pr
- rts
- nop
-real_address:
- ! write boot_mode to ram
- mov.l boot_mode_k, r5
- mov.l r9, @r5
-
-zero_bss:
- ! zero out bss
- mov.l __bss_start_k,r0
- mov.l __bss_end_k,r1
- mov #0,r2
-0:
- mov.l r2,@r0
- add #4,r0
- cmp/ge r0,r1
- bt 0b
- nop
-
- ! Turn cache on
- mov.l cache_on_k, r0
- jsr @r0
- nop !delay slot
-
- ! Save old value of VBR register. We will need it to allow
- ! debugger agent hook exceptions.
- mov.l __VBR_Saved_k,r0
- stc vbr,r5
- mov.l r5,@r0
- ! Set up VBR register
- mov.l _vbr_base_k,r0
- ldc r0,vbr
-
- ! initialise fpscr for gcc
- mov.l set_fpscr_k, r1
- jsr @r1
- nop
-
- ! Set FPSCR register
- mov.l initial_fpscr_k,r0
- lds r0,fpscr
-
- ! call the mainline
- mov #0,r4 ! argc
- mov.l main_k,r0
- jsr @r0
- nop
-
- ! call exit
- mov r0,r4
- mov.l exit_k,r0
- jsr @r0
- or r0,r0
-
- .global _stop
-_stop:
- mov #11,r0
- mov #0,r4
- trapa #0x3f
- nop
-__stop:
- bra __stop
- nop
-
- END_CODE
-
- .align 2
-#if START_HW_INIT
-copy_start_k:
- .long copy_start
-copy_end_k:
- .long copy_end
-#endif
-#if COPY_DATA_FROM_ROM
-copy_start_in_rom_k:
- .long copy_start_in_rom
-#endif
-
-real_address_k:
- .long real_address
-set_fpscr_k:
- .long ___set_fpscr
-_vbr_base_k:
- .long SYM(_vbr_base)
-__VBR_Saved_k:
- .long SYM(_VBR_Saved)
-stack_k:
- .long SYM(stack)
-__bss_start_k:
- .long __bss_start
-__bss_end_k:
- .LONG __bss_end
-main_k:
- .long SYM(boot_card)
-exit_k:
- .long SYM(_exit)
-
-#if START_HW_INIT /* from $RTEMS_BSP.cfg */
-hw_init_k:
- .long SYM(early_hw_init)
-#endif /* START_HW_INIT */
-
-cache_on_k:
- .long SYM(bsp_cache_on)
-
-vects_k:
- .long SYM(vectab)
-vects_size:
- .word 255
-
- .align 2
-initial_sr_k:
- .long SH4_SR_MD | SH4_SR_IMASK
-initial_fpscr_k:
-#ifdef __SH4__
- .long SH4_FPSCR_DN | SH4_FPSCR_PR | SH4_FPSCR_RM
-#else
- .long SH4_FPSCR_DN | SH4_FPSCR_RM
-#endif
-
-reset_pc_value_shift_8_k:
- .long 0xa00000
-
-boot_mode_k:
- .long _boot_mode
-
-#ifdef __ELF__
- .section .stack,"aw"
-#else
- .section .stack
-#endif
-SYM(stack):
- .long 0xdeaddead
-
-#ifdef __ELF__
- .section .bss,"aw"
-#else
- .section .bss
-#endif
-
- .global __sh4sim_dummy_register
-__sh4sim_dummy_register:
- .long 0
-
- .section .data
- .global _boot_mode
-_boot_mode:
- .long 0
diff --git a/c/src/lib/libbsp/sh/shsim/Makefile.am b/c/src/lib/libbsp/sh/shsim/Makefile.am
index edd911aaad..94659c1be4 100644
--- a/c/src/lib/libbsp/sh/shsim/Makefile.am
+++ b/c/src/lib/libbsp/sh/shsim/Makefile.am
@@ -7,7 +7,7 @@ dist_project_lib_DATA = startup/bsp_specs
-start.$(OBJEXT): start/start.S
+start.$(OBJEXT): ../../../../../../bsps/sh/shsim/start/start.S
$(CPPASCOMPILE) -o $@ -c $<
project_lib_DATA = start.$(OBJEXT)
diff --git a/c/src/lib/libbsp/sh/shsim/start/start.S b/c/src/lib/libbsp/sh/shsim/start/start.S
deleted file mode 100644
index cc4727b9ff..0000000000
--- a/c/src/lib/libbsp/sh/shsim/start/start.S
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * 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.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems/asm.h>
-#include <bsp.h>
-
- BEGIN_CODE
- PUBLIC(start)
-SYM (start):
- ! install the stack pointer
- mov.l stack_k,r15
-
- ! zero out bss
- mov.l edata_k,r0
- mov.l end_k,r1
- mov #0,r2
-0:
- mov.l r2,@r0
- add #4,r0
- cmp/ge r0,r1
- bt 0b
-
- ! copy the vector table from rom to ram
- mov.l vects_k,r0 ! vectab
- mov #0,r1 ! address of boot vector table
- mov #0,r2 ! number of bytes copied
- mov.w vects_size,r3 ! size of entries in vectab
-1:
- mov.l @r1+,r4
- mov.l r4,@r0
- add #4,r0
- add #1,r2
- cmp/hi r3,r2
- bf 1b
-
- mov.l vects_k,r0 ! update vbr to point to vectab
- ldc r0,vbr
-
- ! call the mainline
- mov #0,r4 ! command line
- mov.l main_k,r0
- jsr @r0
-
-
- ! call exit
- mov r0,r4
- mov.l exit_k,r0
- jsr @r0
- or r0,r0
-
- END_CODE
-
- .align 2
-stack_k:
- .long SYM(stack)
-edata_k:
- .long SYM(edata)
-end_k:
- .long SYM(end)
-main_k:
- .long SYM(boot_card)
-exit_k:
- .long SYM(_sys_exit)
-
-vects_k:
- .long SYM(vectab)
-vects_size:
- .word 255
-
-#ifdef __ELF__
- .section .stack,"aw"
-#else
- .section .stack
-#endif
-SYM(stack):
- .long 0xdeaddead
-monvects_k:
- .long SYM(monvects)