diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-07-22 13:01:25 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-22 13:01:25 -0400 |
commit | d5eb656b72ecb848a8ee6f2325544562fac86ba8 (patch) | |
tree | 22f6d880831116542de150fdc5dcc7452f5d0179 /core/runkernel.inc | |
parent | b0c48fa752e102e4cff728e963a14c81f23a6022 (diff) | |
parent | a8641f9842da20ad9c80ad28db8c10cdaaddfd55 (diff) | |
download | syslinux-gpxeiso.tar.gz |
Merge branch 'master' into gpxeisogpxeiso
Diffstat (limited to 'core/runkernel.inc')
-rw-r--r-- | core/runkernel.inc | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/core/runkernel.inc b/core/runkernel.inc index 4d627787..143920d0 100644 --- a/core/runkernel.inc +++ b/core/runkernel.inc @@ -216,13 +216,6 @@ new_kernel: mov al,[es:su_loadflags] mov [LoadFlags],al - ; Cap the ramdisk memory range if appropriate - mov eax,[RamdiskMax] - cmp eax,[MyHighMemSize] - ja .ok - mov [MyHighMemSize],eax -.ok: - any_kernel: ; @@ -277,6 +270,7 @@ high_load_done: ; if they see protected-mode kernel data after the setup sectors, so ; clear that memory. ; + push di mov di,[SetupSecs] shl di,9 xor eax,eax @@ -284,6 +278,7 @@ high_load_done: sub cx,di shr cx,2 rep stosd + pop di ; ; Now see if we have an initial RAMdisk; if so, do requisite computation @@ -291,6 +286,12 @@ high_load_done: ; if we tried to load initrd using an old kernel ; load_initrd: + ; Cap the ramdisk memory range if appropriate + mov eax,[RamdiskMax] + cmp eax,[MyHighMemSize] + ja .ok + mov [MyHighMemSize],eax +.ok: xor eax,eax cmp [InitRDPtr],ax jz .noinitrd @@ -598,12 +599,6 @@ loadinitrd: mov si,crlf_msg jmp abort_load -no_high_mem: ; Error routine - mov si,err_nohighmem - jmp abort_load - - ret - section .data crlfloading_msg db CR, LF loading_msg db 'Loading ', 0 |