summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2005-04-10 20:30:34 +0200
committerMichael Brown2005-04-10 20:30:34 +0200
commit87508aa0b2e0fea5d4dea8d732150bd2fdbbb9f8 (patch)
tree88771e2c14fad3a6a7c63e74088c0ba266263ca5 /src/arch
parentUse librm_arch_initialise for librm, arch_initialise for others. (diff)
downloadipxe-87508aa0b2e0fea5d4dea8d732150bd2fdbbb9f8.tar.gz
ipxe-87508aa0b2e0fea5d4dea8d732150bd2fdbbb9f8.tar.xz
ipxe-87508aa0b2e0fea5d4dea8d732150bd2fdbbb9f8.zip
arch_initialise() is now sufficiently generic that we may as well just
call it initialise() and place it in main.c. :)
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/core/hooks.c21
-rw-r--r--src/arch/i386/core/setup.S12
-rw-r--r--src/arch/i386/include/hooks.h1
-rw-r--r--src/arch/i386/transitions/librm_mgmt.c6
4 files changed, 9 insertions, 31 deletions
diff --git a/src/arch/i386/core/hooks.c b/src/arch/i386/core/hooks.c
index 75066691a..230cc4010 100644
--- a/src/arch/i386/core/hooks.c
+++ b/src/arch/i386/core/hooks.c
@@ -1,8 +1,4 @@
-#include "stdint.h"
-#include "stddef.h"
#include "registers.h"
-#include "string.h"
-#include "init.h"
#include "main.h"
#include "etherboot.h"
#include "hooks.h"
@@ -17,20 +13,6 @@ extern char _bss[], _ebss[];
*/
/*
- * arch_initialise(): perform any required initialisation such as
- * setting up the console device and relocating to high memory.
- *
- */
-void arch_initialise ( struct i386_all_regs *regs __unused ) {
- /* Zero the BSS */
- memset ( _bss, 0, _ebss - _bss );
-
- /* Call all registered initialisation functions.
- */
- call_init_fns ();
-}
-
-/*
* arch_main() : call main() and then exit via whatever exit mechanism
* the prefix requested.
*
@@ -44,9 +26,6 @@ void arch_main ( struct i386_all_regs *regs ) {
/* Call to main() */
regs->eax = main();
- /* Call registered per-object exit functions */
- call_exit_fns ();
-
if ( exit_path ) {
/* Prefix requested that we use a particular function
* as the exit path, so we call this function, which
diff --git a/src/arch/i386/core/setup.S b/src/arch/i386/core/setup.S
index 26aa23200..11b288800 100644
--- a/src/arch/i386/core/setup.S
+++ b/src/arch/i386/core/setup.S
@@ -40,7 +40,7 @@
#define RETURN_TO_EXTERNAL call kir_to_ext
#define ENTRY_POINT kir_call
#define ENTRY_POINT_REGISTER di
-#define INIT_FUNC arch_initialise
+#define INIT_FUNC initialise
#else /* KEEP_IT_REAL */
@@ -53,7 +53,7 @@
.code16
#define ENTRY_POINT _prot_call /* _prot_call = OFFSET ( prot_call ) in librm */
#define ENTRY_POINT_REGISTER di
-#define INIT_FUNC librm_arch_initialise
+#define INIT_FUNC initialise_via_librm
#endif /* KEEP_IT_REAL */
@@ -78,7 +78,7 @@ setup16:
#define RETURN_TO_EXTERNAL call int_to_ext
#define ENTRY_POINT int_call
#define ENTRY_POINT_REGISTER edi
-#define INIT_FUNC arch_initialise
+#define INIT_FUNC initialise
.section ".text"
.code32
@@ -142,11 +142,11 @@ setup:
pop %es
mov $ENTRY_POINT, %ENTRY_POINT_REGISTER
- /* Far call to arch_initialise via the entry-point function.
- * arch_initialise() (or the entry-point function itself) may
+ /* Far call to initialise via the entry-point function.
+ * initialise() (or the entry-point function itself) may
* update %es:[e]di to point to a new entry-point function for
* subsequent calls. librm will use this facility, since
- * arch_initialise() causes librm to be relocated.
+ * initialise() causes librm to be relocated.
*/
pushl $INIT_FUNC
push %cs /* lcall %es:[x]di == %cs:[x]di */
diff --git a/src/arch/i386/include/hooks.h b/src/arch/i386/include/hooks.h
index 879148e46..95b9aaa36 100644
--- a/src/arch/i386/include/hooks.h
+++ b/src/arch/i386/include/hooks.h
@@ -1,7 +1,6 @@
#ifndef HOOKS_H
#define HOOKS_H
-extern void arch_initialise ( struct i386_all_regs *regs );
extern void arch_main ( struct i386_all_regs *regs );
#endif /* HOOKS_H */
diff --git a/src/arch/i386/transitions/librm_mgmt.c b/src/arch/i386/transitions/librm_mgmt.c
index c8455cba3..f59941b2f 100644
--- a/src/arch/i386/transitions/librm_mgmt.c
+++ b/src/arch/i386/transitions/librm_mgmt.c
@@ -126,16 +126,16 @@ INIT_FN ( INIT_LIBRM, librm_init, NULL, uninstall_librm );
POST_RELOC_FN ( POST_RELOC_LIBRM, librm_post_reloc );
/*
- * Wrapper for arch_initialise() when librm is being used. We have to
+ * Wrapper for initialise() when librm is being used. We have to
* install a copy of librm to allocated base memory and return the
* pointer to this new librm's entry point via es:di.
*
*/
-void librm_arch_initialise ( struct i386_all_regs *regs ) {
+void initialise_via_librm ( struct i386_all_regs *regs ) {
char *new_librm;
/* Hand off to arch_initialise() */
- arch_initialise ( regs );
+ initialise ( regs );
/* Uninstall current librm (i.e. the one that's part of the
* original, pre-relocation Etherboot image).