[syslinux] [PATCH 1/3] Fix loading of *.lkrn images from gPXE
Sergey Vlasov
vsu at altlinux.ru
Tue Jul 22 02:46:07 PDT 2008
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 at altlinux.ru>
---
core/runkernel.inc | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/core/runkernel.inc b/core/runkernel.inc
index 4d62778..c7af6cc 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
--
1.5.6.2.305.g2938b
More information about the Syslinux
mailing list