1700efc1bSEric W. Biederman /* 2700efc1bSEric W. Biederman * linux/arch/i386/kernel/head32.c -- prepare to run common code 3700efc1bSEric W. Biederman * 4700efc1bSEric W. Biederman * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE 5700efc1bSEric W. Biederman * Copyright (C) 2007 Eric Biederman <ebiederm@xmission.com> 6700efc1bSEric W. Biederman */ 7700efc1bSEric W. Biederman 8700efc1bSEric W. Biederman #include <linux/init.h> 9700efc1bSEric W. Biederman #include <linux/start_kernel.h> 10700efc1bSEric W. Biederman 11a4c81cf6SYinghai Lu #include <asm/setup.h> 12a4c81cf6SYinghai Lu #include <asm/sections.h> 13a4c81cf6SYinghai Lu #include <asm/e820.h> 14816c25e7SThomas Gleixner #include <asm/page.h> 153e1e9002SRafael J. Wysocki #include <asm/trampoline.h> 16a4c81cf6SYinghai Lu 17700efc1bSEric W. Biederman void __init i386_start_kernel(void) 18700efc1bSEric W. Biederman { 193e1e9002SRafael J. Wysocki reserve_trampoline_memory(); 203e1e9002SRafael J. Wysocki 2193dbda7cSJeremy Fitzhardinge reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS"); 22a4c81cf6SYinghai Lu 23a4c81cf6SYinghai Lu #ifdef CONFIG_BLK_DEV_INITRD 24a4c81cf6SYinghai Lu /* Reserve INITRD */ 25a4c81cf6SYinghai Lu if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { 26a4c81cf6SYinghai Lu u64 ramdisk_image = boot_params.hdr.ramdisk_image; 27a4c81cf6SYinghai Lu u64 ramdisk_size = boot_params.hdr.ramdisk_size; 28a4c81cf6SYinghai Lu u64 ramdisk_end = ramdisk_image + ramdisk_size; 29a4c81cf6SYinghai Lu reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); 30a4c81cf6SYinghai Lu } 31a4c81cf6SYinghai Lu #endif 32f7cf5a5bSThomas Gleixner /* Initilize 32bit specific setup functions */ 33f7cf5a5bSThomas Gleixner x86_init.resources.probe_roms = probe_roms; 348fee697dSThomas Gleixner x86_init.resources.reserve_resources = i386_reserve_resources; 35f7cf5a5bSThomas Gleixner 36816c25e7SThomas Gleixner x86_init.resources.reserve_ebda_region(); 37a4c81cf6SYinghai Lu 38a4c81cf6SYinghai Lu /* 39a4c81cf6SYinghai Lu * At this point everything still needed from the boot loader 40a4c81cf6SYinghai Lu * or BIOS or kernel text should be early reserved or marked not 41a4c81cf6SYinghai Lu * RAM in e820. All other memory is free game. 42a4c81cf6SYinghai Lu */ 43a4c81cf6SYinghai Lu 44700efc1bSEric W. Biederman start_kernel(); 45700efc1bSEric W. Biederman } 46