Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1624 giacomo 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
 *   Giacomo Guidi       <giacomo@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
 */
37
 
38
#include "kernel/kern.h"
39
#include "modules/edf.h"
40
#include "modules/cbs.h"
41
#include "modules/posix.h"
42
#include "pthread.h"
43
#include "drivers/keyb.h"
44
#include "modules/sem.h"
45
#include "modules/dummy.h"
46
#include "modules/hartport.h"
47
 
48
#include "fsf_contract.h"
49
#include "fsf_server.h"
50
 
51
#include "modules/pi.h"
52
#include "modules/pc.h"
53
 
54
#define TICK 0
55
 
56
#define RRTICK 10000
57
 
58
void load_file();
59
 
60
TIME __kernel_register_levels__(void *arg)
61
{
62
  struct multiboot_info *mb = (struct multiboot_info *)arg;
63
  int grubstar_level;
64
 
65
  EDF_register_level(EDF_ENABLE_ALL);
66
  POSIX_register_level(RRTICK, 1, mb, 32);
67
  grubstar_level = GRUBSTAR_register_level(FSF_MAX_N_SERVERS, 0);
68
  FSF_register_module(grubstar_level, (int)(MAX_BANDWIDTH * 0.9));
69
  dummy_register_level();
70
 
71
  CBS_register_level(CBS_ENABLE_ALL,0);
72
 
73
  SEM_register_module();
74
 
75
  PI_register_module();
76
  PC_register_module();
77
 
78
  PTHREAD_register_module(1, 0, 1);
79
 
80
  load_file();
81
 
82
  return TICK;
83
 
84
}
85
 
86
TASK __init__(void *arg)
87
{
88
  struct multiboot_info *mb = (struct multiboot_info *)arg;
89
 
90
  HARTPORT_init();
91
 
92
  KEYB_init(NULL);
93
 
94
  __call_main__(mb);
95
 
96
  return (void *)0;
97
}
98
 
99
int dos_video_preload(void *filename, long max_size, void **start, void **end);
100
 
101
void *start_file;
102
void *end_file;
103
 
104
void load_file()
105
{
106
  start_file = NULL;
107
  end_file = NULL;
108
 
109
  dos_video_preload("test.m2v",5000000,&start_file,&end_file);
110
 
111
  cprintf("Start file ptr = %08lx\n",(long)(start_file));
112
  cprintf("End   file ptr = %08lx\n",(long)(end_file));
113
  cprintf("Size           = %8ld\n",(long)(end_file - start_file));
114
 
115
}
116