Subversion Repositories shark

Rev

Rev 1449 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1085 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
 ------------
1552 pj 21
 CVS :        $Id: pinit.c,v 1.4 2005-02-25 11:05:44 pj Exp $
1085 pj 22
 
23
 File:        $File$
1552 pj 24
 Revision:    $Revision: 1.4 $
25
 Last update: $Date: 2005-02-25 11:05:44 $
1085 pj 26
 ------------
27
 
28
 This is a minimal initialization file for the PSE51 profile.
29
 
30
 It initializes the POSIX scheduler, the Hartik Ports and the Keyboard driver.
31
 
32
**/
33
 
34
/*
35
 * Copyright (C) 2000 Paolo Gai
36
 *
37
 * This program is free software; you can redistribute it and/or modify
38
 * it under the terms of the GNU General Public License as published by
39
 * the Free Software Foundation; either version 2 of the License, or
40
 * (at your option) any later version.
41
 *
42
 * This program is distributed in the hope that it will be useful,
43
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
44
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
45
 * GNU General Public License for more details.
46
 *
47
 * You should have received a copy of the GNU General Public License
48
 * along with this program; if not, write to the Free Software
49
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
50
 *
51
 */
52
 
53
 
54
 
55
#include "kernel/kern.h"
1552 pj 56
#include "posix/posix/posix.h"
57
#include "dummy/dummy/dummy.h"
1085 pj 58
 
1552 pj 59
#include "pi/pi/pi.h"
60
#include "pc/pc/pc.h"
1085 pj 61
 
1552 pj 62
#include "sem/sem/sem.h"
63
#include "hartport/hartport/hartport.h"
1085 pj 64
 
65
#include "pthread.h"
66
#include "time.h"
67
 
68
/*+ sysyem tick in us +*/
1449 giacomo 69
#define TICK 0
1085 pj 70
 
71
/*+ RR tick in us +*/
72
#define RRTICK 10000
73
 
74
TIME __kernel_register_levels__(void *arg)
75
{
76
  struct multiboot_info *mb = (struct multiboot_info *)arg;
77
 
78
  POSIX_register_level(RRTICK, POSIX_MAIN_YES, mb, 32);
79
  dummy_register_level();
80
 
81
  PI_register_module();
82
  PC_register_module();
83
 
84
  SEM_register_module();
85
 
86
  /* for the Pthread library */
1192 giacomo 87
  PTHREAD_register_module(0, 0, 1);
1085 pj 88
 
89
  /* for the real time clock extensions */
90
  TIMER_register_module();
91
 
92
  return TICK;
93
}
94
 
95
TASK __init__(void *arg)
96
{
97
  struct multiboot_info *mb = (struct multiboot_info *)arg;
98
 
99
  HARTPORT_init();
100
 
101
  __call_main__(mb);
102
 
103
  return (void *)0;
104
}