Browse Source

UNDI loader entry point implemented; seems to work.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
ac69b85adb
1 changed files with 28 additions and 0 deletions
  1. 28
    0
      src/arch/i386/prefix/romprefix.S

+ 28
- 0
src/arch/i386/prefix/romprefix.S View File

167
  * Called by an external program to load our PXE stack.
167
  * Called by an external program to load our PXE stack.
168
  */
168
  */
169
 undiloader:
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
 	.size undiloader, . - undiloader
198
 	.size undiloader, . - undiloader
171
 				
199
 				
172
 /* Utility function: print string
200
 /* Utility function: print string

Loading…
Cancel
Save