4.104.114.84.95
Line | |
---|
1 | /* rtems.s |
---|
2 | * |
---|
3 | * This file contains the single entry point code for |
---|
4 | * the SPARC port of RTEMS. |
---|
5 | * |
---|
6 | * $Id$ |
---|
7 | */ |
---|
8 | |
---|
9 | #include <asm.h> |
---|
10 | |
---|
11 | /* |
---|
12 | * RTEMS |
---|
13 | * |
---|
14 | * This routine jumps to the directive indicated in the |
---|
15 | * CPU defined register. This routine is used when RTEMS is |
---|
16 | * linked by itself and placed in ROM. This routine is the |
---|
17 | * first address in the ROM space for RTEMS. The user "calls" |
---|
18 | * this address with the directive arguments in the normal place. |
---|
19 | * This routine then jumps indirectly to the correct directive |
---|
20 | * preserving the arguments. The directive should not realize |
---|
21 | * it has been "wrapped" in this way. The table "_Entry_points" |
---|
22 | * is used to look up the directive. |
---|
23 | * |
---|
24 | * void RTEMS() |
---|
25 | */ |
---|
26 | |
---|
27 | .align 4 |
---|
28 | PUBLIC(RTEMS) |
---|
29 | SYM(RTEMS): |
---|
30 | /* |
---|
31 | * g2 was chosen because gcc uses it as a scratch register in |
---|
32 | * similar code scenarios and the other locals, ins, and outs |
---|
33 | * are off limits to this routine unless it does a "save" and |
---|
34 | * copies its in registers to the outs which only works up until |
---|
35 | * 6 parameters. Best to take the simple approach in this case. |
---|
36 | */ |
---|
37 | sethi SYM(_Entry_points), %g2 |
---|
38 | or %g2, %lo(SYM(_Entry_points)), %g2 |
---|
39 | sll %g1, 2, %g1 |
---|
40 | add %g1, %g2, %g2 |
---|
41 | jmp %g2 |
---|
42 | nop |
---|
43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.