summaryrefslogtreecommitdiffstats
path: root/pxe.S
diff options
context:
space:
mode:
Diffstat (limited to 'pxe.S')
-rw-r--r--pxe.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/pxe.S b/pxe.S
index 98d8b98..932757c 100644
--- a/pxe.S
+++ b/pxe.S
@@ -23,6 +23,18 @@ _main:
ljmp $BOOTSEG, $pxe_start
pxe_start:
+ /* Preserve registers, %ss:%esp, and magic marker on PXE stack */
+ pushfl
+ pushal
+ pushw %gs
+ pushw %fs
+ pushw %es
+ pushw %ds
+ pushl %esp
+ pushw %ss
+ pushw %ax /* Padding */
+ pushl $EXIT_MAGIC
+
/* Store PXENV+ entry point */
movl %es:PXENV_ENTRY(%bx), %eax
movl %eax, %cs:pxenv_vector