memdisk: don't use the stack before bootstrap
authorH. Peter Anvin <hpa@zytor.com>
Tue, 9 Jun 2009 18:34:00 +0000 (11:34 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 9 Jun 2009 18:34:00 +0000 (11:34 -0700)
Under some certain circumstances, it might not be safe to use the
stack as it was set up, so use a jump instead of a call to invoke the
bootstrap.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
memdisk/memdisk16.asm

index 0c5b997..6bafae7 100644 (file)
@@ -159,8 +159,7 @@ copy_cmdline:
                mov gs,si
                lss sp,[cs:b_sssp]
                movzx esp,sp
-               call far [cs:b_csip]
-               int 18h                 ; A far return -> INT 18h
+               jmp far [cs:b_csip]
 
 ;
 ; We enter protected mode, set up a flat 32-bit environment, run rep movsd