source: rtems/c/src/lib/libbsp/bfin/shared/start/start.S @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1
2#include <rtems/bfin/bfin.h>
3
4#include <bspopts.h>
5
6#ifndef LO
7#define LO(con32) ((con32) & 0xFFFF)
8#endif
9#ifndef HI
10#define HI(con32) (((con32) >> 16) & 0xFFFF)
11#endif
12
13
14        .section .init
15        .globl  __init
16        .type   __init,@function
17__init:
18        .section .fini
19        .globl  __fini
20        .type   __fini,@function
21__fini:
22
23
24#if (BFIN_ON_SKYEYE)
25    .section .init
26#else
27    .section .l1code
28#endif
29    .align  4
30
31    .global __start
32__start:
33
34    /* Start by setting up a stack */
35    sp.h = 0xFFB0;
36    sp.l = 0x0F00;
37
38    /* Maybe we should zero the memory in the .bss section.  */
39
40    /* This changes to the supervisor mode */
41    p0.l = START;
42    p0.h = START;
43    p1.l = LO(EVT15);
44    p1.h = HI(EVT15);
45
46    [P1] = P0;
47
48    P0.h = HI(IMASK);
49    P0.l = LO(IMASK);
50    R0 = [P0];
51    /* R1.l = EVT_IVG15 & 0xFFFF; */
52    R1.l = 0x8000;
53
54    R0 = R0 | R1;
55
56    [P0] = R0;
57
58    RAISE 15;
59
60    P0.l = WAIT;
61    P0.h = WAIT;
62
63    RETI = P0;
64    RTI;
65
66    /* endless loop to wait */
67    WAIT:
68    jump WAIT;
69
70    START:
71    [--SP] = RETI;
72
73    p0.h = _bss_start;
74    p0.l = _bss_start;
75    p1.h = _end;
76    p1.l = _end;
77    r0 = p0;
78    r1 = p1;
79    r1 = r1 - r0;
80    p1 = r1;
81    r0 = 0;
82
83    /* Set _bss_start until _end to zero */
84    lsetup(loop1,loop2) LC0 = p1;
85    loop1:     b[p0] = r0;
86    loop2:  p0 +=1;
87
88    /* call boot_card( 0, 0 ) */
89    r0 = 0;
90    r1 = 0;
91    p0.l = _boot_card;
92    p0.h = _boot_card;
93
94    call (p0);
95
96    HLT
97    p0.l = _exit;
98    p0.h = _exit;
99    P3 = P4;
100    jump    (p0)        /* Should not return.  */
101
102.global _null_isr
103_null_isr:
104    rti;
105
Note: See TracBrowser for help on using the repository browser.