source: rtems/c/src/lib/libbsp/bfin/shared/start/start.S @ 2154cd3

4.104.114.84.95
Last change on this file since 2154cd3 was 2154cd3, checked in by Joel Sherrill <joel.sherrill@…>, on 08/03/07 at 15:22:44

2007-08-03 Joel Sherrill <joel.sherrill@…>

  • shared/start/start.S: Fix typo of pO versus p0.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1
2
3#include <rtems/bfin/bfin.h>   
4
5#ifndef LO
6#define LO(con32) ((con32) & 0xFFFF)
7#endif
8#ifndef HI
9#define HI(con32) (((con32) >> 16) & 0xFFFF)
10#endif
11
12
13        .section .init
14        .globl  __init
15        .type   __init,@function
16__init:
17        .section .fini
18        .globl  __fini
19        .type   __fini,@function
20__fini:
21
22
23    .text
24    .align  2
25
26    .global __start
27__start:
28
29    /* Start by setting up a stack */
30    sp.h = 0xFFB0;
31    sp.l = 0x0F00;
32   
33    /* Maybe we should zero the memory in the .bss section.  */
34
35    /* This changes to the supervisor mode */
36    p0.l = START;
37    p0.h = START;
38    p1.l = LO(EVT15);
39    p1.h = HI(EVT15);
40   
41    [P1] = P0;
42   
43    P0.h = HI(IMASK);
44    P0.l = LO(IMASK);
45    R0 = [P0];
46    /* R1.l = EVT_IVG15 & 0xFFFF; */
47    R1.l = 0x8000;
48   
49    R0 = R0 | R1;
50   
51    [P0] = R0;
52
53    RAISE 15;
54   
55    P0.l = WAIT;
56    P0.h = WAIT;
57
58    RETI = P0;
59    RTI;
60   
61    /* endless loop to wait */
62    WAIT:   
63    jump WAIT;
64   
65    START:
66    [--SP] = RETI;
67    p0.l = _boot_card;
68    p0.h = _boot_card;
69
70    call (p0);
71
72    p0.l = _exit;
73    p0.h = _exit;
74    P3 = P4;
75    jump    (p0)        /* Should not return.  */
76
77.global _null_isr
78_null_isr:
79    rti;
80
Note: See TracBrowser for help on using the repository browser.