330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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. Kexec-tools requires those segments listed as "System RAM" in
  7. /proc/iomem, otherwise, an error message of "Invalid memory segment"
  8. will be emitted when trying to load the ELF kernel image.
  9. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  10. ---
  11. arch/mips/mti-malta/malta-memory.c | 9 ++-------
  12. 1 file changed, 2 insertions(+), 7 deletions(-)
  13. --- a/arch/mips/mti-malta/malta-memory.c
  14. +++ b/arch/mips/mti-malta/malta-memory.c
  15. @@ -112,14 +112,9 @@ fw_memblock_t * __init fw_getmdesc(int e
  16. mdesc[2].base = mdesc[0].base + 0x000f0000UL;
  17. mdesc[2].size = 0x00010000;
  18. - mdesc[3].type = fw_dontuse;
  19. + mdesc[3].type = fw_free;
  20. mdesc[3].base = mdesc[0].base + 0x00100000UL;
  21. - mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)&_end)) -
  22. - 0x00100000UL;
  23. -
  24. - mdesc[4].type = fw_free;
  25. - mdesc[4].base = mdesc[0].base + CPHYSADDR(PFN_ALIGN(&_end));
  26. - mdesc[4].size = memsize - CPHYSADDR(mdesc[4].base);
  27. + mdesc[3].size = memsize - CPHYSADDR(mdesc[3].base);
  28. return &mdesc[0];
  29. }