]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/omap/init9.s
kernel: dont use atomic increment for Proc.nlocks, maintain Lock.m for lock(), use...
[plan9front.git] / sys / src / 9 / omap / init9.s
1 /*
2  * This is the same as the C programme:
3  *
4  *      void
5  *      main(char* argv0)
6  *      {
7  *              startboot(argv0, &argv0);
8  *      }
9  *
10  * It is in assembler because SB needs to be
11  * set and doing this in C drags in too many
12  * other routines.
13  */
14 TEXT main(SB), 1, $8
15         MOVW    $setR12(SB), R12                /* load the SB */
16         MOVW    $boot(SB), R0
17
18         ADD     $12, R13, R1                    /* pointer to 0(FP) */
19
20         MOVW    R0, 4(R13)                      /* pass argc, argv */
21         MOVW    R1, 8(R13)
22
23         BL      startboot(SB)
24 _loop:
25         B       _loop