iPXE
main.c File Reference
#include <stddef.h>
#include <stdio.h>
#include <ipxe/init.h>
#include <ipxe/version.h>
#include <usr/autoboot.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
__asmcall int main (void)
 Main entry point.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ main()

__asmcall int main ( void )

Main entry point.

Return values
rcReturn status code

Definition at line 29 of file main.c.

29 {
30 int rc;
31
32 /* Perform one-time-only initialisation (e.g. heap) */
33 initialise();
34
35 /* Some devices take an unreasonably long time to initialise */
36 printf ( "%s initialising devices...\n", product_short_name );
37 startup();
38
39 /* Attempt to boot */
40 if ( ( rc = ipxe ( NULL ) ) != 0 )
41 goto err_ipxe;
42
43 err_ipxe:
45 return rc;
46}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
int ipxe(struct net_device *netdev)
Main iPXE flow of execution.
Definition autoboot.c:586
void startup(void)
Start up iPXE.
Definition init.c:70
void initialise(void)
Initialise iPXE.
Definition init.c:53
static void shutdown_exit(void)
Shut down system for exit back to firmware.
Definition init.h:86
const char product_short_name[]
Product short name string.
Definition version.c:77
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition vsprintf.c:465

References __asmcall, initialise(), ipxe(), NULL, printf(), product_short_name, rc, shutdown_exit(), and startup().

Referenced by _efi_start().