2 * linux/arch/cris/mm/init.c
4 * Copyright (C) 1995 Linus Torvalds
5 * Copyright (C) 2000,2001 Axis Communications AB
7 * Authors: Bjorn Wesen (bjornw@axis.com)
11 #include <linux/gfp.h>
12 #include <linux/init.h>
13 #include <linux/bootmem.h>
15 #include <asm/sections.h>
17 unsigned long empty_zero_page
;
22 int codesize
, reservedpages
, datasize
, initsize
;
27 /* max/min_low_pfn was set by setup.c
28 * now we just copy it to some other necessary places...
30 * high_memory was also set in setup.c
33 max_mapnr
= num_physpages
= max_low_pfn
- min_low_pfn
;
35 /* this will put all memory onto the freelists */
36 totalram_pages
= free_all_bootmem();
39 for (tmp
= 0; tmp
< max_mapnr
; tmp
++) {
41 * Only count reserved RAM pages
43 if (PageReserved(mem_map
+ tmp
))
47 codesize
= (unsigned long) &_etext
- (unsigned long) &_stext
;
48 datasize
= (unsigned long) &_edata
- (unsigned long) &_etext
;
49 initsize
= (unsigned long) &__init_end
- (unsigned long) &__init_begin
;
52 "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, "
54 nr_free_pages() << (PAGE_SHIFT
-10),
55 max_mapnr
<< (PAGE_SHIFT
-10),
57 reservedpages
<< (PAGE_SHIFT
-10),
63 /* free the pages occupied by initialization code */
68 free_initmem_default(0);