board.d: merge ucidef_add_switch() and ucidef_add_switch_ports()
[openwrt/openwrt.git] / target / linux / malta / patches / 330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
1 From 79c7301c922f5023f85805a4ba969ce55f51d0ca Mon Sep 17 00:00:00 2001
2 From: Yousong Zhou <yszhou4tech@gmail.com>
3 Date: Sat, 31 Jan 2015 15:13:12 +0800
4 Subject: [PATCH 330/331] MIPS: Malta: Mark kernel code and kernel data
5 segments as BOOT_MEM_RAM.
6
7 Kexec-tools requires those segments listed as "System RAM" in
8 /proc/iomem, otherwise, an error message of "Invalid memory segment"
9 will be emitted when trying to load the ELF kernel image.
10
11 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
12 ---
13 arch/mips/mti-malta/malta-memory.c | 9 ++-------
14 1 file changed, 2 insertions(+), 7 deletions(-)
15
16 --- a/arch/mips/mti-malta/malta-memory.c
17 +++ b/arch/mips/mti-malta/malta-memory.c
18 @@ -112,14 +112,9 @@ fw_memblock_t * __init fw_getmdesc(int e
19 mdesc[2].base = mdesc[0].base + 0x000f0000UL;
20 mdesc[2].size = 0x00010000;
21
22 - mdesc[3].type = fw_dontuse;
23 + mdesc[3].type = fw_free;
24 mdesc[3].base = mdesc[0].base + 0x00100000UL;
25 - mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)&_end)) -
26 - 0x00100000UL;
27 -
28 - mdesc[4].type = fw_free;
29 - mdesc[4].base = mdesc[0].base + CPHYSADDR(PFN_ALIGN(&_end));
30 - mdesc[4].size = memsize - CPHYSADDR(mdesc[4].base);
31 + mdesc[3].size = memsize - CPHYSADDR(mdesc[3].base);
32
33 return &mdesc[0];
34 }