浏览代码

BSS is now zeroed by libprefix (along with the otherwise non-zeroable

portions such as the stack) during the installation process.

init_fns() are called from main().  We need to think about initial
control flow some more.
tags/v0.9.3
Michael Brown 18 年前
父节点
当前提交
f8f75cef5b
共有 2 个文件被更改,包括 3 次插入18 次删除
  1. 0
    3
      src/arch/i386/prefix/dskprefix.S
  2. 3
    15
      src/core/main.c

+ 0
- 3
src/arch/i386/prefix/dskprefix.S 查看文件

356
 	lret
356
 	lret
357
 	.section ".text16", "awx", @progbits
357
 	.section ".text16", "awx", @progbits
358
 1:
358
 1:
359
-	pushl	$initialise
360
-	data32 call	prot_call
361
-	popl	%eax /* discard */
362
 	pushl	$main
359
 	pushl	$main
363
 	data32 call	prot_call
360
 	data32 call	prot_call
364
 	popl	%eax /* discard */
361
 	popl	%eax /* discard */

+ 3
- 15
src/core/main.c 查看文件

141
 static int initialized;
141
 static int initialized;
142
 
142
 
143
 
143
 
144
-/**************************************************************************
145
- * initialise() - perform any C-level initialisation
146
- *
147
- * This does not include initialising the NIC, but it does include
148
- * e.g. getting the memory map, relocating to high memory,
149
- * initialising the console, etc.
150
- **************************************************************************
151
- */
152
-void initialise ( void ) {
153
-	/* Zero the BSS */
154
-	memset ( _bss, 0, _ebss - _bss );
155
-
156
-	/* Call all registered initialisation functions */
157
-	call_init_fns ();
158
-}
159
 
144
 
160
 /**************************************************************************
145
 /**************************************************************************
161
 MAIN - Kick off routine
146
 MAIN - Kick off routine
165
 	void *image_context;
150
 	void *image_context;
166
 	int skip = 0;
151
 	int skip = 0;
167
 
152
 
153
+	/* Call all registered initialisation functions */
154
+	call_init_fns ();
155
+
168
 	/* Print out configuration */
156
 	/* Print out configuration */
169
 	print_config();
157
 	print_config();
170
 
158
 

正在加载...
取消
保存