Rev 1120 | Rev 1388 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1120 | pj | 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 | #include "kernel/kern.h" |
||
1377 | giacomo | 39 | #include "modules/intdrive.h" |
1120 | pj | 40 | #include "modules/edf.h" |
41 | #include "modules/rr.h" |
||
42 | #include "modules/tbs.h" |
||
43 | #include "modules/cbs.h" |
||
44 | #include "modules/rrsoft.h" |
||
45 | #include "modules/dummy.h" |
||
46 | #include "modules/sem.h" |
||
47 | #include "modules/hartport.h" |
||
48 | |||
49 | /*+ sysyem tick in us +*/ |
||
50 | #define TICK 0 |
||
51 | |||
52 | #define RRTICK 5000 |
||
53 | #define TBS_NUM 1 |
||
54 | #define TBS_DEN 10 |
||
55 | |||
1377 | giacomo | 56 | /*+ Interrupt Server +*/ |
57 | #define INTDRIVE_Q 1000 |
||
58 | #define INTDRIVE_T 10000 |
||
59 | #define INTDRIVE_FLAG 0 |
||
1120 | pj | 60 | |
1377 | giacomo | 61 | |
1120 | pj | 62 | TIME __kernel_register_levels__(void *arg) |
63 | { |
||
64 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
65 | |||
1377 | giacomo | 66 | INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG); |
1120 | pj | 67 | EDF_register_level(EDF_ENABLE_ALL); |
68 | RR_register_level(RRTICK, RR_MAIN_YES, mb); |
||
1377 | giacomo | 69 | TBS_register_level(TBS_ENABLE_ALL, 1, TBS_NUM, TBS_DEN); |
70 | TBS_register_level(TBS_ENABLE_ALL, 1, TBS_NUM*3, TBS_DEN); |
||
71 | CBS_register_level(CBS_ENABLE_ALL, 1); |
||
1120 | pj | 72 | |
73 | dummy_register_level(); |
||
74 | |||
75 | SEM_register_module(); |
||
76 | |||
77 | return TICK; |
||
78 | } |
||
79 | |||
80 | TASK __init__(void *arg) |
||
81 | { |
||
82 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
83 | |||
84 | HARTPORT_init(); |
||
85 | |||
86 | __call_main__(mb); |
||
87 | |||
88 | return (void *)0; |
||
89 | } |
||
90 |