shuffler: fix setting up esp in real-mode shuffles
authorH. Peter Anvin <hpa@zytor.com>
Tue, 5 May 2009 00:13:16 +0000 (17:13 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 5 May 2009 00:13:16 +0000 (17:13 -0700)
The value of esp set in real-mode shuffles was wrong.  This
unfortunately broke linux.c32 :(

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/lib/syslinux/shuffle_rm.c

index 5d79cad..ccb4f95 100644 (file)
@@ -144,7 +144,7 @@ int syslinux_shuffle_boot_rm(struct syslinux_movelist *fraglist,
 
   /* Load SS and ESP immediately */
   MOV_TO_SEG(p, R_SS, R_BX);
-  MOV_TO_R32(p, R_SP, rp->seg[R_SP]);
+  MOV_TO_R32(p, R_SP, rp->gpr[R_SP]);
 
   /* Load the other segments */
   MOV_TO_SEG(p, R_ES, R_CX);