Rev 1625 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1624 | giacomo | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * (see the web pages for full authors list) |
||
11 | * |
||
12 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
13 | * |
||
14 | * http://www.sssup.it |
||
15 | * http://retis.sssup.it |
||
16 | * http://shark.sssup.it |
||
17 | */ |
||
18 | |||
19 | /* |
||
20 | * Copyright (C) 2000 Paolo Gai |
||
21 | * |
||
22 | * This program is free software; you can redistribute it and/or modify |
||
23 | * it under the terms of the GNU General Public License as published by |
||
24 | * the Free Software Foundation; either version 2 of the License, or |
||
25 | * (at your option) any later version. |
||
26 | * |
||
27 | * This program is distributed in the hope that it will be useful, |
||
28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
30 | * GNU General Public License for more details. |
||
31 | * |
||
32 | * You should have received a copy of the GNU General Public License |
||
33 | * along with this program; if not, write to the Free Software |
||
34 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
35 | * |
||
36 | */ |
||
37 | |||
38 | /* |
||
1651 | pj | 39 | * CVS : $Id: initblk.c,v 1.2 2005-02-26 10:57:27 pj Exp $ |
1624 | giacomo | 40 | * |
41 | * File: $File$ |
||
1651 | pj | 42 | * Revision: $Revision: 1.2 $ |
43 | * Last update: $Date: 2005-02-26 10:57:27 $ |
||
1624 | giacomo | 44 | */ |
45 | |||
46 | #include "kernel/kern.h" |
||
1651 | pj | 47 | #include "edf/edf/edf.h" |
48 | #include "rr/rr/rr.h" |
||
49 | #include "cbs/cbs/cbs.h" |
||
50 | #include "dummy/dummy/dummy.h" |
||
1624 | giacomo | 51 | |
1651 | pj | 52 | #include "sem/sem/sem.h" |
53 | #include "hartport/hartport/hartport.h" |
||
54 | #include "cabs/cabs/cabs.h" |
||
55 | #include "pi/pi/pi.h" |
||
56 | #include "pc/pc/pc.h" |
||
57 | #include "srp/srp/srp.h" |
||
58 | #include "npp/npp/npp.h" |
||
59 | #include "nop/nop/nop.h" |
||
60 | #include "nopm/nopm/nopm.h" |
||
1624 | giacomo | 61 | |
62 | #include "drivers/keyb.h" |
||
63 | |||
64 | /*+ sysyem tick in us +*/ |
||
65 | #define TICK 1000 |
||
66 | |||
67 | /*+ RR tick in us +*/ |
||
68 | #define RRTICK 10000 |
||
69 | |||
70 | TIME __kernel_register_levels__(void *arg) |
||
71 | { |
||
72 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
73 | extern int __register_sub_init(void); |
||
74 | |||
75 | EDF_register_level(EDF_ENABLE_ALL); |
||
76 | RR_register_level(RRTICK, RR_MAIN_YES, mb); |
||
77 | CBS_register_level(CBS_ENABLE_ALL, 0); |
||
78 | dummy_register_level(); |
||
79 | |||
80 | SEM_register_module(); |
||
81 | |||
82 | CABS_register_module(); |
||
83 | |||
84 | PI_register_module(); |
||
85 | PC_register_module(); |
||
86 | NPP_register_module(); |
||
87 | SRP_register_module(); |
||
88 | NOP_register_module(); |
||
89 | NOPM_register_module(); |
||
90 | |||
91 | __register_sub_init(); |
||
92 | |||
93 | return TICK; |
||
94 | } |
||
95 | |||
96 | TASK __init__(void *arg) |
||
97 | { |
||
98 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
99 | KEYB_PARMS keyb = BASE_KEYB; |
||
100 | extern int __bdev_sub_init(void); |
||
101 | extern void ctrlc_exit(KEY_EVT *k); |
||
102 | |||
103 | HARTPORT_init(); |
||
104 | |||
105 | keyb_def_ctrlC(keyb, ctrlc_exit); |
||
106 | KEYB_init(&keyb); |
||
107 | |||
108 | __bdev_sub_init(); |
||
109 | |||
110 | __call_main__(mb); |
||
111 | |||
112 | return (void *)0; |
||
113 | } |