diff options
author | Michael Brown <mcb30@etherboot.org> | 2007-07-03 23:09:56 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2007-07-03 23:09:56 +0100 |
commit | 89349d7fad252f0b36be4a764369e6dd40a2e692 (patch) | |
tree | 72b112d6152fadee77673994f1e92b82a9c506e8 /src/arch | |
parent | a5f33ea28393218f6683ce270074ce0d0eb192e5 (diff) | |
download | ipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.tar.gz |
Separated out initialisation functions from startup/shutdown functions.
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/i386/core/cpu.c | 2 | ||||
-rw-r--r-- | src/arch/i386/core/gdbsym.c | 4 | ||||
-rw-r--r-- | src/arch/i386/core/i386_timer.c | 4 | ||||
-rw-r--r-- | src/arch/i386/core/video_subr.c | 4 | ||||
-rw-r--r-- | src/arch/i386/firmware/pcbios/hidemem.c | 11 | ||||
-rw-r--r-- | src/arch/i386/image/bzimage.c | 2 | ||||
-rw-r--r-- | src/arch/i386/image/eltorito.c | 2 | ||||
-rw-r--r-- | src/arch/i386/image/multiboot.c | 2 | ||||
-rw-r--r-- | src/arch/i386/image/nbi.c | 2 |
9 files changed, 22 insertions, 11 deletions
diff --git a/src/arch/i386/core/cpu.c b/src/arch/i386/core/cpu.c index b43ee425..cbef6a1a 100644 --- a/src/arch/i386/core/cpu.c +++ b/src/arch/i386/core/cpu.c @@ -85,6 +85,4 @@ void cpu_setup(void) identify_cpu(&cpu_info); } -INIT_FN ( INIT_CPU, cpu_setup, NULL ); - #endif /* CONFIG_X86_64 */ diff --git a/src/arch/i386/core/gdbsym.c b/src/arch/i386/core/gdbsym.c index 1e0cadec..2da1a1bd 100644 --- a/src/arch/i386/core/gdbsym.c +++ b/src/arch/i386/core/gdbsym.c @@ -28,4 +28,6 @@ static void gdb_symbol_line ( void ) { getkey(); } -INIT_FN ( INIT_GDBSYM, gdb_symbol_line, NULL ); +struct startup_fn gdb_startup_fn __startup_fn ( STARTUP_NORMAL ) = { + .startup = gdb_symbol_line, +}; diff --git a/src/arch/i386/core/i386_timer.c b/src/arch/i386/core/i386_timer.c index 4764e21e..a87b4056 100644 --- a/src/arch/i386/core/i386_timer.c +++ b/src/arch/i386/core/i386_timer.c @@ -191,4 +191,6 @@ int timer2_running(void) #endif /* RTC_CURRTICKS */ -INIT_FN ( INIT_TIMERS, setup_timers, NULL ); +struct init_fn timer_init_fn __init_fn ( INIT_NORMAL ) = { + .initialise = setup_timers, +}; diff --git a/src/arch/i386/core/video_subr.c b/src/arch/i386/core/video_subr.c index cb7d1785..bf82cc61 100644 --- a/src/arch/i386/core/video_subr.c +++ b/src/arch/i386/core/video_subr.c @@ -99,4 +99,6 @@ struct console_driver vga_console __console_driver = { .disabled = 1, }; -INIT_FN ( INIT_CONSOLE, video_init, NULL ); +struct init_fn video_init_fn __init_fn ( INIT_EARLY ) = { + .initialise = video_init, +}; diff --git a/src/arch/i386/firmware/pcbios/hidemem.c b/src/arch/i386/firmware/pcbios/hidemem.c index c372246c..9a6dab84 100644 --- a/src/arch/i386/firmware/pcbios/hidemem.c +++ b/src/arch/i386/firmware/pcbios/hidemem.c @@ -18,6 +18,7 @@ #include <realmode.h> #include <biosint.h> #include <basemem.h> +#include <gpxe/init.h> #include <gpxe/hidemem.h> /** Alignment for hidden memory regions */ @@ -110,7 +111,7 @@ void hide_basemem ( void ) { * Installs an INT 15 handler to edit Etherboot out of the memory map * returned by the BIOS. */ -void hide_etherboot ( void ) { +static void hide_etherboot ( void ) { /* Initialise the hidden regions */ hide_text(); @@ -127,7 +128,7 @@ void hide_etherboot ( void ) { * Uninstalls the INT 15 handler installed by hide_etherboot(), if * possible. */ -void unhide_etherboot ( void ) { +static void unhide_etherboot ( void ) { /* If we have more than one hooked interrupt at this point, it * means that some other vector is still hooked, in which case @@ -147,3 +148,9 @@ void unhide_etherboot ( void ) { unhook_bios_interrupt ( 0x15, ( unsigned int ) int15, &int15_vector ); } + +/** Hide Etherboot startup function */ +struct startup_fn hide_etherboot_startup_fn __startup_fn ( EARLY_STARTUP ) = { + .startup = hide_etherboot, + .shutdown = unhide_etherboot, +}; diff --git a/src/arch/i386/image/bzimage.c b/src/arch/i386/image/bzimage.c index 41262e19..f023fcf1 100644 --- a/src/arch/i386/image/bzimage.c +++ b/src/arch/i386/image/bzimage.c @@ -34,7 +34,7 @@ #include <gpxe/image.h> #include <gpxe/segment.h> #include <gpxe/memmap.h> -#include <gpxe/shutdown.h> +#include <gpxe/init.h> #include <gpxe/initrd.h> struct image_type bzimage_image_type __image_type ( PROBE_NORMAL ); diff --git a/src/arch/i386/image/eltorito.c b/src/arch/i386/image/eltorito.c index 456a5100..53e25ca5 100644 --- a/src/arch/i386/image/eltorito.c +++ b/src/arch/i386/image/eltorito.c @@ -33,7 +33,7 @@ #include <gpxe/image.h> #include <gpxe/segment.h> #include <gpxe/ramdisk.h> -#include <gpxe/shutdown.h> +#include <gpxe/init.h> #define ISO9660_BLKSIZE 2048 #define ELTORITO_VOL_DESC_OFFSET ( 17 * ISO9660_BLKSIZE ) diff --git a/src/arch/i386/image/multiboot.c b/src/arch/i386/image/multiboot.c index a59927c8..71202460 100644 --- a/src/arch/i386/image/multiboot.c +++ b/src/arch/i386/image/multiboot.c @@ -32,7 +32,7 @@ #include <gpxe/segment.h> #include <gpxe/memmap.h> #include <gpxe/elf.h> -#include <gpxe/shutdown.h> +#include <gpxe/init.h> struct image_type multiboot_image_type __image_type ( PROBE_MULTIBOOT ); diff --git a/src/arch/i386/image/nbi.c b/src/arch/i386/image/nbi.c index 6084b21b..3a66e9cb 100644 --- a/src/arch/i386/image/nbi.c +++ b/src/arch/i386/image/nbi.c @@ -6,7 +6,7 @@ #include <basemem_packet.h> #include <gpxe/uaccess.h> #include <gpxe/segment.h> -#include <gpxe/shutdown.h> +#include <gpxe/init.h> #include <gpxe/netdevice.h> #include <gpxe/dhcp.h> #include <gpxe/image.h> |