Blame |
Last modification |
View Log
| RSS feed
/*
* Project: S.Ha.R.K.
*
* Coordinators:
* Giorgio Buttazzo <giorgio@sssup.it>
* Paolo Gai <pj@gandalf.sssup.it>
*
* Authors :
* Giacomo Guidi <giacomo@gandalf.sssup.it>
* (see the web pages for full authors list)
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
*/
/*
* Copyright (C) 2000 Paolo Gai
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "kernel/kern.h"
#include "modules/edf.h"
#include "modules/cbs.h"
#include "modules/posix.h"
#include "pthread.h"
#include "drivers/keyb.h"
#include "modules/sem.h"
#include "modules/dummy.h"
#include "modules/hartport.h"
#include "fsf_contract.h"
#include "fsf_server.h"
#include "modules/pi.h"
#include "modules/pc.h"
#define TICK 0
#define RRTICK 10000
void load_file();
TIME __kernel_register_levels__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
int grubstar_level;
EDF_register_level(EDF_ENABLE_ALL);
POSIX_register_level(RRTICK, 1, mb, 32);
grubstar_level = GRUBSTAR_register_level(FSF_MAX_N_SERVERS, 0);
FSF_register_module(grubstar_level, (int)(MAX_BANDWIDTH * 0.9));
dummy_register_level();
CBS_register_level(CBS_ENABLE_ALL,0);
SEM_register_module();
PI_register_module();
PC_register_module();
PTHREAD_register_module(1, 0, 1);
load_file();
return TICK;
}
TASK __init__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
HARTPORT_init();
KEYB_init(NULL);
__call_main__(mb);
return (void *)0;
}
int dos_video_preload(void *filename, long max_size, void **start, void **end);
void *start_file;
void *end_file;
void load_file()
{
start_file = NULL;
end_file = NULL;
dos_video_preload("test.m2v",5000000,&start_file,&end_file);
cprintf("Start file ptr = %08lx\n",(long)(start_file));
cprintf("End file ptr = %08lx\n",(long)(end_file));
cprintf("Size = %8ld\n",(long)(end_file - start_file));
}