mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
arch_initialise() is now sufficiently generic that we may as well just
call it initialise() and place it in main.c. :)
This commit is contained in:
@@ -138,6 +138,23 @@ static int exit_status;
|
||||
static int initialized;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* initialise() - perform any C-level initialisation
|
||||
*
|
||||
* This does not include initialising the NIC, but it does include
|
||||
* e.g. getting the memory map, relocating to high memory,
|
||||
* initialising the console, etc.
|
||||
**************************************************************************
|
||||
*/
|
||||
void initialise ( void ) {
|
||||
/* Zero the BSS */
|
||||
memset ( _bss, 0, _ebss - _bss );
|
||||
|
||||
/* Call all registered initialisation functions.
|
||||
*/
|
||||
call_init_fns ();
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
MAIN - Kick off routine
|
||||
**************************************************************************/
|
||||
@@ -164,6 +181,10 @@ int main ( void ) {
|
||||
state = main_loop(state);
|
||||
}
|
||||
/* arch_on_exit(exit_status) */
|
||||
|
||||
/* Call registered per-object exit functions */
|
||||
call_exit_fns ();
|
||||
|
||||
return exit_status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user