mboot: align the stack to a 16-byte boundary
authorH. Peter Anvin <hpa@zytor.com>
Sat, 2 May 2009 20:55:42 +0000 (13:55 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 2 May 2009 20:55:42 +0000 (13:55 -0700)
Align the stack to a 16-byte boundary, just in case...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/mboot/map.c

index 4c5eca2..a84fc23 100644 (file)
@@ -312,7 +312,7 @@ static void mboot_map_stack(void)
   if (syslinux_memmap_largest(amap, SMT_FREE, &start, &len) || len < 64)
     return;                    /* Not much we can do, here... */
 
-  regs.esp = (start+len-32) & ~7;
+  regs.esp = (start+len-32) & ~15;
   dprintf("Mapping stack at 0x%08x\n", regs.esp);
   syslinux_add_memmap(&mmap, regs.esp, 32, SMT_ZERO);
 }