1927604c7SYinghai Lu /*
2927604c7SYinghai Lu * Written by: Patricia Gaughen <gone@us.ibm.com>, IBM Corporation
3927604c7SYinghai Lu * August 2002: added remote node KVA remap - Martin J. Bligh
4927604c7SYinghai Lu *
5927604c7SYinghai Lu * Copyright (C) 2002, IBM Corp.
6927604c7SYinghai Lu *
7927604c7SYinghai Lu * All rights reserved.
8927604c7SYinghai Lu *
9927604c7SYinghai Lu * This program is free software; you can redistribute it and/or modify
10927604c7SYinghai Lu * it under the terms of the GNU General Public License as published by
11927604c7SYinghai Lu * the Free Software Foundation; either version 2 of the License, or
12927604c7SYinghai Lu * (at your option) any later version.
13927604c7SYinghai Lu *
14927604c7SYinghai Lu * This program is distributed in the hope that it will be useful, but
15927604c7SYinghai Lu * WITHOUT ANY WARRANTY; without even the implied warranty of
16927604c7SYinghai Lu * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
17927604c7SYinghai Lu * NON INFRINGEMENT. See the GNU General Public License for more
18927604c7SYinghai Lu * details.
19927604c7SYinghai Lu *
20927604c7SYinghai Lu * You should have received a copy of the GNU General Public License
21927604c7SYinghai Lu * along with this program; if not, write to the Free Software
22927604c7SYinghai Lu * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23927604c7SYinghai Lu */
24927604c7SYinghai Lu
25a9ce6bc1SYinghai Lu #include <linux/memblock.h>
264b599fedSPaul Gortmaker #include <linux/init.h>
27927604c7SYinghai Lu
28bd6709a9STejun Heo #include "numa_internal.h"
29927604c7SYinghai Lu
30927604c7SYinghai Lu extern unsigned long highend_pfn, highstart_pfn;
31927604c7SYinghai Lu
initmem_init(void)32d8fc3afcSTejun Heo void __init initmem_init(void)
33927604c7SYinghai Lu {
34bd6709a9STejun Heo x86_numa_init();
35927604c7SYinghai Lu
36927604c7SYinghai Lu #ifdef CONFIG_HIGHMEM
37927604c7SYinghai Lu highstart_pfn = highend_pfn = max_pfn;
38927604c7SYinghai Lu if (max_pfn > max_low_pfn)
39927604c7SYinghai Lu highstart_pfn = max_low_pfn;
40927604c7SYinghai Lu printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
41927604c7SYinghai Lu pages_to_mb(highend_pfn - highstart_pfn));
42927604c7SYinghai Lu high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
43927604c7SYinghai Lu #else
44927604c7SYinghai Lu high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
45927604c7SYinghai Lu #endif
46927604c7SYinghai Lu printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
47927604c7SYinghai Lu pages_to_mb(max_low_pfn));
48927604c7SYinghai Lu printk(KERN_DEBUG "max_low_pfn = %lx, highstart_pfn = %lx\n",
49927604c7SYinghai Lu max_low_pfn, highstart_pfn);
50927604c7SYinghai Lu
51927604c7SYinghai Lu printk(KERN_DEBUG "Low memory ends at vaddr %08lx\n",
52927604c7SYinghai Lu (ulong) pfn_to_kaddr(max_low_pfn));
53927604c7SYinghai Lu
54927604c7SYinghai Lu printk(KERN_DEBUG "High memory starts at vaddr %08lx\n",
55927604c7SYinghai Lu (ulong) pfn_to_kaddr(highstart_pfn));
56927604c7SYinghai Lu
57*861ce4a3SLaura Abbott __vmalloc_start_set = true;
58927604c7SYinghai Lu setup_bootmem_allocator();
59927604c7SYinghai Lu }
60