Subversion Repositories shark

Rev

Rev 1360 | Rev 1374 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1151 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
 *
1360 giacomo 8
 * Authors     :
9
 *   Giacomo Guidi       <giacomo@gandalf.sssup.it>
1151 giacomo 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
 * This program is free software; you can redistribute it and/or modify
21
 * it under the terms of the GNU General Public License as published by
22
 * the Free Software Foundation; either version 2 of the License, or
23
 * (at your option) any later version.
24
 *
25
 * This program is distributed in the hope that it will be useful,
26
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28
 * GNU General Public License for more details.
29
 *
30
 * You should have received a copy of the GNU General Public License
31
 * along with this program; if not, write to the Free Software
32
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
33
 */
34
 
35
#include "kernel/kern.h"
1360 giacomo 36
#include "modules/intdrive.h"
1151 giacomo 37
#include "modules/edf.h"
1360 giacomo 38
#include "modules/hardcbs.h"
1151 giacomo 39
#include "modules/rr.h"
40
#include "modules/dummy.h"
41
 
42
#include "modules/sem.h"
43
#include "modules/hartport.h"
44
#include "modules/cabs.h"
45
 
1360 giacomo 46
#include "drivers/shark_linuxc26.h"
47
#include "drivers/shark_input26.h"
48
#include "drivers/shark_keyb26.h"
1151 giacomo 49
 
50
/*+ sysyem tick in us +*/
51
#define TICK 1000
52
 
53
/*+ RR tick in us +*/
54
#define RRTICK 10000
55
 
1360 giacomo 56
/*+ IntDrive Server +*/
57
#define INTDRIVE_Q 1000
58
#define INTDRIVE_T 10000
59
#define INTDRIVE_FLAGS 0
60
 
1151 giacomo 61
TIME __kernel_register_levels__(void *arg)
62
{
63
  struct multiboot_info *mb = (struct multiboot_info *)arg;
64
 
1360 giacomo 65
  INTDRIVE_register_level(INTDRIVE_Q, INTDRIVE_T, INTDRIVE_FLAGS);
1151 giacomo 66
  EDF_register_level(EDF_ENABLE_ALL);
1360 giacomo 67
  HCBS_register_level(HCBS_ENABLE_ALL, 1);
1151 giacomo 68
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
69
  dummy_register_level();
70
 
71
  SEM_register_module();
72
 
73
  CABS_register_module();
74
 
75
  return TICK;
76
}
77
 
1360 giacomo 78
void shark_close(void *arg)
79
{
80
 
81
  KEYB26_close();
82
  INPUT26_close();
83
 
84
}
85
 
1151 giacomo 86
TASK __init__(void *arg)
87
{
88
  struct multiboot_info *mb = (struct multiboot_info *)arg;
89
 
90
  KEYB_PARMS kparms = BASE_KEYB;
91
 
92
  HARTPORT_init();
93
 
1360 giacomo 94
  LINUXC26_register_module();
95
  INPUT26_init();
96
  KEYB26_init(&kparms);
1151 giacomo 97
 
1361 giacomo 98
  //sys_atrunlevel(shark_close, NULL, RUNLEVEL_SHUTDOWN);
1360 giacomo 99
 
1151 giacomo 100
  __call_main__(mb);
101
 
1360 giacomo 102
  return NULL;
1151 giacomo 103
}
104