From 4a8ddd8379527705ec8828c9c8e1c9b29a6a4152 Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Sun, 2 Feb 2014 15:58:52 +1100 Subject: syslinux: fix booting memtest86+ using pxelinux regression After syslinux was updated from 4.07 to 6.01, booting memtest86+ using pxelinux would fail: PXELINUX 6.01 2013-07-04 Copyright (C) 1994-2013 H. Peter Anvin et al Loading memtest86... ok Booting kernel failed: invalid argument This backports the necessary upstream patches to allow memtest86+ to boot using pxelinux again. [YOCTO #5501] (From OE-Core rev: ed9ccb8622b347173602be8b2126324d4fdf54d8) Signed-off-by: Jonathan Liu Signed-off-by: Richard Purdie --- ...s_fbm-and-real_base_mem-to-calculate-free.patch | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch (limited to 'meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch') diff --git a/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch b/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch new file mode 100644 index 0000000000..ee0a77237d --- /dev/null +++ b/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch @@ -0,0 +1,65 @@ +Upstream-Status: Backport [c0ea15936de8378d1da6843d3dbddd8dddba1011] +Signed-off-by: Jonathan Liu + +From f3347f9b09135d71a4effae1614b22dcdf16a7e2 Mon Sep 17 00:00:00 2001 +From: Matt Fleming +Date: Wed, 24 Jul 2013 18:33:14 +0100 +Subject: [PATCH 4/4] pxe: use bios_fbm() and real_base_mem to calculate free + space + +We don't need to individually add the PXE regions, we already have two +symbols that denote the memory region that will be freed when calling +unload_pxe(). + +This essentially reverts commit 03dda0f1 ("pxe: mark all PXE regions as +SMT_TERMINAL"). + +Signed-off-by: Matt Fleming + +Conflicts: + core/fs/pxe/bios.c +--- + core/fs/pxe/bios.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/core/fs/pxe/bios.c b/core/fs/pxe/bios.c +index 5f61824..ffdffaf 100644 +--- a/core/fs/pxe/bios.c ++++ b/core/fs/pxe/bios.c +@@ -94,24 +94,24 @@ static const struct pxenv_t *memory_scan_for_pxenv_struct(void) + + static int pxelinux_scan_memory(scan_memory_callback_t callback, void *data) + { ++ addr_t start, size; + int rv = 0; + ++ if (KeepPXE) ++ return 0; ++ + /* + * If we are planning on calling unload_pxe() and unmapping the PXE + * region before we transfer control away from PXELINUX we can mark + * that region as SMT_TERMINAL to indicate that the region will + * become free at some point in the future. + */ +- if (!KeepPXE) { +- dprintf("Marking PXE code region 0x%x - 0x%x as SMT_TERMINAL\n", +- pxe_code_start, pxe_code_start + pxe_code_size); +- rv = callback(data, pxe_code_start, pxe_code_size, SMT_TERMINAL); +- +- dprintf("Marking PXE data region 0x%x - 0x%x as SMT_TERMINAL\n", +- pxe_data_start, pxe_data_start + pxe_data_size); +- rv = callback(data, pxe_data_start, pxe_data_size, SMT_TERMINAL); +- } ++ start = bios_fbm() << 10; ++ size = (real_base_mem - bios_fbm()) << 10; ++ dprintf("Marking PXE region 0x%x - 0x%x as SMT_TERMINAL\n", ++ start, start + size); + ++ callback(data, start, size, SMT_TERMINAL); + return rv; + } + +-- +1.8.5.3 + -- cgit v1.2.3-54-g00ecf