Subversion Repositories shark

Rev

Rev 1120 | Rev 1393 | 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
 ------------
1377 giacomo 21
 CVS :        $Id: iaster6.c,v 1.2 2004-04-17 11:36:13 giacomo Exp $
1120 pj 22
 
23
 File:        $File$
1377 giacomo 24
 Revision:    $Revision: 1.2 $
25
 Last update: $Date: 2004-04-17 11:36:13 $
1120 pj 26
 ------------
27
 
28
 System initialization file
29
 
30
 h3pips.c
31
 
32
 These functions register the following levels:
33
 
34
 an EDF (Earliest Deadline First) level
35
 a RR (Round Robin) level
36
 a CBS (Costant Bandwidth Server) level
37
 a PS (Polling Server) level
38
 a Dummy level
39
 
40
 It can accept these task models:
41
 
42
 HARD_TASK_MODEL (wcet+mit) at level 0
43
 NRT_TASK_MODEL  at level 1
44
 SOFT_TASK_MODEL (met, period) at level 2
45
 SOFT_TASK_MODEL (periodicity=APERIODIC) at level 3
46
 
47
**/
48
 
49
/*
50
 * Copyright (C) 2000 Paolo Gai
51
 *
52
 * This program is free software; you can redistribute it and/or modify
53
 * it under the terms of the GNU General Public License as published by
54
 * the Free Software Foundation; either version 2 of the License, or
55
 * (at your option) any later version.
56
 *
57
 * This program is distributed in the hope that it will be useful,
58
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
59
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
60
 * GNU General Public License for more details.
61
 *
62
 * You should have received a copy of the GNU General Public License
63
 * along with this program; if not, write to the Free Software
64
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
65
 *
66
 */
67
 
68
 
69
 
70
#include "kernel/kern.h"
1377 giacomo 71
 
72
#include "modules/intdrive.h"
1120 pj 73
#include "modules/edf.h"
74
#include "modules/cbs.h"
75
#include "modules/rr.h"
76
#include "modules/dummy.h"
77
#include "modules/ps.h"
78
 
79
#include "modules/sem.h"
80
#include "modules/hartport.h"
81
#include "modules/cabs.h"
82
#include "modules/pi.h"
83
#include "modules/pc.h"
84
#include "modules/srp.h"
85
#include "modules/npp.h"
86
#include "modules/nop.h"
87
 
88
/*+ sysyem tick in us +*/
89
#define TICK 1000
90
 
91
/*+ RR tick in us +*/
92
#define RRTICK 10000
93
 
1377 giacomo 94
/*+ Interrupt Server +*/
95
#define INTDRIVE_Q 1000
96
#define INTDRIVE_T 10000
97
#define INTDRIVE_FLAG 0
98
 
1120 pj 99
TIME __kernel_register_levels__(void *arg)
100
{
101
  struct multiboot_info *mb = (struct multiboot_info *)arg;
102
 
1377 giacomo 103
  INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG);
1120 pj 104
  EDF_register_level(EDF_ENABLE_ALL);
105
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
1377 giacomo 106
  CBS_register_level(CBS_ENABLE_ALL, 1);
107
  PS_register_level(2 /*PS_ENABLE_ALL_EDF*/,1,500,100000);
1120 pj 108
  dummy_register_level();
109
 
110
  SEM_register_module();
111
 
112
  CABS_register_module();
113
 
114
  PI_register_module();
115
  PC_register_module();
116
  NPP_register_module();
117
  SRP_register_module();
118
  NOP_register_module();
119
 
120
  return TICK;
121
}
122
 
123
TASK __init__(void *arg)
124
{
125
  struct multiboot_info *mb = (struct multiboot_info *)arg;
126
 
127
  HARTPORT_init();
128
 
129
  __call_main__(mb);
130
 
131
  return (void *)0;
132
}
133