summaryrefslogtreecommitdiff
path: root/com32/lib/syslinux
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-04-11 13:58:57 +0100
committerMatt Fleming <matt.fleming@intel.com>2013-04-11 13:58:57 +0100
commitbb229372b2c3f9fbb0cdd0a7221a6cc4aba5d2ed (patch)
tree9b41a8efcf5a1471fe1f2cd7606af6b169e67581 /com32/lib/syslinux
parentbbc178dc9f7431779a8a4572a24e3c3aaf870d07 (diff)
parentf16d2c170888fb416a7b376eb0a29dd3f7cced24 (diff)
downloadsyslinux-bb229372b2c3f9fbb0cdd0a7221a6cc4aba5d2ed.tar.gz
Merge remote-tracking branch 'zytor/elflink' into for-hpa/elflink/firmware
Conflicts: core/Makefile core/fs/pxe/pxe.h
Diffstat (limited to 'com32/lib/syslinux')
-rw-r--r--com32/lib/syslinux/load_linux.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index ea5033e1..aea03058 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -266,7 +266,8 @@ int bios_boot_linux(void *kernel_buf, size_t kernel_size,
/* Place the kernel in memory */
/* First, find a suitable place for the protected-mode code */
- if (syslinux_memmap_type(amap, prot_mode_base, prot_mode_size)
+ if (prot_mode_size &&
+ syslinux_memmap_type(amap, prot_mode_base, prot_mode_size)
!= SMT_FREE) {
const struct syslinux_memmap *mp;
if (!hdr.relocatable_kernel)
@@ -365,12 +366,15 @@ int bios_boot_linux(void *kernel_buf, size_t kernel_size,
}
/* Protected-mode code */
- if (syslinux_add_movelist(&fraglist, prot_mode_base,
- (addr_t) kernel_buf + real_mode_size,
- prot_mode_size))
- goto bail;
- if (syslinux_add_memmap(&amap, prot_mode_base, prot_mode_size, SMT_ALLOC))
- goto bail;
+ if (prot_mode_size) {
+ if (syslinux_add_movelist(&fraglist, prot_mode_base,
+ (addr_t) kernel_buf + real_mode_size,
+ prot_mode_size))
+ goto bail;
+ if (syslinux_add_memmap(&amap, prot_mode_base, prot_mode_size,
+ SMT_ALLOC))
+ goto bail;
+ }
/* Figure out the size of the initramfs, and where to put it.
We should put it at the highest possible address which is