aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-06-07 17:06:59 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-06-07 17:06:59 -0700
commit0a4a533cc1c0e0c7e526f454d29b416bb580df0f (patch)
tree0573707a52470aa3e6cdbb7fd786e918ba0147b5 /memdisk
parent4d9aad915bb3ee96c2674ab5678e435ea9e6245e (diff)
downloadsyslinux.git-0a4a533cc1c0e0c7e526f454d29b416bb580df0f.tar.gz
syslinux.git-0a4a533cc1c0e0c7e526f454d29b416bb580df0f.tar.xz
syslinux.git-0a4a533cc1c0e0c7e526f454d29b416bb580df0f.zip
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 <hpa@zytor.com>
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/memdisk16.asm5
1 files changed, 4 insertions, 1 deletions
diff --git a/memdisk/memdisk16.asm b/memdisk/memdisk16.asm
index b020c705..e8e5d78d 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: