summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch')
-rw-r--r--meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch b/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
new file mode 100644
index 0000000000..fb03bbfe2c
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
@@ -0,0 +1,50 @@
1Upstream-Status: Backport [ba638fd9bf72b0c786c88909014136cfa641a147]
2Signed-off-by: Jonathan Liu <net147@gmail.com>
3
4From b663fd7257481438256f8267831dc10b06363b22 Mon Sep 17 00:00:00 2001
5From: Matt Fleming <matt.fleming@intel.com>
6Date: Tue, 16 Jul 2013 22:16:11 +0100
7Subject: [PATCH 1/4] movebits: Add SMT_TERMINAL - a last resort region type
8
9Some memory regions are usable, but only as a last resort just before we
10hand over control to a kernel image. Add the necessary movebits
11infrastructure to use these regions when all other options have been
12exhausted.
13
14Signed-off-by: Matt Fleming <matt.fleming@intel.com>
15
16Conflicts:
17 com32/lib/syslinux/zonelist.c
18---
19 com32/include/syslinux/movebits.h | 1 +
20 com32/lib/syslinux/movebits.c | 2 +-
21 2 files changed, 2 insertions(+), 1 deletion(-)
22
23diff --git a/com32/include/syslinux/movebits.h b/com32/include/syslinux/movebits.h
24index 8bcdf3e..114a896 100644
25--- a/com32/include/syslinux/movebits.h
26+++ b/com32/include/syslinux/movebits.h
27@@ -34,6 +34,7 @@ enum syslinux_memmap_types {
28 SMT_RESERVED, /* Unusable memory */
29 SMT_ALLOC, /* Memory allocated by user */
30 SMT_ZERO, /* Memory that should be zeroed */
31+ SMT_TERMINAL, /* Memory to be used as a last resort */
32 };
33
34 struct syslinux_memmap {
35diff --git a/com32/lib/syslinux/movebits.c b/com32/lib/syslinux/movebits.c
36index 7a05f3c..8ffdc63 100644
37--- a/com32/lib/syslinux/movebits.c
38+++ b/com32/lib/syslinux/movebits.c
39@@ -160,7 +160,7 @@ static const struct syslinux_memmap *is_free_zone(const struct syslinux_memmap
40 if (list->start <= start) {
41 if (llast >= last) {
42 /* Chunk has a single, well-defined type */
43- if (list->type == SMT_FREE) {
44+ if (list->type == SMT_FREE || list->type == SMT_TERMINAL) {
45 dprintf("F: 0x%08x bytes at 0x%08x\n",
46 list->next->start, list->start);
47 return list; /* It's free */
48--
491.8.5.3
50