16,42 → 16,6 |
* http://shark.sssup.it |
*/ |
|
/** |
------------ |
CVS : $Id: iaster4.c,v 1.1 2002-11-11 08:22:45 pj Exp $ |
|
File: $File$ |
Revision: $Revision: 1.1 $ |
Last update: $Date: 2002-11-11 08:22:45 $ |
------------ |
|
System initialization file |
|
The tick is set to TICK ms. |
|
This file contains the 2 functions needed to initialize the system. |
|
These functions register the following levels: |
|
an EDF (Earliest Deadline First) level |
a RR (Round Robin) level |
a TBS (Total Bandwidth Server) level 0.1 Us |
a TBS (Total Bandwidth Server) level 0.3 Us |
a CBS (Constant Bandwidth Server) level |
a Dummy level |
|
The TBS bandwidth is TBS_NUM/TBS_DEN |
|
|
It can accept these task models (into () the mandatory fields): |
|
HARD_TASK_MODEL (wcet+mit) at level 0 |
NRT_TASK_MODEL at level 1 |
SOFT_TASK_MODEL (wcet, periodicity=APERIODIC) at level 2,3 |
SOFT_TASK_MODEL (met,period) at level 4 |
|
**/ |
|
/* |
* Copyright (C) 2000 Paolo Gai |
* |
71,9 → 35,8 |
* |
*/ |
|
|
|
#include "kernel/kern.h" |
#include "modules/intdrive.h" |
#include "modules/edf.h" |
#include "modules/rr.h" |
#include "modules/tbs.h" |
80,12 → 43,10 |
#include "modules/cbs.h" |
#include "modules/rrsoft.h" |
#include "modules/dummy.h" |
#include "drivers/keyb.h" |
#include "modules/sem.h" |
#include "modules/hartport.h" |
|
/*+ sysyem tick in us +*/ |
//#define TICK 300 |
#define TICK 0 |
|
#define RRTICK 5000 |
92,25 → 53,23 |
#define TBS_NUM 1 |
#define TBS_DEN 10 |
|
/*+ Interrupt Server +*/ |
#define INTDRIVE_Q 1000 |
#define INTDRIVE_T 10000 |
#define INTDRIVE_FLAG 0 |
|
|
TIME __kernel_register_levels__(void *arg) |
{ |
struct multiboot_info *mb = (struct multiboot_info *)arg; |
|
INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG); |
EDF_register_level(EDF_ENABLE_ALL); |
RR_register_level(RRTICK, RR_MAIN_YES, mb); |
TBS_register_level(TBS_ENABLE_ALL, 0, TBS_NUM, TBS_DEN); |
TBS_register_level(TBS_ENABLE_ALL, 0, TBS_NUM*3, TBS_DEN); |
CBS_register_level(CBS_ENABLE_ALL, 0); |
TBS_register_level(TBS_ENABLE_ALL, 1, TBS_NUM, TBS_DEN); |
TBS_register_level(TBS_ENABLE_ALL, 1, TBS_NUM*3, TBS_DEN); |
CBS_register_level(CBS_ENABLE_ALL, 1); |
|
/* RRSOFT_register_level(RRTICK, RR_MAIN_NO, mb, RRSOFT_ONLY_HARD); |
RR_register_level(RRTICK, RR_MAIN_NO, mb); |
RRSOFT_register_level(RRTICK, RR_MAIN_NO, mb, RRSOFT_ONLY_SOFT); //cbs |
RRSOFT_register_level(RRTICK, RR_MAIN_NO, mb, RRSOFT_ONLY_SOFT); //tbs |
RRSOFT_register_level(RRTICK, RR_MAIN_NO, mb, RRSOFT_ONLY_SOFT); //tbs |
RR_register_level(RRTICK, RR_MAIN_YES, mb); |
*/ |
|
dummy_register_level(); |
|
SEM_register_module(); |
124,8 → 83,6 |
|
HARTPORT_init(); |
|
KEYB_init(NULL); |
|
__call_main__(mb); |
|
return (void *)0; |