Browse Source

(Redoing check-in lost by SourceForge's failure.)

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
568cad0ddc
4 changed files with 0 additions and 130 deletions
  1. 0
    32
      src/arch/i386/core/hooks.c
  2. 0
    6
      src/arch/i386/include/hooks.h
  3. 0
    26
      src/arch/i386/include/relocate.h
  4. 0
    66
      src/include/init.h

+ 0
- 32
src/arch/i386/core/hooks.c View File

@@ -1,32 +0,0 @@
1
-#include "registers.h"
2
-#include "main.h"
3
-#include "hooks.h"
4
-
5
-/*
6
- * This file provides the basic entry points from assembly code.  See
7
- * README.i386 for a description of the entry code path.
8
- *
9
- */
10
-
11
-/*
12
- * arch_main() : call main() and then exit via whatever exit mechanism
13
- * the prefix requested.
14
- *
15
- */
16
-void arch_main ( struct i386_all_regs *ix86 ) {
17
-	void (*exit_path) ( struct i386_all_regs *ix86 );
18
-
19
-	/* Determine exit path requested by prefix */
20
-	exit_path = ( typeof ( exit_path ) ) ix86->regs.eax;
21
-
22
-	/* Call to main() */
23
-	ix86->regs.eax = main();
24
-
25
-	if ( exit_path ) {
26
-		/* Prefix requested that we use a particular function
27
-		 * as the exit path, so we call this function, which
28
-		 * must not return.
29
-		 */
30
-		exit_path ( ix86 );
31
-	}
32
-}

+ 0
- 6
src/arch/i386/include/hooks.h View File

@@ -1,6 +0,0 @@
1
-#ifndef HOOKS_H
2
-#define HOOKS_H
3
-
4
-extern void arch_main ( struct i386_all_regs *ix86 );
5
-
6
-#endif /* HOOKS_H */

+ 0
- 26
src/arch/i386/include/relocate.h View File

@@ -1,26 +0,0 @@
1
-#ifndef RELOCATE_H
2
-#define RELOCATE_H
3
-
4
-/* relocate() is conceptually impossible with KEEP_IT_REAL */
5
-#ifndef KEEP_IT_REAL
6
-
7
-#include <gpxe/tables.h>
8
-
9
-/* An entry in the post-relocation function table */
10
-struct post_reloc_fn {
11
-	void ( *post_reloc ) ( void );
12
-};
13
-
14
-/* Use double digits to avoid problems with "10" < "9" on alphabetic sort */
15
-#define POST_RELOC_LIBRM	00
16
-
17
-/* Macro for creating a post-relocation function table entry */
18
-#define POST_RELOC_FN( order, post_reloc_func )			\
19
-	struct post_reloc_fn PREFIX_OBJECT(post_reloc_fn__)	\
20
-	    __table ( post_reloc_fn, order ) = {		\
21
-		.post_reloc = post_reloc_func,			\
22
-	};
23
-
24
-#endif
25
-
26
-#endif /* RELOCATE_H */

+ 0
- 66
src/include/init.h View File

@@ -1,66 +0,0 @@
1
-#ifndef INIT_H
2
-#define INIT_H
3
-
4
-#include "stddef.h" /* for NULL */
5
-#include <gpxe/tables.h>
6
-
7
-/*
8
- * In order to avoid having objects dragged in just because main()
9
- * calls their initialisation function, we allow each object to
10
- * specify that it has a function that must be called to initialise
11
- * that object.  The function call_init_fns() will call all the
12
- * included objects' initialisation functions.
13
- *
14
- * Objects that require initialisation should include init.h and
15
- * register the initialisation function using INIT_FN().
16
- *
17
- * Objects may register up to three functions: init, reset and exit.
18
- * init gets called only once, at the point that Etherboot is
19
- * initialised (before the call to main()).  reset gets called between
20
- * each boot attempt.  exit gets called only once, just before the
21
- * loaded OS starts up (or just before Etherboot exits, if it exits,
22
- * or when the PXE NBP calls UNDI_SHUTDOWN, if it's a PXE NBP).
23
- *
24
- * The syntax is:
25
- *   INIT_FN ( init_order, init_function, reset_function, exit_function );
26
- * where init_order is an ordering taken from the list below.  Any
27
- * function may be left as NULL.
28
- */
29
-
30
-/* An entry in the initialisation function table */
31
-
32
-struct init_fn {
33
-	void ( *init ) ( void );
34
-	void ( *reset ) ( void );
35
-	void ( *exit ) ( void );
36
-};
37
-
38
-/* Use double digits to avoid problems with "10" < "9" on alphabetic sort */
39
-#define	INIT_LIBRM	01
40
-#define	INIT_CONSOLE	02
41
-#define	INIT_CPU	03
42
-#define	INIT_TIMERS	04
43
-#define	INIT_PCIBIOS	05
44
-#define	INIT_MEMSIZES	06
45
-#define	INIT_RELOCATE	07
46
-#define	INIT_LOADBUF	08
47
-#define	INIT_PCMCIA	09
48
-#define	INIT_HEAP	10
49
-#define	INIT_RPC	11
50
-
51
-/* Macro for creating an initialisation function table entry */
52
-#define INIT_FN( init_order, init_func, reset_func, exit_func )	\
53
-	struct init_fn PREFIX_OBJECT(init_fn__)			\
54
-	    __table ( init_fn, init_order ) = {			\
55
-		.init = init_func,				\
56
-		.reset = reset_func,				\
57
-		.exit = exit_func,				\
58
-	};
59
-
60
-/* Function prototypes */
61
-
62
-void call_init_fns ( void );
63
-void call_reset_fns ( void );
64
-void call_exit_fns ( void );
65
-
66
-#endif /* INIT_H */

Loading…
Cancel
Save