Package: grub
Version: 0.94 CVS
Author: Guillem Jover <guillem@debian.org>
Status: fixed
Description:
 Preserve %ebp on stop_floppy, otherwise it was causing C code calling
 this to lose the stack.

Index: stage2/asm.S
===================================================================
RCS file: /cvsroot/grub/grub/stage2/asm.S,v
retrieving revision 1.70
diff -u -r1.70 asm.S
--- stage2/asm.S	27 Mar 2004 17:02:54 -0000	1.70
+++ stage2/asm.S	23 May 2004 13:52:42 -0000
@@ -211,6 +211,9 @@
  * jumped to with a known state.
  */
 ENTRY(stop_floppy)
+	pushl	%ebp
+	movl	%esp, %ebp
+
 	call	EXT_C(prot_to_real)
 	.code16
 	pusha
@@ -219,6 +222,9 @@
 	popa
 	DATA32  call EXT_C(real_to_prot)
 	.code32
+
+	leal	0x8(%esp), %ebp
+	popl	%ebp
 	ret
 
 /*
