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

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 79c7301c922f5023f85805a4ba969ce55f51d0ca Mon Sep 17 00:00:00 2001
  2. From: Yousong Zhou <[email protected]>
  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 <[email protected]>
  10. ---
  11. arch/mips/mti-malta/malta-memory.c | 9 ++-------
  12. 1 file changed, 2 insertions(+), 7 deletions(-)
  13. diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c
  14. index 8fddd2cd..1d562f0 100644
  15. --- a/arch/mips/mti-malta/malta-memory.c
  16. +++ b/arch/mips/mti-malta/malta-memory.c
  17. @@ -106,14 +106,9 @@ fw_memblock_t * __init fw_getmdesc(int eva)
  18. mdesc[2].base = mdesc[0].base + 0x000f0000UL;
  19. mdesc[2].size = 0x00010000;
  20. - mdesc[3].type = fw_dontuse;
  21. + mdesc[3].type = fw_free;
  22. mdesc[3].base = mdesc[0].base + 0x00100000UL;
  23. - mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)&_end)) -
  24. - 0x00100000UL;
  25. -
  26. - mdesc[4].type = fw_free;
  27. - mdesc[4].base = mdesc[0].base + CPHYSADDR(PFN_ALIGN(&_end));
  28. - mdesc[4].size = memsize - CPHYSADDR(mdesc[4].base);
  29. + mdesc[3].size = memsize - CPHYSADDR(mdesc[3].base);
  30. return &mdesc[0];
  31. }
  32. --
  33. 1.7.10.4