2010-06-25 20:42:00 +00:00
|
|
|
/*
|
|
|
|
|
* Creation Date: <2010/06/25 20:00:00 mcayland>
|
|
|
|
|
* Time-stamp: <2010/06/25 20:00:00 mcayland>
|
|
|
|
|
*
|
|
|
|
|
* <load.c>
|
|
|
|
|
*
|
|
|
|
|
* C implementation of load
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2010 Mark Cave-Ayland (mark.cave-ayland@siriusit.co.uk)
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* version 2
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
#include "kernel/kernel.h"
|
|
|
|
|
#include "libopenbios/bindings.h"
|
2010-06-27 14:00:37 +00:00
|
|
|
#include "libopenbios/sys_info.h"
|
2010-06-25 20:42:00 +00:00
|
|
|
#include "libopenbios/load.h"
|
|
|
|
|
|
2010-06-27 14:00:37 +00:00
|
|
|
#ifdef CONFIG_LOADER_AOUT
|
|
|
|
|
#include "libopenbios/aout_load.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_LOADER_FCODE
|
2010-06-25 20:42:00 +00:00
|
|
|
#include "libopenbios/fcode_load.h"
|
2010-06-27 14:00:37 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_LOADER_FORTH
|
2010-06-27 13:14:03 +00:00
|
|
|
#include "libopenbios/forth_load.h"
|
2010-06-27 14:00:37 +00:00
|
|
|
#endif
|
|
|
|
|
|
2010-06-25 20:42:00 +00:00
|
|
|
|
2010-08-01 11:03:45 +00:00
|
|
|
struct sys_info sys_info;
|
|
|
|
|
|
2010-06-25 20:42:00 +00:00
|
|
|
void load(ihandle_t dev)
|
|
|
|
|
{
|
|
|
|
|
/* Invoke the loaders on the specified device */
|
|
|
|
|
|
2010-06-27 14:00:37 +00:00
|
|
|
#ifdef CONFIG_LOADER_AOUT
|
|
|
|
|
aout_load(&sys_info, dev);
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-06-25 20:42:00 +00:00
|
|
|
#ifdef CONFIG_LOADER_FCODE
|
|
|
|
|
fcode_load(dev);
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-06-27 13:14:03 +00:00
|
|
|
#ifdef CONFIG_LOADER_FORTH
|
|
|
|
|
forth_load(dev);
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-06-25 20:42:00 +00:00
|
|
|
}
|