Commit 659da2ba authored by Wu Zhangjin's avatar Wu Zhangjin Committed by Ralf Baechle

MIPS: Loongson: Register reserved memory pages

Register reserved pages for Loongson family machines.
Signed-off-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: yanh@lemote.com,
Cc: huhb@lemote.com
Cc: Zhang Le <r0bertz@gentoo.org>
Cc: zhangfx@lemote.com,
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent c1b14a75
...@@ -12,14 +12,22 @@ ...@@ -12,14 +12,22 @@
#include <loongson.h> #include <loongson.h>
#include <mem.h> #include <mem.h>
#include <pci.h>
void __init prom_init_memory(void) void __init prom_init_memory(void)
{ {
add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM); add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);
add_memory_region(memsize << 20, LOONGSON_PCI_MEM_START - (memsize <<
20), BOOT_MEM_RESERVED);
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
if (highmemsize > 0) if (highmemsize > 0)
add_memory_region(LOONGSON_HIGHMEM_START, add_memory_region(LOONGSON_HIGHMEM_START,
highmemsize << 20, BOOT_MEM_RAM); highmemsize << 20, BOOT_MEM_RAM);
add_memory_region(LOONGSON_PCI_MEM_END + 1, LOONGSON_HIGHMEM_START -
LOONGSON_PCI_MEM_END - 1, BOOT_MEM_RESERVED);
#endif /* CONFIG_64BIT */ #endif /* CONFIG_64BIT */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment