summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/prefix/pxeprefix.S
diff options
context:
space:
mode:
authorMichael Brown2007-01-29 16:21:10 +0100
committerMichael Brown2007-01-29 16:21:10 +0100
commit7d9267561b6ece59624e7dc0d521535d56278646 (patch)
tree45751d67c36f6927331646f71dd5e20d6a82697c /src/arch/i386/prefix/pxeprefix.S
parentSplit bootsector execution code out into bootsector.c. (diff)
downloadipxe-7d9267561b6ece59624e7dc0d521535d56278646.tar.gz
ipxe-7d9267561b6ece59624e7dc0d521535d56278646.tar.xz
ipxe-7d9267561b6ece59624e7dc0d521535d56278646.zip
Don't call PXENV_STOP_UNDI in the kpxeprefix. This slighy breaks the
clean separation between loading and starting, but does mean that more PXE stacks survive the process.
Diffstat (limited to 'src/arch/i386/prefix/pxeprefix.S')
-rw-r--r--src/arch/i386/prefix/pxeprefix.S15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/arch/i386/prefix/pxeprefix.S b/src/arch/i386/prefix/pxeprefix.S
index 8c091df6..ca1a00c9 100644
--- a/src/arch/i386/prefix/pxeprefix.S
+++ b/src/arch/i386/prefix/pxeprefix.S
@@ -10,6 +10,8 @@
.section ".prefix.data", "aw", @progbits
.code16
+#include <undi.h>
+
/*****************************************************************************
* Entry point: set operating context, print welcome message
*****************************************************************************
@@ -278,6 +280,7 @@ unload_base_code:
* Unload UNDI driver
*****************************************************************************
*/
+#ifndef PXELOADER_KEEP_UNDI
unload_undi:
/* Issue PXENV_STOP_UNDI */
movw $PXENV_STOP_UNDI, %bx
@@ -286,12 +289,13 @@ unload_undi:
call print_pxe_error
jmp 99f
1: /* Free base memory used by UNDI */
-#ifndef PXELOADER_KEEP_UNDI
movw undi_fbms_start, %si
movw undi_fbms_end, %di
call free_basemem
-#endif /* PXELOADER_KEEP_UNDI */
+ /* Clear UNDI_FL_STARTED */
+ andw $~UNDI_FL_STARTED, flags
99:
+#endif /* PXELOADER_KEEP_UNDI */
/*****************************************************************************
* Print remaining free base memory
@@ -678,12 +682,13 @@ entry_segment: .word 0
undi_fbms_start: .word 0
undi_fbms_end: .word 0
-pci_busdevfn: .word 0xffff
-isapnp_csn: .word 0xffff
-isapnp_read_port: .word 0xffff
+pci_busdevfn: .word UNDI_NO_PCI_BUSDEVFN
+isapnp_csn: .word UNDI_NO_ISAPNP_CSN
+isapnp_read_port: .word UNDI_NO_ISAPNP_READ_PORT
pci_vendor: .word 0
pci_device: .word 0
+flags: .word UNDI_FL_STARTED
.equ undi_device_size, ( . - undi_device )