source: rtems/c/src/lib/start/i960/start.s @ d6b2bba

4.104.114.84.95
Last change on this file since d6b2bba was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/11/95 at 19:35:39

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*  entry.s
2 *
3 *  This file contains the entry point for the application.
4 *  The name of this entry point is compiler dependent.
5 *  It jumps to the BSP which is responsible for performing
6 *  all initialization.
7 *
8 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
9 *  On-Line Applications Research Corporation (OAR).
10 *  All rights assigned to U.S. Government, 1994.
11 *
12 *  This material may be reproduced by or for the U.S. Government pursuant
13 *  to the copyright license under the clause at DFARS 252.227-7013.  This
14 *  notice must appear in all copies of this file and its derivatives.
15 *
16 *  $Id$
17 */
18
19#include "asm.h"
20
21        BEGIN_CODE
22        PUBLIC(start)                 # GNU960 default entry point
23
24start:
25        mov     3, r12
26        modpc   r12, r12, r12         # enable tracing/trace faults
27        mov     g5, g5                # NOP
28        mov     0, g14                # initialize constant for C
29
30        /*
31         * zero out uninitialized data area
32         */
33zerobss:
34        lda     _end, r4        /* find end of .bss */
35        lda     _bss_start, r5  /* find beginning of .bss */
36        ldconst 0, r6
37
38loop:   st      r6, (r5)        /* to zero out uninitialized */
39        addo    4, r5, r5       /* data area                 */
40        cmpobl  r5, r4, loop    /* loop until _end reached   */
41
42/* set up stack pointer:
43 *   The heap will begin at '_end';  its length is 'heap_size'
44 *   bytes.  The stack will begin at the first 64-byte-aligned
45 *   block after the heap.
46 *
47 *   A default value of 'heap_size' is set by linking with libnindy.a
48 *   The default can be overridden by redefining this symbol at link
49 *   time (with a line of the form 'heap_size=XXXX;' in the lnk960
50 *   linker specification file; or one of the form
51 *   "-defsym heap_size=XXXX" on the gld960 invocation line).
52 */
53
54        ldconst _end, sp         /* set sp = address of end of heap */
55        lda     heap_size(sp),sp
56        lda     64(sp), sp       /* Now round up to 64-byte boundary */
57        ldconst 0xffffffc0, r12
58        and     r12, sp, sp
59        st      sp, _stack_start /* Save for brk() routine */
60
61        call    init_frames
62        ret                      /* return to monitor */
63
64init_frames:
65        mov     0, g14           /* initialize constant for C */
66        ldconst 0x3b001000, g0
67        ldconst 0x00009107, g1
68        modac   g1, g0, g0       /* set AC controls */
69
70        /*
71         * remember the frame, so that we can set it up if necessary
72         */
73
74        st      fp, _start_frame
75
76        /*
77         * Call application mainline.
78         *      Someday, real values of argc and argv will be set up.
79         *      For now, they are set to 0.
80         */
81        ldconst 0,g0
82        ldconst 0,g1
83        ldconst 0,g2
84        call    _main
85        ret
86
87END_CODE
88
89         BEGIN_DATA
90
91        PUBLIC(_start_frame)
92SYM (_start_frame):
93        .word   0                  # addr of first user frame: for gdb960
94
95SYM (_stack_start):
96        PUBLIC(_stack_start)
97        .word   0                  # addr of first user frame: for gdb960
98
99END_DATA
100
101BEGIN_BSS
102        PUBLIC(heap_size)
103        .set    heap_size,0x2000
104END_BSS
105
106END
Note: See TracBrowser for help on using the repository browser.