2 * linux/arch/i386/mm/init.c
4 * Copyright (C) 1995 Linus Torvalds
6 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
9 #include <linux/module.h>
10 #include <linux/signal.h>
11 #include <linux/sched.h>
12 #include <linux/kernel.h>
13 #include <linux/errno.h>
14 #include <linux/string.h>
15 #include <linux/types.h>
16 #include <linux/ptrace.h>
17 #include <linux/mman.h>
19 #include <linux/hugetlb.h>
20 #include <linux/swap.h>
21 #include <linux/smp.h>
22 #include <linux/init.h>
23 #include <linux/highmem.h>
24 #include <linux/pagemap.h>
25 #include <linux/pfn.h>
26 #include <linux/poison.h>
27 #include <linux/bootmem.h>
28 #include <linux/slab.h>
29 #include <linux/proc_fs.h>
30 #include <linux/efi.h>
31 #include <linux/memory_hotplug.h>
32 #include <linux/initrd.h>
33 #include <linux/cpumask.h>
35 #include <asm/processor.h>
36 #include <asm/system.h>
37 #include <asm/uaccess.h>
38 #include <asm/pgtable.h>
40 #include <asm/fixmap.h>
44 #include <asm/tlbflush.h>
45 #include <asm/sections.h>
46 #include <asm/paravirt.h>
48 unsigned int __VMALLOC_RESERVE = 128 << 20;
50 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
51 unsigned long highstart_pfn, highend_pfn;
53 static int noinline do_test_wp_bit(void);
56 * Creates a middle page table and puts a pointer to it in the
57 * given global directory entry. This only returns the gd entry
58 * in non-PAE compilation mode, since the middle layer is folded.
60 static pmd_t * __init one_md_table_init(pgd_t *pgd)
66 if (!(pgd_val(*pgd) & _PAGE_PRESENT)) {
67 pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
69 paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT);
70 set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
71 pud = pud_offset(pgd, 0);
72 if (pmd_table != pmd_offset(pud, 0))
76 pud = pud_offset(pgd, 0);
77 pmd_table = pmd_offset(pud, 0);
82 * Create a page table and place a pointer to it in a middle page
85 static pte_t * __init one_page_table_init(pmd_t *pmd)
87 if (!(pmd_val(*pmd) & _PAGE_PRESENT)) {
88 pte_t *page_table = NULL;
90 #ifdef CONFIG_DEBUG_PAGEALLOC
91 page_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE);
95 (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE);
97 paravirt_alloc_pt(&init_mm, __pa(page_table) >> PAGE_SHIFT);
98 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
99 BUG_ON(page_table != pte_offset_kernel(pmd, 0));
102 return pte_offset_kernel(pmd, 0);
106 * This function initializes a certain range of kernel virtual memory
107 * with new bootmem page tables, everywhere page tables are missing in
112 * NOTE: The pagetables are allocated contiguous on the physical space
113 * so we can cache the place of the first one and move around without
114 * checking the pgd every time.
116 static void __init page_table_range_init (unsigned long start, unsigned long end, pgd_t *pgd_base)
120 int pgd_idx, pmd_idx;
124 pgd_idx = pgd_index(vaddr);
125 pmd_idx = pmd_index(vaddr);
126 pgd = pgd_base + pgd_idx;
128 for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) {
129 pmd = one_md_table_init(pgd);
130 pmd = pmd + pmd_index(vaddr);
131 for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end); pmd++, pmd_idx++) {
132 one_page_table_init(pmd);
140 static inline int is_kernel_text(unsigned long addr)
142 if (addr >= PAGE_OFFSET && addr <= (unsigned long)__init_end)
148 * This maps the physical memory to kernel virtual address space, a total
149 * of max_low_pfn pages, by creating page tables starting from address
152 static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
158 int pgd_idx, pmd_idx, pte_ofs;
160 pgd_idx = pgd_index(PAGE_OFFSET);
161 pgd = pgd_base + pgd_idx;
164 for (; pgd_idx < PTRS_PER_PGD; pgd++, pgd_idx++) {
165 pmd = one_md_table_init(pgd);
166 if (pfn >= max_low_pfn)
168 for (pmd_idx = 0; pmd_idx < PTRS_PER_PMD && pfn < max_low_pfn; pmd++, pmd_idx++) {
169 unsigned int address = pfn * PAGE_SIZE + PAGE_OFFSET;
171 /* Map with big pages if possible, otherwise create normal page tables. */
173 unsigned int address2 = (pfn + PTRS_PER_PTE - 1) * PAGE_SIZE + PAGE_OFFSET + PAGE_SIZE-1;
174 if (is_kernel_text(address) || is_kernel_text(address2))
175 set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC));
177 set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE));
181 pte = one_page_table_init(pmd);
184 pte_ofs < PTRS_PER_PTE && pfn < max_low_pfn;
185 pte++, pfn++, pte_ofs++, address += PAGE_SIZE) {
186 if (is_kernel_text(address))
187 set_pte(pte, pfn_pte(pfn, PAGE_KERNEL_EXEC));
189 set_pte(pte, pfn_pte(pfn, PAGE_KERNEL));
196 static inline int page_kills_ppro(unsigned long pagenr)
198 if (pagenr >= 0x70000 && pagenr <= 0x7003F)
203 int page_is_ram(unsigned long pagenr)
206 unsigned long addr, end;
209 efi_memory_desc_t *md;
212 for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
214 if (!is_available_memory(md))
216 addr = (md->phys_addr+PAGE_SIZE-1) >> PAGE_SHIFT;
217 end = (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) >> PAGE_SHIFT;
219 if ((pagenr >= addr) && (pagenr < end))
225 for (i = 0; i < e820.nr_map; i++) {
227 if (e820.map[i].type != E820_RAM) /* not usable memory */
230 * !!!FIXME!!! Some BIOSen report areas as RAM that
231 * are not. Notably the 640->1Mb area. We need a sanity
234 addr = (e820.map[i].addr+PAGE_SIZE-1) >> PAGE_SHIFT;
235 end = (e820.map[i].addr+e820.map[i].size) >> PAGE_SHIFT;
236 if ((pagenr >= addr) && (pagenr < end))
242 #ifdef CONFIG_HIGHMEM
246 #define kmap_get_fixmap_pte(vaddr) \
247 pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), vaddr), (vaddr)), (vaddr))
249 static void __init kmap_init(void)
251 unsigned long kmap_vstart;
253 /* cache the first kmap pte */
254 kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN);
255 kmap_pte = kmap_get_fixmap_pte(kmap_vstart);
257 kmap_prot = PAGE_KERNEL;
260 static void __init permanent_kmaps_init(pgd_t *pgd_base)
269 page_table_range_init(vaddr, vaddr + PAGE_SIZE*LAST_PKMAP, pgd_base);
271 pgd = swapper_pg_dir + pgd_index(vaddr);
272 pud = pud_offset(pgd, vaddr);
273 pmd = pmd_offset(pud, vaddr);
274 pte = pte_offset_kernel(pmd, vaddr);
275 pkmap_page_table = pte;
278 static void __meminit free_new_highpage(struct page *page)
280 init_page_count(page);
285 void __init add_one_highpage_init(struct page *page, int pfn, int bad_ppro)
287 if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) {
288 ClearPageReserved(page);
289 free_new_highpage(page);
291 SetPageReserved(page);
294 static int __meminit add_one_highpage_hotplug(struct page *page, unsigned long pfn)
296 free_new_highpage(page);
298 #ifdef CONFIG_FLATMEM
299 max_mapnr = max(pfn, max_mapnr);
306 * Not currently handling the NUMA case.
307 * Assuming single node and all memory that
308 * has been added dynamically that would be
309 * onlined here is in HIGHMEM
311 void __meminit online_page(struct page *page)
313 ClearPageReserved(page);
314 add_one_highpage_hotplug(page, page_to_pfn(page));
319 extern void set_highmem_pages_init(int);
321 static void __init set_highmem_pages_init(int bad_ppro)
324 for (pfn = highstart_pfn; pfn < highend_pfn; pfn++) {
326 * Holes under sparsemem might not have no mem_map[]:
329 add_one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro);
331 totalram_pages += totalhigh_pages;
333 #endif /* CONFIG_FLATMEM */
336 #define kmap_init() do { } while (0)
337 #define permanent_kmaps_init(pgd_base) do { } while (0)
338 #define set_highmem_pages_init(bad_ppro) do { } while (0)
339 #endif /* CONFIG_HIGHMEM */
341 unsigned long long __PAGE_KERNEL = _PAGE_KERNEL;
342 EXPORT_SYMBOL(__PAGE_KERNEL);
343 unsigned long long __PAGE_KERNEL_EXEC = _PAGE_KERNEL_EXEC;
346 extern void __init remap_numa_kva(void);
348 #define remap_numa_kva() do {} while (0)
351 void __init native_pagetable_setup_start(pgd_t *base)
353 #ifdef CONFIG_X86_PAE
357 * Init entries of the first-level page table to the
358 * zero page, if they haven't already been set up.
360 * In a normal native boot, we'll be running on a
361 * pagetable rooted in swapper_pg_dir, but not in PAE
362 * mode, so this will end up clobbering the mappings
363 * for the lower 24Mbytes of the address space,
364 * without affecting the kernel address space.
366 for (i = 0; i < USER_PTRS_PER_PGD; i++)
368 __pgd(__pa(empty_zero_page) | _PAGE_PRESENT));
370 /* Make sure kernel address space is empty so that a pagetable
371 will be allocated for it. */
372 memset(&base[USER_PTRS_PER_PGD], 0,
373 KERNEL_PGD_PTRS * sizeof(pgd_t));
375 paravirt_alloc_pd(__pa(swapper_pg_dir) >> PAGE_SHIFT);
379 void __init native_pagetable_setup_done(pgd_t *base)
381 #ifdef CONFIG_X86_PAE
383 * Add low memory identity-mappings - SMP needs it when
384 * starting up on an AP from real-mode. In the non-PAE
385 * case we already have these mappings through head.S.
386 * All user-space mappings are explicitly cleared after
389 set_pgd(&base[0], base[USER_PTRS_PER_PGD]);
394 * Build a proper pagetable for the kernel mappings. Up until this
395 * point, we've been running on some set of pagetables constructed by
398 * If we're booting on native hardware, this will be a pagetable
399 * constructed in arch/i386/kernel/head.S, and not running in PAE mode
400 * (even if we'll end up running in PAE). The root of the pagetable
401 * will be swapper_pg_dir.
403 * If we're booting paravirtualized under a hypervisor, then there are
404 * more options: we may already be running PAE, and the pagetable may
405 * or may not be based in swapper_pg_dir. In any case,
406 * paravirt_pagetable_setup_start() will set up swapper_pg_dir
407 * appropriately for the rest of the initialization to work.
409 * In general, pagetable_init() assumes that the pagetable may already
410 * be partially populated, and so it avoids stomping on any existing
413 static void __init pagetable_init (void)
415 unsigned long vaddr, end;
416 pgd_t *pgd_base = swapper_pg_dir;
418 paravirt_pagetable_setup_start(pgd_base);
420 /* Enable PSE if available */
422 set_in_cr4(X86_CR4_PSE);
424 /* Enable PGE if available */
426 set_in_cr4(X86_CR4_PGE);
427 __PAGE_KERNEL |= _PAGE_GLOBAL;
428 __PAGE_KERNEL_EXEC |= _PAGE_GLOBAL;
431 kernel_physical_mapping_init(pgd_base);
435 * Fixed mappings, only the page table structure has to be
436 * created - mappings will be set by set_fixmap():
438 vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
439 end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK;
440 page_table_range_init(vaddr, end, pgd_base);
442 permanent_kmaps_init(pgd_base);
444 paravirt_pagetable_setup_done(pgd_base);
447 #if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI)
449 * Swap suspend & friends need this for resume because things like the intel-agp
450 * driver might have split up a kernel 4MB mapping.
452 char __nosavedata swsusp_pg_dir[PAGE_SIZE]
453 __attribute__ ((aligned (PAGE_SIZE)));
455 static inline void save_pg_dir(void)
457 memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE);
460 static inline void save_pg_dir(void)
465 void zap_low_mappings (void)
472 * Zap initial low-memory mappings.
474 * Note that "pgd_clear()" doesn't do it for
475 * us, because pgd_clear() is a no-op on i386.
477 for (i = 0; i < USER_PTRS_PER_PGD; i++)
478 #ifdef CONFIG_X86_PAE
479 set_pgd(swapper_pg_dir+i, __pgd(1 + __pa(empty_zero_page)));
481 set_pgd(swapper_pg_dir+i, __pgd(0));
488 #ifdef CONFIG_X86_PAE
490 static int disable_nx __initdata = 0;
491 u64 __supported_pte_mask __read_mostly = ~_PAGE_NX;
492 EXPORT_SYMBOL_GPL(__supported_pte_mask);
497 * Control non executable mappings.
502 static int __init noexec_setup(char *str)
504 if (!str || !strcmp(str, "on")) {
506 __supported_pte_mask |= _PAGE_NX;
509 } else if (!strcmp(str,"off")) {
511 __supported_pte_mask &= ~_PAGE_NX;
517 early_param("noexec", noexec_setup);
519 static void __init set_nx(void)
521 unsigned int v[4], l, h;
523 if (cpu_has_pae && (cpuid_eax(0x80000000) > 0x80000001)) {
524 cpuid(0x80000001, &v[0], &v[1], &v[2], &v[3]);
525 if ((v[3] & (1 << 20)) && !disable_nx) {
526 rdmsr(MSR_EFER, l, h);
528 wrmsr(MSR_EFER, l, h);
530 __supported_pte_mask |= _PAGE_NX;
536 * Enables/disables executability of a given kernel page and
537 * returns the previous setting.
539 int __init set_kernel_exec(unsigned long vaddr, int enable)
547 pte = lookup_address(vaddr);
550 if (!pte_exec_kernel(*pte))
554 pte->pte_high &= ~(1 << (_PAGE_BIT_NX - 32));
556 pte->pte_high |= 1 << (_PAGE_BIT_NX - 32);
557 pte_update_defer(&init_mm, vaddr, pte);
566 * paging_init() sets up the page tables - note that the first 8MB are
567 * already mapped by head.S.
569 * This routines also unmaps the page at virtual kernel address 0, so
570 * that we can trap those pesky NULL-reference errors in the kernel.
572 void __init paging_init(void)
574 #ifdef CONFIG_X86_PAE
577 printk("NX (Execute Disable) protection: active\n");
582 load_cr3(swapper_pg_dir);
584 #ifdef CONFIG_X86_PAE
586 * We will bail out later - printk doesn't work right now so
587 * the user would just see a hanging kernel.
590 set_in_cr4(X86_CR4_PAE);
598 * Test if the WP bit works in supervisor mode. It isn't supported on 386's
599 * and also on some strange 486's (NexGen etc.). All 586+'s are OK. This
600 * used to involve black magic jumps to work around some nasty CPU bugs,
601 * but fortunately the switch to using exceptions got rid of all that.
604 static void __init test_wp_bit(void)
606 printk("Checking if this processor honours the WP bit even in supervisor mode... ");
608 /* Any page-aligned address will do, the test is non-destructive */
609 __set_fixmap(FIX_WP_TEST, __pa(&swapper_pg_dir), PAGE_READONLY);
610 boot_cpu_data.wp_works_ok = do_test_wp_bit();
611 clear_fixmap(FIX_WP_TEST);
613 if (!boot_cpu_data.wp_works_ok) {
615 #ifdef CONFIG_X86_WP_WORKS_OK
616 panic("This kernel doesn't support CPU's with broken WP. Recompile it for a 386!");
623 static struct kcore_list kcore_mem, kcore_vmalloc;
625 void __init mem_init(void)
627 extern int ppro_with_ram_bug(void);
628 int codesize, reservedpages, datasize, initsize;
632 #ifdef CONFIG_FLATMEM
636 bad_ppro = ppro_with_ram_bug();
638 #ifdef CONFIG_HIGHMEM
639 /* check that fixmap and pkmap do not overlap */
640 if (PKMAP_BASE+LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) {
641 printk(KERN_ERR "fixmap and kmap areas overlap - this will crash\n");
642 printk(KERN_ERR "pkstart: %lxh pkend: %lxh fixstart %lxh\n",
643 PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE, FIXADDR_START);
648 /* this will put all low memory onto the freelists */
649 totalram_pages += free_all_bootmem();
652 for (tmp = 0; tmp < max_low_pfn; tmp++)
654 * Only count reserved RAM pages
656 if (page_is_ram(tmp) && PageReserved(pfn_to_page(tmp)))
659 set_highmem_pages_init(bad_ppro);
661 codesize = (unsigned long) &_etext - (unsigned long) &_text;
662 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
663 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
665 kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
666 kclist_add(&kcore_vmalloc, (void *)VMALLOC_START,
667 VMALLOC_END-VMALLOC_START);
669 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n",
670 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
671 num_physpages << (PAGE_SHIFT-10),
673 reservedpages << (PAGE_SHIFT-10),
676 (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))
679 #if 1 /* double-sanity-check paranoia */
680 printk("virtual kernel memory layout:\n"
681 " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
682 #ifdef CONFIG_HIGHMEM
683 " pkmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
685 " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n"
686 " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n"
687 " .init : 0x%08lx - 0x%08lx (%4ld kB)\n"
688 " .data : 0x%08lx - 0x%08lx (%4ld kB)\n"
689 " .text : 0x%08lx - 0x%08lx (%4ld kB)\n",
690 FIXADDR_START, FIXADDR_TOP,
691 (FIXADDR_TOP - FIXADDR_START) >> 10,
693 #ifdef CONFIG_HIGHMEM
694 PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE,
695 (LAST_PKMAP*PAGE_SIZE) >> 10,
698 VMALLOC_START, VMALLOC_END,
699 (VMALLOC_END - VMALLOC_START) >> 20,
701 (unsigned long)__va(0), (unsigned long)high_memory,
702 ((unsigned long)high_memory - (unsigned long)__va(0)) >> 20,
704 (unsigned long)&__init_begin, (unsigned long)&__init_end,
705 ((unsigned long)&__init_end - (unsigned long)&__init_begin) >> 10,
707 (unsigned long)&_etext, (unsigned long)&_edata,
708 ((unsigned long)&_edata - (unsigned long)&_etext) >> 10,
710 (unsigned long)&_text, (unsigned long)&_etext,
711 ((unsigned long)&_etext - (unsigned long)&_text) >> 10);
713 #ifdef CONFIG_HIGHMEM
714 BUG_ON(PKMAP_BASE+LAST_PKMAP*PAGE_SIZE > FIXADDR_START);
715 BUG_ON(VMALLOC_END > PKMAP_BASE);
717 BUG_ON(VMALLOC_START > VMALLOC_END);
718 BUG_ON((unsigned long)high_memory > VMALLOC_START);
719 #endif /* double-sanity-check paranoia */
721 #ifdef CONFIG_X86_PAE
723 panic("cannot execute a PAE-enabled kernel on a PAE-less CPU!");
725 if (boot_cpu_data.wp_works_ok < 0)
729 * Subtle. SMP is doing it's boot stuff late (because it has to
730 * fork idle threads) - but it also needs low mappings for the
731 * protected-mode entry to work. We zap these entries only after
732 * the WP-bit has been tested.
739 #ifdef CONFIG_MEMORY_HOTPLUG
740 int arch_add_memory(int nid, u64 start, u64 size)
742 struct pglist_data *pgdata = NODE_DATA(nid);
743 struct zone *zone = pgdata->node_zones + ZONE_HIGHMEM;
744 unsigned long start_pfn = start >> PAGE_SHIFT;
745 unsigned long nr_pages = size >> PAGE_SHIFT;
747 return __add_pages(zone, start_pfn, nr_pages);
752 struct kmem_cache *pmd_cache;
754 void __init pgtable_cache_init(void)
756 if (PTRS_PER_PMD > 1)
757 pmd_cache = kmem_cache_create("pmd",
758 PTRS_PER_PMD*sizeof(pmd_t),
759 PTRS_PER_PMD*sizeof(pmd_t),
765 * This function cannot be __init, since exceptions don't work in that
766 * section. Put this after the callers, so that it cannot be inlined.
768 static int noinline do_test_wp_bit(void)
773 __asm__ __volatile__(
778 ".section __ex_table,\"a\"\n"
782 :"=m" (*(char *)fix_to_virt(FIX_WP_TEST)),
791 #ifdef CONFIG_DEBUG_RODATA
793 void mark_rodata_ro(void)
795 unsigned long start = PFN_ALIGN(_text);
796 unsigned long size = PFN_ALIGN(_etext) - start;
798 #ifndef CONFIG_KPROBES
799 #ifdef CONFIG_HOTPLUG_CPU
800 /* It must still be possible to apply SMP alternatives. */
801 if (num_possible_cpus() <= 1)
804 change_page_attr(virt_to_page(start),
805 size >> PAGE_SHIFT, PAGE_KERNEL_RX);
806 printk("Write protecting the kernel text: %luk\n", size >> 10);
810 size = (unsigned long)__end_rodata - start;
811 change_page_attr(virt_to_page(start),
812 size >> PAGE_SHIFT, PAGE_KERNEL_RO);
813 printk("Write protecting the kernel read-only data: %luk\n",
817 * change_page_attr() requires a global_flush_tlb() call after it.
818 * We do this after the printk so that if something went wrong in the
819 * change, the printk gets out at least to give a better debug hint
820 * of who is the culprit.
826 void free_init_pages(char *what, unsigned long begin, unsigned long end)
830 for (addr = begin; addr < end; addr += PAGE_SIZE) {
831 ClearPageReserved(virt_to_page(addr));
832 init_page_count(virt_to_page(addr));
833 memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE);
837 printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10);
840 void free_initmem(void)
842 free_init_pages("unused kernel memory",
843 (unsigned long)(&__init_begin),
844 (unsigned long)(&__init_end));
847 #ifdef CONFIG_BLK_DEV_INITRD
848 void free_initrd_mem(unsigned long start, unsigned long end)
850 free_init_pages("initrd memory", start, end);