iPXE
Functions
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)
 
__asmcall int main (void)
 Main entry point. More...
 

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ main()

__asmcall int main ( void  )

Main entry point.

Return values
rcReturn status code

Definition at line 28 of file main.c.

28  {
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...\n", product_short_name );
36  startup();
37 
38  /* Attempt to boot */
39  if ( ( rc = ipxe ( NULL ) ) != 0 )
40  goto err_ipxe;
41 
42  err_ipxe:
43  shutdown_exit();
44  return rc;
45 }
const char product_short_name[]
Product short name string.
Definition: version.c:76
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
void initialise(void)
Initialise iPXE.
Definition: init.c:52
int ipxe(struct net_device *netdev)
Main iPXE flow of execution.
Definition: autoboot.c:585
static void shutdown_exit(void)
Shut down system for exit back to firmware.
Definition: init.h:84
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
void startup(void)
Start up iPXE.
Definition: init.c:67

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

Referenced by _efi_start().