Subversion Repositories shark

Rev

Rev 1204 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1194 giacomo 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
 *   Giacomo Guidi       <giacomo@gandalf.sssup.it>
10
 *
11
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
12
 *
13
 * http://www.sssup.it
14
 * http://retis.sssup.it
15
 * http://shark.sssup.it
16
 */
17
 
18
/*
19
 * Copyright (C) 2000 Paolo Gai
20
 *
21
 * This program is free software; you can redistribute it and/or modify
22
 * it under the terms of the GNU General Public License as published by
23
 * the Free Software Foundation; either version 2 of the License, or
24
 * (at your option) any later version.
25
 *
26
 * This program is distributed in the hope that it will be useful,
27
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29
 * GNU General Public License for more details.
30
 *
31
 * You should have received a copy of the GNU General Public License
32
 * along with this program; if not, write to the Free Software
33
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
34
 *
35
 */
36
 
37
#include "kernel/kern.h"
38
#include "modules/edf.h"
39
#include "modules/cbs.h"
40
#include "modules/rr.h"
41
#include "modules/dummy.h"
42
 
43
#include "modules/sem.h"
44
#include "modules/hartport.h"
45
#include "modules/cabs.h"
46
 
47
#include "drivers/keyb.h"
48
 
49
/*+ sysyem tick in us +*/
50
#define TICK 0
51
 
52
/*+ RR tick in us +*/
53
#define RRTICK 10000
54
 
55
TIME __kernel_register_levels__(void *arg)
56
{
57
  struct multiboot_info *mb = (struct multiboot_info *)arg;
58
 
59
  EDF_register_level(EDF_ENABLE_ALL);
60
  CBS_register_level(CBS_ENABLE_ALL, 0);
61
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
62
  dummy_register_level();
63
 
64
  SEM_register_module();
65
 
66
  CABS_register_module();
67
 
68
  return TICK;
69
}
70
 
71
TASK __init__(void *arg)
72
{
73
  struct multiboot_info *mb = (struct multiboot_info *)arg;
74
 
75
  HARTPORT_init();
76
 
77
  KEYB_init(NULL);
78
 
79
  __call_main__(mb);
80
 
81
  return (void *)0;
82
}
83