Rev 1552 | 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 | * |
||
1567 | mauro | 37 | * CVS : $Id: imdemo.c,v 1.5 2005-05-10 17:21:17 mauro Exp $ |
1120 | pj | 38 | **/ |
39 | |||
40 | #include "kernel/kern.h" |
||
1377 | giacomo | 41 | |
1552 | pj | 42 | #include "intdrive/intdrive/intdrive.h" |
43 | #include "edf/edf/edf.h" |
||
44 | #include "cbs/cbs/cbs.h" |
||
45 | #include "rr/rr/rr.h" |
||
46 | #include "dummy/dummy/dummy.h" |
||
1120 | pj | 47 | |
1552 | pj | 48 | #include "sem/sem/sem.h" |
49 | #include "hartport/hartport/hartport.h" |
||
50 | #include "cabs/cabs/cabs.h" |
||
51 | #include "pi/pi/pi.h" |
||
52 | #include "pc/pc/pc.h" |
||
53 | #include "srp/srp/srp.h" |
||
54 | #include "npp/npp/npp.h" |
||
55 | #include "nop/nop/nop.h" |
||
1120 | pj | 56 | |
57 | /*+ sysyem tick in us +*/ |
||
58 | #define TICK 0 |
||
59 | |||
60 | /*+ RR tick in us +*/ |
||
61 | #define RRTICK 10000 |
||
62 | |||
1377 | giacomo | 63 | /*+ Interrupt Server +*/ |
64 | #define INTDRIVE_Q 1000 |
||
1567 | mauro | 65 | #define INTDRIVE_U 1000 |
1377 | giacomo | 66 | #define INTDRIVE_FLAG 0 |
67 | |||
1120 | pj | 68 | TIME __kernel_register_levels__(void *arg) |
69 | { |
||
70 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
71 | |||
1567 | mauro | 72 | INTDRIVE_register_level(INTDRIVE_Q, INTDRIVE_Q, INTDRIVE_U, INTDRIVE_FLAG); |
1120 | pj | 73 | EDF_register_level(EDF_ENABLE_ALL); |
74 | RR_register_level(RRTICK, RR_MAIN_YES, mb); |
||
1388 | giacomo | 75 | CBS_register_level(CBS_ENABLE_ALL, 1); |
1120 | pj | 76 | dummy_register_level(); |
77 | |||
78 | SEM_register_module(); |
||
79 | |||
80 | CABS_register_module(); |
||
81 | |||
82 | PI_register_module(); |
||
83 | PC_register_module(); |
||
84 | NPP_register_module(); |
||
85 | SRP_register_module(); |
||
86 | NOP_register_module(); |
||
87 | |||
88 | return TICK; |
||
89 | } |
||
90 | |||
91 | TASK __init__(void *arg) |
||
92 | { |
||
93 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
94 | |||
95 | HARTPORT_init(); |
||
96 | |||
97 | __call_main__(mb); |
||
98 | |||
99 | return (void *)0; |
||
1377 | giacomo | 100 | |
1120 | pj | 101 | } |
102 |