Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 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
 *   Paolo Gai           <pj@gandalf.sssup.it>
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
 ------------
21
 CVS :        $Id: h3pi.c,v 1.1.1.1 2002-03-29 14:12:52 pj Exp $
22
 
23
 File:        $File$
24
 Revision:    $Revision: 1.1.1.1 $
25
 Last update: $Date: 2002-03-29 14:12:52 $
26
 ------------
27
 
28
 System initialization file
29
 
30
 h3pi.c
31
 
32
 This file is equal to hartik3.c plus the resources module...
33
 
34
**/
35
 
36
/*
37
 * Copyright (C) 2000 Paolo Gai
38
 *
39
 * This program is free software; you can redistribute it and/or modify
40
 * it under the terms of the GNU General Public License as published by
41
 * the Free Software Foundation; either version 2 of the License, or
42
 * (at your option) any later version.
43
 *
44
 * This program is distributed in the hope that it will be useful,
45
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
46
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
47
 * GNU General Public License for more details.
48
 *
49
 * You should have received a copy of the GNU General Public License
50
 * along with this program; if not, write to the Free Software
51
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
52
 *
53
 */
54
 
55
 
56
 
57
#include "kernel/kern.h"
58
#include "modules/edf.h"
59
#include "modules/cbs.h"
60
#include "modules/rr.h"
61
#include "modules/dummy.h"
62
 
63
#include "modules/sem.h"
64
#include "modules/hartport.h"
65
#include "modules/cabs.h"
66
#include "modules/pi.h"
67
#include "modules/pc.h"
68
#include "modules/srp.h"
69
#include "modules/npp.h"
70
#include "modules/nop.h"
71
 
72
#include "drivers/keyb.h"
73
 
74
 
75
/*+ sysyem tick in us +*/
76
//#define TICK 1000
77
#define TICK 0
78
 
79
/*+ RR tick in us +*/
80
#define RRTICK 10000
81
 
82
TIME __kernel_register_levels__(void *arg)
83
{
84
  struct multiboot_info *mb = (struct multiboot_info *)arg;
85
 
86
  EDF_register_level(EDF_ENABLE_ALL);
87
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
88
  CBS_register_level(CBS_ENABLE_ALL, 0);
89
  dummy_register_level();
90
 
91
  SEM_register_module();
92
 
93
  CABS_register_module();
94
 
95
  PI_register_module();
96
  PC_register_module();
97
  NPP_register_module();
98
  SRP_register_module();
99
  NOP_register_module();
100
 
101
  return TICK;
102
}
103
 
104
TASK __init__(void *arg)
105
{
106
  struct multiboot_info *mb = (struct multiboot_info *)arg;
107
 
108
  HARTPORT_init();
109
 
110
  kern_printf("TIME=%ld\n",sys_gettime(NULL));
111
  KEYB_init(NULL);
112
  kern_printf("TIME=%ld\n",sys_gettime(NULL));
113
//  KEYB_init(NULL);
114
 
115
  __call_main__(mb);
116
 
117
  return (void *)0;
118
}
119