Rev 1346 | Rev 1375 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1346 | giacomo | 1 | /* |
1356 | giacomo | 2 | * Project: S.Ha.R.K |
1346 | giacomo | 3 | * |
1356 | giacomo | 4 | * Coordinators: Giorgio Buttazzo <giorgio@sssup.it> |
1346 | giacomo | 5 | * |
6 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
7 | * |
||
8 | * http://www.sssup.it |
||
9 | * http://retis.sssup.it |
||
1356 | giacomo | 10 | * http://hartik.sssup.it |
1346 | giacomo | 11 | */ |
12 | |||
13 | #include "kernel/kern.h" |
||
14 | #include "modules/edf.h" |
||
15 | #include "modules/hardcbs.h" |
||
16 | #include "modules/rr.h" |
||
17 | #include "modules/dummy.h" |
||
18 | #include "modules/intdrive.h" |
||
19 | |||
20 | #include "modules/sem.h" |
||
21 | #include "modules/hartport.h" |
||
22 | |||
1356 | giacomo | 23 | #include <drivers/shark_linuxc26.h> |
24 | #include <drivers/shark_input26.h> |
||
25 | #include <drivers/shark_keyb26.h> |
||
1346 | giacomo | 26 | |
27 | /*+ sysyem tick in us +*/ |
||
28 | #define TICK 0 |
||
29 | |||
30 | /*+ RR tick in us +*/ |
||
31 | #define RRTICK 10000 |
||
32 | |||
1356 | giacomo | 33 | /*+ Interrup Server */ |
34 | #define INTDRIVE_Q 1000 |
||
35 | #define INTDRIVE_T 10000 |
||
36 | #define INTDRIVE_FLAG 0 |
||
37 | |||
38 | void my_close(void *arg) |
||
1346 | giacomo | 39 | { |
40 | |||
1356 | giacomo | 41 | KEYB26_close(); |
42 | INPUT26_close(); |
||
43 | |||
44 | kern_printf("S.Ha.R.K. closed.\n\n"); |
||
1346 | giacomo | 45 | |
1356 | giacomo | 46 | } |
1346 | giacomo | 47 | |
1356 | giacomo | 48 | TIME __kernel_register_levels__(void *arg) |
49 | { |
||
50 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
1346 | giacomo | 51 | |
1356 | giacomo | 52 | INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG); |
53 | EDF_register_level(EDF_ENABLE_ALL); |
||
54 | HCBS_register_level(HCBS_ENABLE_ALL, 1); |
||
55 | RR_register_level(RRTICK, RR_MAIN_YES, mb); |
||
56 | dummy_register_level(); |
||
1346 | giacomo | 57 | |
1356 | giacomo | 58 | SEM_register_module(); |
59 | |||
60 | return TICK; |
||
1346 | giacomo | 61 | } |
62 | |||
63 | TASK __init__(void *arg) |
||
64 | { |
||
1356 | giacomo | 65 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
1346 | giacomo | 66 | |
1356 | giacomo | 67 | KEYB_PARMS kparms = BASE_KEYB; |
1346 | giacomo | 68 | |
1356 | giacomo | 69 | keyb_def_ctrlC(kparms, NULL); |
1346 | giacomo | 70 | |
1356 | giacomo | 71 | HARTPORT_init(); |
72 | |||
73 | LINUXC26_register_module(); |
||
74 | //INPUT26_init(); |
||
75 | //KEYB26_init(&kparms); |
||
76 | |||
77 | //sys_atrunlevel(my_close, NULL, RUNLEVEL_BEFORE_EXIT); |
||
78 | |||
79 | __call_main__(mb); |
||
80 | |||
81 | return (void *)0; |
||
1346 | giacomo | 82 | } |