From: H. Peter Anvin Date: Mon, 8 Jun 2009 00:06:59 +0000 (-0700) Subject: memdisk: set up a limited-size real-mode stack X-Git-Tag: syslinux-3.83-pre2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a4a533cc1c0e0c7e526f454d29b416bb580df0f;p=profile%2Fivi%2Fsyslinux.git memdisk: set up a limited-size real-mode stack Limit the size of the real-mode stack. This should limit the amount of memory needed for a relocated real-mode code. Signed-off-by: H. Peter Anvin --- diff --git a/memdisk/memdisk16.asm b/memdisk/memdisk16.asm index b020c70..e8e5d78 100644 --- a/memdisk/memdisk16.asm +++ b/memdisk/memdisk16.asm @@ -33,6 +33,9 @@ BOUNCE_SEG equ (MY_CS+0x1000) section .rodata align=16 section .data align=16 section .bss align=16 + section .stack align=16 nobits +stack resb 512 +stack_end equ $ ;; ----------------------------------------------------------------------- ;; Kernel image header @@ -107,7 +110,7 @@ start: rep movsd mov ds,ax mov ss,ax - xor esp,esp ; Stack at top of 64K segment + mov esp,stack_end jmp MY_CS:.next .next: