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