1 /* tag: openbios boot command for x86
3 * Copyright (C) 2003-2004 Stefan Reinauer
5 * See the file "COPYING" for further information about
6 * the copyright and warranty status of this work.
11 #include "libopenbios/bindings.h"
12 #include "arch/common/nvram.h"
13 #include "libc/diskio.h"
14 #include "libopenbios/sys_info.h"
19 ucell address, type, size;
22 /* Get the entry point and the type (see forth/debugging/client.fs) */
23 feval("saved-program-state >sps.entry @");
25 feval("saved-program-state >sps.file-type @");
27 feval("saved-program-state >sps.file-size @");
30 printk("\nJumping to entry point " FMT_ucellx " for type " FMT_ucellx "...\n", address, type);
34 /* Start ELF boot image */
35 image_retval = start_elf(address, (uint32_t)&elf_boot_notes);
40 image_retval = start_elf(address, (uint32_t)NULL);
44 /* Start a.out image */
45 image_retval = start_elf(address, (uint32_t)NULL);
49 /* Start Fcode image */
50 printk("Evaluating FCode...\n");
58 /* Start Forth image */
66 printk("Image returned with return value %#x\n", image_retval);
72 /* No platform-specific boot code */