177b1fd22SAxel Dörfler /* 277b1fd22SAxel Dörfler * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. 377b1fd22SAxel Dörfler * Distributed under the terms of the MIT License. 477b1fd22SAxel Dörfler */ 577b1fd22SAxel Dörfler 677b1fd22SAxel Dörfler 777b1fd22SAxel Dörfler #include <boot/platform.h> 877b1fd22SAxel Dörfler #include <boot/kernel_args.h> 977b1fd22SAxel Dörfler 1077b1fd22SAxel Dörfler #include <stdio.h> 1177b1fd22SAxel Dörfler 1277b1fd22SAxel Dörfler 1377b1fd22SAxel Dörfler extern "C" int boot_main(struct stage2_args *args); 1477b1fd22SAxel Dörfler extern struct kernel_args gKernelArgs; 1577b1fd22SAxel Dörfler 1677b1fd22SAxel Dörfler 1777b1fd22SAxel Dörfler void 1877b1fd22SAxel Dörfler platform_exit(void) 1977b1fd22SAxel Dörfler { 2077b1fd22SAxel Dörfler puts("*** exit ***\n"); 2177b1fd22SAxel Dörfler exit(-1); 2277b1fd22SAxel Dörfler } 2377b1fd22SAxel Dörfler 2477b1fd22SAxel Dörfler 2577b1fd22SAxel Dörfler void 2677b1fd22SAxel Dörfler platform_start_kernel(void) 2777b1fd22SAxel Dörfler { 2877b1fd22SAxel Dörfler printf("*** jump to kernel at %p ***\n*** program exits.\n", (void *)gKernelArgs.kernel_image.elf_header.e_entry); 2977b1fd22SAxel Dörfler exit(0); 3077b1fd22SAxel Dörfler } 3177b1fd22SAxel Dörfler 3277b1fd22SAxel Dörfler 3377b1fd22SAxel Dörfler int 3477b1fd22SAxel Dörfler main(int argc, char **argv) 3577b1fd22SAxel Dörfler { 3677b1fd22SAxel Dörfler // The command arguments are evaluated in platform_devices.cpp! 3777b1fd22SAxel Dörfler 38*d6e44a2aSAxel Dörfler stage2_args args; 39*d6e44a2aSAxel Dörfler boot_main(&args); 4077b1fd22SAxel Dörfler 4177b1fd22SAxel Dörfler return 0; 4277b1fd22SAxel Dörfler } 4377b1fd22SAxel Dörfler 44