Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / core / main.c
1 /**************************************************************************
2 iPXE -  Network Bootstrap Program
3
4 Literature dealing with the network protocols:
5         ARP - RFC826
6         RARP - RFC903
7         UDP - RFC768
8         BOOTP - RFC951, RFC2132 (vendor extensions)
9         DHCP - RFC2131, RFC2132 (options)
10         TFTP - RFC1350, RFC2347 (options), RFC2348 (blocksize), RFC2349 (tsize)
11         RPC - RFC1831, RFC1832 (XDR), RFC1833 (rpcbind/portmapper)
12
13 **************************************************************************/
14
15 FILE_LICENCE ( GPL2_OR_LATER );
16
17 #include <stddef.h>
18 #include <stdio.h>
19 #include <ipxe/init.h>
20 #include <ipxe/version.h>
21 #include <usr/autoboot.h>
22
23 /**
24  * Main entry point
25  *
26  * @ret rc              Return status code
27  */
28 __asmcall int main ( void ) {
29
30         /* Perform one-time-only initialisation (e.g. heap) */
31         initialise();
32
33         /* Some devices take an unreasonably long time to initialise */
34         printf ( "%s initialising devices...", product_short_name );
35         startup();
36         printf ( "ok\n" );
37
38         ipxe ( NULL );
39
40         shutdown_exit();
41
42         return 0;
43 }