source: rtems/c/src/exec/score/cpu/sh/rtems.c @ df49c60

4.104.114.84.95
Last change on this file since df49c60 was 50cf94da, checked in by Joel Sherrill <joel.sherrill@…>, on 03/20/98 at 17:16:31

SH port submitted from Ralf Corsepius <corsepiu@…>.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *  This file contains the single entry point code for
3 *  the SH implementation of RTEMS.
4 *
5 *  NOTE:  This is supposed to be a .S or .s file NOT a C file.
6 *
7 *  NOTE: UNTESTED, very likely this does not not work.
8 *
9 *  Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
10 *
11 *  COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
12 *
13 *  This program is distributed in the hope that it will be useful,
14 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 *
17 *
18 *  COPYRIGHT (c) 1998.
19 *  On-Line Applications Research Corporation (OAR).
20 *  Copyright assigned to U.S. Government, 1994.
21 *
22 *  The license and distribution terms for this file may be
23 *  found in the file LICENSE in this distribution or at
24 *  http://www.OARcorp.com/rtems/license.html.
25 *
26 *  $Id$
27 */
28
29/*
30 *  This is supposed to be an assembly file.  This means that system.h
31 *  and cpu.h should not be included in a "real" rtems file.
32 */
33
34/* #include <rtems/system.h> */
35/* #include <rtems/score/cpu.h> */
36/* #include "asm.h" */
37
38/*
39 * This should work but due to a bug in rtems building scheme it doesn't work
40 */
41 
42/* #include <rtems/directives.h> */
43
44extern void* _Entry_points[] ;
45
46/*
47 *  RTEMS
48 *
49 *  This routine jumps to the directive indicated in the
50 *  CPU defined register.  This routine is used when RTEMS is
51 *  linked by itself and placed in ROM.  This routine is the
52 *  first address in the ROM space for RTEMS.  The user "calls"
53 *  this address with the directive arguments in the normal place.
54 *  This routine then jumps indirectly to the correct directive
55 *  preserving the arguments.  The directive should not realize
56 *  it has been "wrapped" in this way.  The table "_Entry_points"
57 *  is used to look up the directive.
58 */
59
60void __RTEMS()
61{
62  asm volatile (
63       ".global _RTEMS
64_RTEMS:" );
65
66  asm volatile (
67       "jmp %0
68        rts
69        nop"
70    :: "m" (_Entry_points) );
71}
Note: See TracBrowser for help on using the repository browser.