瀏覽代碼

UNDI loader entry point implemented; seems to work.

tags/v0.9.3
Michael Brown 17 年之前
父節點
當前提交
ac69b85adb
共有 1 個檔案被更改,包括 28 行新增0 行删除
  1. 28
    0
      src/arch/i386/prefix/romprefix.S

+ 28
- 0
src/arch/i386/prefix/romprefix.S 查看文件

@@ -167,6 +167,34 @@ exec_message:
167 167
  * Called by an external program to load our PXE stack.
168 168
  */
169 169
 undiloader:
170
+	/* Save registers */
171
+	pushl	%edi
172
+	pushw	%es
173
+	pushw	%bx
174
+	/* UNDI loader parameter structure address into %es:%di */
175
+	movw	%sp, %bx
176
+	movw	%ss:12(%bx), %di
177
+	movw	%ss:14(%bx), %es
178
+	/* Install to specified real-mode addresses */
179
+	pushw	%di
180
+	movw	%es:12(%di), %bx
181
+	movw	%es:14(%di), %ax
182
+	call	install_prealloc
183
+	popw	%di
184
+	/* Call UNDI loader C code */
185
+	pushl	$pxe_loader_call
186
+	pushw	%cs
187
+	pushw	$1f
188
+	pushw	%ax
189
+	pushw	$prot_call
190
+	lret
191
+1:	popw	%bx	/* discard */
192
+	popw	%bx	/* discard */
193
+	/* Restore registers and return */
194
+	popw	%bx
195
+	popw	%es
196
+	popl	%edi
197
+	lret
170 198
 	.size undiloader, . - undiloader
171 199
 				
172 200
 /* Utility function: print string

Loading…
取消
儲存