2 * Creation Date: <2010/06/25 20:00:00 mcayland>
3 * Time-stamp: <2010/06/25 20:00:00 mcayland>
7 * C implementation of load
9 * Copyright (C) 2010 Mark Cave-Ayland (mark.cave-ayland@siriusit.co.uk)
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
18 #include "kernel/kernel.h"
19 #include "libopenbios/bindings.h"
20 #include "libopenbios/sys_info.h"
21 #include "libopenbios/load.h"
23 #ifdef CONFIG_LOADER_ELF
24 #include "libopenbios/elf_load.h"
27 #ifdef CONFIG_LOADER_AOUT
28 #include "libopenbios/aout_load.h"
31 #ifdef CONFIG_LOADER_FCODE
32 #include "libopenbios/fcode_load.h"
35 #ifdef CONFIG_LOADER_FORTH
36 #include "libopenbios/forth_load.h"
40 struct sys_info sys_info
;
41 void *elf_boot_notes
= NULL
;
43 void load(ihandle_t dev
)
45 /* Invoke the loaders on the specified device */
49 #ifdef CONFIG_LOADER_ELF
51 /* Grab the boot arguments */
56 fword("get-package-property");
58 param
= pop_fstr_copy();
60 elf_load(&sys_info
, dev
, param
, &elf_boot_notes
);
61 feval("state-valid @");
68 #ifdef CONFIG_LOADER_AOUT
69 aout_load(&sys_info
, dev
);
70 feval("state-valid @");
77 #ifdef CONFIG_LOADER_FCODE
79 feval("state-valid @");
86 #ifdef CONFIG_LOADER_FORTH
88 feval("state-valid @");