headers/bsd: Add sys/queue.h.
[haiku.git] / src / tests / system / boot / loader / platform_start.cpp
blob66b7fbd69bfa6bdc0644ff89d6cdbd27179512a3
1 /*
2 * Copyright 2003-2013, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <boot/platform.h>
8 #include <boot/kernel_args.h>
10 #include <stdio.h>
13 extern "C" int boot_main(struct stage2_args *args);
14 extern struct kernel_args gKernelArgs;
17 void
18 platform_exit(void)
20 puts("*** exit ***\n");
21 exit(-1);
25 void
26 platform_start_kernel(void)
28 preloaded_elf32_image *image = static_cast<preloaded_elf32_image *>(
29 gKernelArgs.kernel_image.Pointer());
31 printf("*** jump to kernel at %p ***\n*** program exits.\n",
32 (void *)image->elf_header.e_entry);
33 exit(0);
37 int
38 main(int argc, char **argv)
40 // The command arguments are evaluated in platform_devices.cpp!
42 stage2_args args;
43 boot_main(&args);
45 return 0;