Subversion Repositories shark

Rev

Rev 1350 | Rev 1392 | 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 "kernel/kern.h"
14
#include "modules/edf.h"
1349 giacomo 15
#include "modules/hardcbs.h"
1162 tavani 16
#include "modules/rr.h"
17
#include "modules/dummy.h"
1349 giacomo 18
#include "modules/intdrive.h"
1162 tavani 19
 
1373 giacomo 20
#include "modules/sem.h"
21
#include "modules/hartport.h"
1349 giacomo 22
 
1162 tavani 23
/*+ sysyem tick in us +*/
1349 giacomo 24
#define TICK 0
1162 tavani 25
 
26
/*+ RR tick in us +*/
1349 giacomo 27
#define RRTICK 10000
1162 tavani 28
 
1349 giacomo 29
/*+ Interrup Server */
30
#define INTDRIVE_Q 1000
31
#define INTDRIVE_T 10000
32
#define INTDRIVE_FLAG 0
33
 
1162 tavani 34
TIME __kernel_register_levels__(void *arg)
35
{
36
        struct multiboot_info *mb = (struct multiboot_info *)arg;
37
 
1349 giacomo 38
        INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG);
1162 tavani 39
        EDF_register_level(EDF_ENABLE_ALL);
1349 giacomo 40
        HCBS_register_level(HCBS_ENABLE_ALL, 1);
1162 tavani 41
        RR_register_level(RRTICK, RR_MAIN_YES, mb);
42
        dummy_register_level();
43
 
44
        SEM_register_module();
45
 
46
        return TICK;
47
}
48
 
49
TASK __init__(void *arg)
50
{
51
        struct multiboot_info *mb = (struct multiboot_info *)arg;
52
 
53
        HARTPORT_init();
54
 
55
        __call_main__(mb);
56
 
57
        return (void *)0;
58
}