~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/ipxe/src/core/main.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_OR_UBDL );
 
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
        int rc;
 
30
 
 
31
        /* Perform one-time-only initialisation (e.g. heap) */
 
32
        initialise();
 
33
 
 
34
        /* Some devices take an unreasonably long time to initialise */
 
35
        printf ( "%s initialising devices...", product_short_name );
 
36
        startup();
 
37
        printf ( "ok\n" );
 
38
 
 
39
        /* Attempt to boot */
 
40
        if ( ( rc = ipxe ( NULL ) ) != 0 )
 
41
                goto err_ipxe;
 
42
 
 
43
 err_ipxe:
 
44
        shutdown_exit();
 
45
        return rc;
 
46
}