summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2008-07-22 13:46:07 +0400
committerH. Peter Anvin <hpa@zytor.com>2008-07-22 12:58:02 -0400
commiteec9fe478cfcf9ba45455f68715cba4b57be7ea6 (patch)
treef3af335a9af1e5e2b3a037775872c549b9adc1a3
parentc86aca6b49cb335fba1f9cf96f1ce5b7d18dba2f (diff)
downloadsyslinux-eec9fe478cfcf9ba45455f68715cba4b57be7ea6.tar.gz
Fix loading of *.lkrn images from gPXE
Attempts to load *.lkrn images were failing with "Not enough memory to load specified image". These images have the su_ramdisk_max header field set to zero, and the code in core/runkernel.inc was limiting MyHighMemSize too early (before the load_high call used to load the main part of the kernel). Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/runkernel.inc13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/runkernel.inc b/core/runkernel.inc
index 4d627787..c7af6cc7 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:
;
@@ -291,6 +284,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