From 87508aa0b2e0fea5d4dea8d732150bd2fdbbb9f8 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 10 Apr 2005 18:30:34 +0000 Subject: arch_initialise() is now sufficiently generic that we may as well just call it initialise() and place it in main.c. :) --- src/core/main.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/core') diff --git a/src/core/main.c b/src/core/main.c index c95f0ae28..ef8b67bb0 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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; } -- cgit v1.2.3-55-g7522