summaryrefslogtreecommitdiffstats
path: root/src/arch/i386
diff options
context:
space:
mode:
authorMichael Brown2007-07-04 04:23:02 +0200
committerMichael Brown2007-07-04 04:23:02 +0200
commitac69b85adb8f3f58e2b9eb70bedf69de5c820934 (patch)
treed8a384ea48adf6c2e2b61bc914919ad1e146e5e1 /src/arch/i386
parent!PXE and PXENV+ structures are in code segment, not data segment. (diff)
downloadipxe-ac69b85adb8f3f58e2b9eb70bedf69de5c820934.tar.gz
ipxe-ac69b85adb8f3f58e2b9eb70bedf69de5c820934.tar.xz
ipxe-ac69b85adb8f3f58e2b9eb70bedf69de5c820934.zip
UNDI loader entry point implemented; seems to work.
Diffstat (limited to 'src/arch/i386')
-rw-r--r--src/arch/i386/prefix/romprefix.S28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
index 520016996..f68c14e03 100644
--- a/src/arch/i386/prefix/romprefix.S
+++ b/src/arch/i386/prefix/romprefix.S
@@ -167,6 +167,34 @@ exec_message:
* Called by an external program to load our PXE stack.
*/
undiloader:
+ /* Save registers */
+ pushl %edi
+ pushw %es
+ pushw %bx
+ /* UNDI loader parameter structure address into %es:%di */
+ movw %sp, %bx
+ movw %ss:12(%bx), %di
+ movw %ss:14(%bx), %es
+ /* Install to specified real-mode addresses */
+ pushw %di
+ movw %es:12(%di), %bx
+ movw %es:14(%di), %ax
+ call install_prealloc
+ popw %di
+ /* Call UNDI loader C code */
+ pushl $pxe_loader_call
+ pushw %cs
+ pushw $1f
+ pushw %ax
+ pushw $prot_call
+ lret
+1: popw %bx /* discard */
+ popw %bx /* discard */
+ /* Restore registers and return */
+ popw %bx
+ popw %es
+ popl %edi
+ lret
.size undiloader, . - undiloader
/* Utility function: print string