Subversion Repositories shark

Rev

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

Rev Author Line No. Line
1120 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
 * Copyright (C) 2000 Paolo Gai
21
 *
22
 * This program is free software; you can redistribute it and/or modify
23
 * it under the terms of the GNU General Public License as published by
24
 * the Free Software Foundation; either version 2 of the License, or
25
 * (at your option) any later version.
26
 *
27
 * This program is distributed in the hope that it will be useful,
28
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30
 * GNU General Public License for more details.
31
 *
32
 * You should have received a copy of the GNU General Public License
33
 * along with this program; if not, write to the Free Software
34
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
35
 *
36
 *
1388 giacomo 37
 * CVS :        $Id: imdemo.c,v 1.3 2004-04-19 14:48:05 giacomo Exp $
1120 pj 38
**/
39
 
40
#include "kernel/kern.h"
1377 giacomo 41
 
42
#include "modules/intdrive.h"
1120 pj 43
#include "modules/edf.h"
1388 giacomo 44
#include "modules/cbs.h"
1120 pj 45
#include "modules/rr.h"
46
#include "modules/dummy.h"
47
 
48
#include "modules/sem.h"
49
#include "modules/hartport.h"
50
#include "modules/cabs.h"
51
#include "modules/pi.h"
52
#include "modules/pc.h"
53
#include "modules/srp.h"
54
#include "modules/npp.h"
55
#include "modules/nop.h"
56
 
57
/*+ sysyem tick in us +*/
58
#define TICK 0
59
 
60
/*+ RR tick in us +*/
61
#define RRTICK 10000
62
 
1377 giacomo 63
/*+ Interrupt Server +*/
64
#define INTDRIVE_Q 1000
65
#define INTDRIVE_T 10000
66
#define INTDRIVE_FLAG 0
67
 
1120 pj 68
TIME __kernel_register_levels__(void *arg)
69
{
70
  struct multiboot_info *mb = (struct multiboot_info *)arg;
71
 
1377 giacomo 72
  INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG);
1120 pj 73
  EDF_register_level(EDF_ENABLE_ALL);
74
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
1388 giacomo 75
  CBS_register_level(CBS_ENABLE_ALL, 1);
1120 pj 76
  dummy_register_level();
77
 
78
  SEM_register_module();
79
 
80
  CABS_register_module();
81
 
82
  PI_register_module();
83
  PC_register_module();
84
  NPP_register_module();
85
  SRP_register_module();
86
  NOP_register_module();
87
 
88
  return TICK;
89
}
90
 
91
TASK __init__(void *arg)
92
{
93
  struct multiboot_info *mb = (struct multiboot_info *)arg;
94
 
95
  HARTPORT_init();
96
 
97
  __call_main__(mb);
98
 
99
  return (void *)0;
1377 giacomo 100
 
1120 pj 101
}
102