iPXE
|
Initialisation, startup and shutdown routines. More...
Go to the source code of this file.
Macros | |
#define | colour table_start ( INIT_FNS ) |
Colour for debug messages. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
void | initialise (void) |
Initialise iPXE. More... | |
void | startup (void) |
Start up iPXE. More... | |
void | shutdown (int flags) |
Shut down iPXE. More... | |
Variables | |
static int | started = 0 |
"startup() has been called" flag More... | |
Initialisation, startup and shutdown routines.
Definition in file init.c.
#define colour table_start ( INIT_FNS ) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
void initialise | ( | void | ) |
Initialise iPXE.
This function performs the one-time-only and irreversible initialisation steps, such as initialising the heap. It must be called before (almost) any other function.
There is, by definition, no counterpart to this function on the shutdown path.
Definition at line 52 of file init.c.
References for_each_table_entry, INIT_FNS, and init_fn::initialise.
Referenced by _efidrv_start(), main(), and undi_loader().
void startup | ( | void | ) |
Start up iPXE.
This function performs the repeatable initialisation steps, such as probing devices. You may call startup() and shutdown() multiple times (as is done via the PXE API when PXENV_START_UNDI is used).
Definition at line 67 of file init.c.
References colour, DBGC, for_each_table_entry, startup_fn::name, started, startup_fn::startup, and STARTUP_FNS.
Referenced by _efidrv_start(), main(), pxenv_start_undi(), and select_media().
void shutdown | ( | int | flags | ) |
Shut down iPXE.
flags | Shutdown behaviour flags |
This function reverses the actions of startup(), and leaves iPXE in a state ready to be removed from memory. You may call startup() again after calling shutdown().
Call this function only once, before either exiting main() or starting up a non-returnable image.
Definition at line 98 of file init.c.
References colour, console_reset(), DBGC, flags, for_each_table_entry_reverse, startup_fn::name, startup_fn::shutdown, started, and STARTUP_FNS.
Referenced by intelxl_admin_shutdown(), shutdown_boot(), and shutdown_exit().
|
static |
"startup() has been called" flag
Definition at line 37 of file init.c.
Referenced by librm_test_exec(), profile_start_at(), shutdown(), startup(), undinet_call(), and xenbus_backend_wait().