xref: /haiku/src/tests/system/boot/loader/platform_start.cpp (revision 2600324b57fa31cdea1627d584d314f2a579c4a8)
1 /*
2  * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <boot/platform.h>
8 #include <boot/kernel_args.h>
9 
10 #include <stdio.h>
11 
12 
13 extern "C" int boot_main(struct stage2_args *args);
14 extern struct kernel_args gKernelArgs;
15 
16 
17 void
18 platform_exit(void)
19 {
20 	puts("*** exit ***\n");
21 	exit(-1);
22 }
23 
24 
25 void
26 platform_start_kernel(void)
27 {
28 	printf("*** jump to kernel at %p ***\n*** program exits.\n", (void *)gKernelArgs.kernel_image.elf_header.e_entry);
29 	exit(0);
30 }
31 
32 
33 int
34 main(int argc, char **argv)
35 {
36 	// The command arguments are evaluated in platform_devices.cpp!
37 
38 	boot_main(NULL);
39 
40 	return 0;
41 }
42 
43